exporting echo_log and adding a debug in controller for stackTrace

This commit is contained in:
smruthi2187
2018-02-08 13:58:44 -08:00
parent a98370ca63
commit 266922da26
2 changed files with 6 additions and 6 deletions
+1
View File
@@ -36,6 +36,7 @@ func Start(port int) {
signal.Notify(c, syscall.SIGTERM) signal.Notify(c, syscall.SIGTERM)
go func() { go func() {
<-c <-c
log.Println("Dumping stack trace")
dumpStackTrace() dumpStackTrace()
os.Exit(1) os.Exit(1)
}() }()
+5 -6
View File
@@ -184,7 +184,6 @@ helm_install_fission() {
--name $id \ --name $id \
--set $helmVars \ --set $helmVars \
--namespace $ns \ --namespace $ns \
--debug \
$ROOT/charts/fission-all $ROOT/charts/fission-all
helm list helm list
@@ -373,8 +372,8 @@ dump_all_fission_resources() {
ns=$1 ns=$1
echo "--- All objects in the fission namespace $ns ---" echo "--- All objects in the fission namespace $ns ---"
kubectl -n $ns get all
kubectl -n $ns get pods -o wide kubectl -n $ns get pods -o wide
kubectl -n $ns get svc
echo "--- End objects in the fission namespace $ns ---" echo "--- End objects in the fission namespace $ns ---"
} }
@@ -406,11 +405,11 @@ dump_logs() {
dump_fission_crds dump_fission_crds
} }
DATE='date +%Y/%m/%d:%H:%M:%S'
echo_log() { echo_log() {
echo `$DATE`" $1" echo `date +%Y/%m/%d:%H:%M:%S`" $1"
} }
export -f echo_log
export FAILURES=0 export FAILURES=0
run_all_tests() { run_all_tests() {
@@ -465,7 +464,7 @@ install_and_test() {
#trap "helm_uninstall_fission $id" EXIT #trap "helm_uninstall_fission $id" EXIT
if ! helm_install_fission $id $image $imageTag $fetcherImage $fetcherImageTag $controllerPort $routerPort $fluentdImage $fluentdImageTag $pruneInterval if ! helm_install_fission $id $image $imageTag $fetcherImage $fetcherImageTag $controllerPort $routerPort $fluentdImage $fluentdImageTag $pruneInterval
then then
dump_logs $id describe_all_pods $id
dump_kubernetes_events $id dump_kubernetes_events $id
dump_tiller_logs dump_tiller_logs
exit 1 exit 1
@@ -483,7 +482,7 @@ install_and_test() {
if [ $FAILURES -ne 0 ] if [ $FAILURES -ne 0 ]
then then
# describe each pod in fission ns and function namespace # describe each pod in fission ns and function namespace
describe_all_pods $id
exit 1 exit 1
fi fi
} }