weizhouapache commented on a change in pull request #4303:
URL: https://github.com/apache/cloudstack/pull/4303#discussion_r483476837



##########
File path: 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" % brname)
+    physdev = execute("bridge -o link show | awk '/master %s / && !/^[0-9]+: 
vnet/ {print $2}' | head -1 | cut -d ':' -f1" % brname)

Review comment:
       @wido here is an example
   in ubuntu 16.04
   ```
   root@node42:~# bridge -o link show
   2: eth0 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master 
cloudbr0 state forwarding priority 32 cost 100
   ```
   in ubuntu 20.04
   ```
   root@node62:~# bridge -o link show
   2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master cloudbr0 state 
forwarding priority 32 cost 100
   ```
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to