sdc-backend-init does not restart on healthcheck failure 34/107834/1
authorFuss, Areli (af732p) <af732p@intl.att.com>
Thu, 14 May 2020 12:27:12 +0000 (15:27 +0300)
committerOfir Sonsino <os0695@intl.att.com>
Tue, 19 May 2020 07:18:08 +0000 (10:18 +0300)
Issue-ID: SDC-3063
Change-Id: I6c4a796f42060832ee8a37a708dedda7e7e98c70
Signed-off-by: Ofir Sonsino <os0695@intl.att.com>
catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/recipes/2_check_Backend.rb
catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/check_Backend_Health.py.erb

index eb77f93..bcacf88 100644 (file)
@@ -3,6 +3,7 @@ import subprocess
 #from time import sleep
 import time
 from datetime import datetime
+import sys
 
 beStat=0
 BE_IP="<%= @be_ip %>"
@@ -48,4 +49,4 @@ for i in range(1,10):
 
 if beStat == 0:
     print '[ERROR]: ' + time.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + 'Backend is DOWN :-(' + bcolors.ENDC
-    exit()
\ No newline at end of file
+    sys.exit(1)
\ No newline at end of file