Skip to content

Commit 6e7516c

Browse files
kvm: Fix get_bridge_physdev where it returns "device:" instead of just "device" (#4740)
When running get_bridge_physdev(brname) from security_group.py it is returned the bridge device as brname: instead of the expected brname. We experienced this issue on CloudStack 4.13.1.0 with Security Groups enabled for Advanced Networking. Additionally, KVM nodes are running on Ubuntu 18.04. PR #4303 (merged in 4.15) added support for Ubuntu 20.04 which turned out to fix get_bridge_physdev(brname); however, we faced the very same issue with the previous CloudStack and Ubuntu versions. Even though we might not get a 4.13.2, and CloudStack 4.14.1.0 has just been released, this PR proposes merging the fix into branch 4.13 and then get it forwarded into 4.14. Thus, allowing users to have this fix referenced and also opening the possibility of addressing this in case of a potential 4.14.2.0.
1 parent e1f3179 commit 6e7516c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/vm/network/security_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def split_ips_by_family(ips):
149149

150150

151151
def get_bridge_physdev(brname):
152-
physdev = execute("bridge -o link show | awk '/master %s / && !/^[0-9]+: vnet/ {print $2}' | head -1" % brname)
152+
physdev = execute("bridge -o link show | awk '/master %s / && !/^[0-9]+: vnet/ {print $2}' | head -1 | cut -d ':' -f1" % brname)
153153
return physdev.strip()
154154

155155

0 commit comments

Comments
 (0)