mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
vr: fix python exception when configure VRs (#4489)
before ``` root@r-27-VM:/var/cache/cloud# /opt/cloud/bin/configure.py monitor_service.json ERROR:root:Command 'ip link show eth0 | grep 'state DOWN'' returned non-zero exit status 1 ``` with this change ``` root@r-27-VM:/var/cache/cloud# /opt/cloud/bin/configure.py monitor_service.json root@r-27-VM:/var/cache/cloud# ```
This commit is contained in:
parent
75fdb07387
commit
81ac9f90ab
@ -35,7 +35,7 @@ STATE_COMMANDS = {"router": "ip addr show dev eth0 | grep inet | wc -l | xargs b
|
||||
|
||||
def reconfigure_interfaces(router_config, interfaces):
|
||||
for interface in interfaces:
|
||||
cmd = "ip link show %s | grep 'state DOWN'" % interface.get_device()
|
||||
cmd = "ip link show %s | grep ' state '" % interface.get_device()
|
||||
for device in execute(cmd):
|
||||
if " DOWN " in device:
|
||||
cmd = "ip link set %s up" % interface.get_device()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user