diff --git a/.travis.yml b/.travis.yml index 552cd410..07b7a53a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,10 @@ cache: services: - docker +#branches: +# only: +# - master + before_install: - sudo apt-get update - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce diff --git a/charts/fission-core/templates/deployment.yaml b/charts/fission-core/templates/deployment.yaml index ffcc0096..b3552f02 100644 --- a/charts/fission-core/templates/deployment.yaml +++ b/charts/fission-core/templates/deployment.yaml @@ -133,13 +133,14 @@ spec: httpGet: path: "/healthz" port: "8888" - initialDelaySeconds: 5 - periodSeconds: 2 + initialDelaySeconds: 1 + periodSeconds: 1 + failureThreshold: 30 livenessProbe: httpGet: path: "/healthz" port: "8888" - initialDelaySeconds: 16 + initialDelaySeconds: 35 periodSeconds: 5 serviceAccount: fission-svc @@ -167,13 +168,14 @@ spec: httpGet: path: "/router-healthz" port: "8888" - initialDelaySeconds: 5 - periodSeconds: 2 + initialDelaySeconds: 1 + periodSeconds: 1 + failureThreshold: 30 livenessProbe: httpGet: path: "/router-healthz" port: "8888" - initialDelaySeconds: 16 + initialDelaySeconds: 35 periodSeconds: 5 serviceAccount: fission-svc @@ -222,13 +224,14 @@ spec: httpGet: path: "/healthz" port: "8888" - initialDelaySeconds: 5 - periodSeconds: 2 + initialDelaySeconds: 1 + periodSeconds: 1 + failureThreshold: 30 livenessProbe: httpGet: path: "/healthz" port: "8888" - initialDelaySeconds: 16 + initialDelaySeconds: 35 periodSeconds: 5 serviceAccount: fission-svc diff --git a/controller/controller.go b/controller/controller.go index e6aaf4d2..6d5e6d08 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -36,7 +36,7 @@ func Start(port int) { signal.Notify(c, syscall.SIGTERM) go func() { <-c - log.Println("Dumping stack trace") + log.Println("Recived SIGTERM : Dumping stack trace") dumpStackTrace() os.Exit(1) }() diff --git a/environments/fetcher/cmd/main.go b/environments/fetcher/cmd/main.go index f23ae0fe..23624f55 100644 --- a/environments/fetcher/cmd/main.go +++ b/environments/fetcher/cmd/main.go @@ -31,6 +31,7 @@ func main() { signal.Notify(c, syscall.SIGTERM) go func() { <-c + log.Println("Recived SIGTERM : Dumping stack trace") dumpStackTrace() os.Exit(1) }() diff --git a/executor/executor.go b/executor/executor.go index b3fcf0ec..cbc14a50 100644 --- a/executor/executor.go +++ b/executor/executor.go @@ -197,6 +197,7 @@ func StartExecutor(fissionNamespace string, functionNamespace string, port int) signal.Notify(c, syscall.SIGTERM) go func() { <-c + log.Println("Recived SIGTERM : Dumping stack trace") dumpStackTrace() os.Exit(1) }() diff --git a/executor/poolmgr/gp.go b/executor/poolmgr/gp.go index f796e59b..a306942b 100644 --- a/executor/poolmgr/gp.go +++ b/executor/poolmgr/gp.go @@ -520,27 +520,28 @@ func (gp *GenericPool) createPool() error { "-cfgmap-dir", gp.sharedCfgMapPath, gp.sharedMountPath}, ReadinessProbe: &apiv1.Probe{ - InitialDelaySeconds: 5, - PeriodSeconds: 2, + InitialDelaySeconds: 1, + PeriodSeconds: 1, + FailureThreshold: 30, Handler: apiv1.Handler{ HTTPGet: &apiv1.HTTPGetAction{ Path: "/healthz", Port: intstr.IntOrString{ Type: intstr.Int, - IntVal: 8000, // TODO : Find out the correct port. + IntVal: 8000, }, }, }, }, LivenessProbe: &apiv1.Probe{ - InitialDelaySeconds: 5, + InitialDelaySeconds: 35, PeriodSeconds: 5, Handler: apiv1.Handler{ HTTPGet: &apiv1.HTTPGetAction{ Path: "/healthz", Port: intstr.IntOrString{ Type: intstr.Int, - IntVal: 8000, // TODO : Find out the correct port. + IntVal: 8000, }, }, }, @@ -554,6 +555,7 @@ func (gp *GenericPool) createPool() error { } depl, err := gp.kubernetesClient.ExtensionsV1beta1().Deployments(gp.namespace).Create(deployment) if err != nil { + log.Printf("Error creating deployment for %s in kubernetes, err: %v", deployment.Name, err) return err } gp.deployment = depl diff --git a/router/router.go b/router/router.go index c726c18a..cd6c9dfc 100644 --- a/router/router.go +++ b/router/router.go @@ -84,6 +84,7 @@ func Start(port int, executorUrl string) { signal.Notify(c, syscall.SIGTERM) go func() { <-c + log.Println("Recived SIGTERM : Dumping stack trace") dumpStackTrace() os.Exit(1) }() diff --git a/storagesvc/storagesvc.go b/storagesvc/storagesvc.go index 986082b4..9fe97890 100644 --- a/storagesvc/storagesvc.go +++ b/storagesvc/storagesvc.go @@ -184,6 +184,7 @@ func RunStorageService(storageType StorageType, storagePath string, containerNam signal.Notify(c, syscall.SIGTERM) go func() { <-c + log.Println("Recived SIGTERM : Dumping stack trace") dumpStackTrace() os.Exit(1) }() diff --git a/test/test_utils.sh b/test/test_utils.sh index aa54557e..cb65a204 100755 --- a/test/test_utils.sh +++ b/test/test_utils.sh @@ -208,7 +208,6 @@ wait_for_service() { if [ -z $ip ]; then continue fi - echo "IP for $svc : $ip, healthendpoint : $health_endpoint" http_status=`curl -sw "%{http_code}" "http://$ip/$health_endpoint"` echo "http_status for svc $svc : $http_status" if [ "$http_status" -ne "200" ]; then @@ -223,10 +222,10 @@ wait_for_service() { wait_for_services() { id=$1 + echo "\n--- wait for controller and router services to be routable ---" wait_for_service $id controller "healthz" wait_for_service $id router "router-healthz" - - echo "Controller and router services are routable" + echo "\n--- end wait for controller and router services to be routable ---" } dump_kubernetes_events() { @@ -373,6 +372,7 @@ dump_all_fission_resources() { echo "--- All objects in the fission namespace $ns ---" kubectl -n $ns get pods -o wide + echo "" kubectl -n $ns get svc echo "--- End objects in the fission namespace $ns ---" }