anuragaw commented on a change in pull request #3575: [WIP DO NOT MERGE] Health 
check feature for virtual router
URL: https://github.com/apache/cloudstack/pull/3575#discussion_r365939480
 
 

 ##########
 File path: systemvm/debian/root/health_checks/iptables_check.py
 ##########
 @@ -38,10 +40,13 @@ def main():
                      ["POSTROUTING", "--to-source"]]:
             entriesExpected.append([algo[0], srcIpText, srcPortText, algo[1] + 
" " + dstText])
 
-        pout = Popen("iptables-save | grep " + destIp, shell=True, stdout=PIPE)
+        fetchIpTableEntriesCmd = "iptables-save | grep " + destIp
+        pout = Popen(fetchIpTableEntriesCmd, shell=True, stdout=PIPE)
         if pout.wait() != 0:
-            print "Unable to execute iptables-save command for fetching rules"
-            exit(1)
+            failedCheck = True
+            failureMessage = failureMessage + "Unable to execute iptables-save 
command " \
+                                              "for fetching rules by " + 
fetchIpTableEntriesCmd + "\n"
+            continue
 
 Review comment:
   We are concatenating all errors here like previous comment.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to