From 22c38f8b63737fb348603a99813da5c680130c71 Mon Sep 17 00:00:00 2001 From: Rakesh Venkatesh Date: Mon, 16 Aug 2021 11:27:24 +0200 Subject: [PATCH] Fix iptable rules in ubuntu 20 for bridge name 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 --- 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 6732f642c05e..404edd4e94d8 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()