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/09 15:48:33 UTC

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

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


##########
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:
   I think on error the result is non-empty which is what the code is earlier, I added just this retry-logic around it



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