From 5ed3246e4163f3f4552d7622abe899a4f14c70b7 Mon Sep 17 00:00:00 2001 From: Rakesh Date: Thu, 19 Aug 2021 09:45:26 +0200 Subject: [PATCH] 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 --- 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 6732f642c05..404edd4e94d 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()