DaanHoogland 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_r365868212
 
 

 ##########
 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:
   so we catch and remember an error but do not log it and than later log only 
the last one, again?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to