mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5924: Correcting regex to get vm names exactly from ebtables chains
This commit is contained in:
parent
202c18243b
commit
86124138a1
|
|
@ -700,7 +700,7 @@ def cleanup_rules():
|
|||
logging.debug("vm " + vm_name + " is not running or paused, cleaning up iptable rules")
|
||||
cleanup.append(vm_name)
|
||||
|
||||
chainscmd = """ebtables-save | awk '/:i/ { gsub(/(^:|-(in|out))/, "") ; print $1}'"""
|
||||
chainscmd = """ebtables-save | awk '/:i/ { gsub(/(^:|-(in|out|ips))/, "") ; print $1}'"""
|
||||
chains = execute(chainscmd).split('\n')
|
||||
for chain in chains:
|
||||
if 1 in [ chain.startswith(c) for c in ['r-', 'i-', 's-', 'v-'] ]:
|
||||
|
|
|
|||
Loading…
Reference in New Issue