You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/11/23 08:39:57 UTC

[cloudstack] branch 4.14 updated: vr: fix python exception when configure VRs (#4489)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.14
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.14 by this push:
     new 81ac9f9  vr: fix python exception when configure VRs (#4489)
81ac9f9 is described below

commit 81ac9f90abb100e0318ab9c69c638e27c854ddaf
Author: Wei Zhou <w....@global.leaseweb.com>
AuthorDate: Mon Nov 23 09:39:40 2020 +0100

    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#
    ```
---
 systemvm/debian/opt/cloud/bin/cs/CsHelper.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/systemvm/debian/opt/cloud/bin/cs/CsHelper.py b/systemvm/debian/opt/cloud/bin/cs/CsHelper.py
index 5998fd9..00aa4cb 100755
--- a/systemvm/debian/opt/cloud/bin/cs/CsHelper.py
+++ b/systemvm/debian/opt/cloud/bin/cs/CsHelper.py
@@ -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()