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

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


The following commit(s) were added to refs/heads/4.15 by this push:
     new 5ed3246  Fix iptable rules in ubuntu 20 for bridge name (#5318)
5ed3246 is described below

commit 5ed3246e4163f3f4552d7622abe899a4f14c70b7
Author: Rakesh <[email protected]>
AuthorDate: Thu Aug 19 09:45:26 2021 +0200

    Fix iptable rules in ubuntu 20 for bridge name (#5318)
    
    In ubuntu20 the interface name contains @ synbol and
    because of that even the iptable rules for brdige name
    contains this symbol which causes ping issues.
    Remove the @ symbol from iptable rule to fix the issue
    
    Co-authored-by: Rakesh Venkatesh <[email protected]>
---
 scripts/vm/network/security_group.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/vm/network/security_group.py 
b/scripts/vm/network/security_group.py
index 6732f64..404edd4 100755
--- a/scripts/vm/network/security_group.py
+++ b/scripts/vm/network/security_group.py
@@ -185,7 +185,7 @@ def destroy_network_rules_for_nic(vm_name, vm_ip, vm_mac, 
vif, sec_ips):
         logging.debug("Ignoring failure to delete ebtable rules for vm: " + 
vm_name)
 
 def get_bridge_physdev(brname):
-    physdev = execute("bridge -o link show | awk '/master %s / && !/^[0-9]+: 
vnet/ {print $2}' | head -1 | cut -d ':' -f1" % brname)
+    physdev = execute("bridge -o link show | awk '/master %s / && !/^[0-9]+: 
vnet/ {print $2}' | head -1 | cut -d ':' -f1 | cut -d '@' -f1" % brname)
     return physdev.strip()
 
 

Reply via email to