wido commented on a change in pull request #4303:
URL: https://github.com/apache/cloudstack/pull/4303#discussion_r483460723
##########
File path: scripts/vm/network/security_group.py
##########
@@ -510,7 +510,7 @@ def check_default_network_rules(vm_name, vm_id, vm_ip,
vm_ip6, vm_mac, vif, brna
rules = execute("iptables-save |grep -w %s |grep -w %s |grep -w %s" %
(brfw, vif, vmchain_default))
except:
rules = None
- if rules is None or rules is "":
+ if rules is None or rules == "":
Review comment:
Maybe better to change this to:
<pre>if not rules:</pre>
That captures the None and empty string case right away.
##########
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:
Do we know what changed in Ubuntu 20.04? As the '-o' flag should make it
stable to use on the CLI
----------------------------------------------------------------
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]