You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2023/01/11 11:21:54 UTC

[cloudstack] branch main updated: ssvm: synchorise when adding iptables and routing rules (#6942)

This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new a85973a0cab ssvm: synchorise when adding iptables and routing rules (#6942)
a85973a0cab is described below

commit a85973a0cab0b99bfe7549d0ca6d0f22f23f2794
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Wed Jan 11 16:51:46 2023 +0530

    ssvm: synchorise when adding iptables and routing rules (#6942)
    
    Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
    Co-authored-by: dahn <da...@gmail.com>
---
 .../cloudstack/storage/resource/NfsSecondaryStorageResource.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java b/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index 249c5bcb56d..6ad6e5fcda5 100644
--- a/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++ b/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -2225,7 +2225,13 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
         return null;
     }
 
-    public String allowOutgoingOnPrivate(String destCidr) {
+    /**
+    * allow *only one* setting of an outgoing destination at a time
+    *
+    * @destCidr the destination network that will be allowed for outgoing traffic.
+    * @return any error message that might be helpful or <null> on success or when called anywhere but in the router VM.
+    */
+    public synchronized String allowOutgoingOnPrivate(String destCidr) {
         if (!_inSystemVM) {
             return null;
         }