You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/12/05 08:49:45 UTC

[GitHub] [cloudstack] weizhouapache commented on a diff in pull request #6942: ssvm: synchorise when adding iptables and routing rules

weizhouapache commented on code in PR #6942:
URL: https://github.com/apache/cloudstack/pull/6942#discussion_r1039309837


##########
services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java:
##########
@@ -2234,15 +2234,21 @@ public String allowOutgoingOnPrivate(String destCidr) {
         command.add("-c");
         command.add("iptables -I OUTPUT -o " + intf + " -d " + destCidr + " -p tcp -m state --state NEW -m tcp  -j ACCEPT");
 
-        String result = command.execute();
-        if (result != null) {
-            s_logger.warn("Error in allowing outgoing to " + destCidr + ", err=" + result);
-            return "Error in allowing outgoing to " + destCidr + ", err=" + result;
+        String msg = null;
+        for (int retry = 3; retry > 0; retry--) {
+            String result = command.execute();

Review Comment:
   @rohityadavcloud 
   I wonder if the exit code should be checked instead of the output.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org