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

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


The following commit(s) were added to refs/heads/4.13 by this push:
     new 521217c  vr: fix vr in unknown state (more) (#3848)
521217c is described below

commit 521217c85209ca01e59a7219066c4e3626f35fc8
Author: Wei Zhou <[email protected]>
AuthorDate: Thu Jan 30 04:13:46 2020 +0100

    vr: fix vr in unknown state (more) (#3848)
    
    This fixes similar issue with #3465.
    
    Meanwhile change log level of CsHelper.execute2 from DEBUG to INFO and fix 
some typo.
---
 systemvm/debian/opt/cloud/bin/cs/CsHelper.py    | 6 +++---
 systemvm/debian/opt/cloud/bin/cs/CsRedundant.py | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/systemvm/debian/opt/cloud/bin/cs/CsHelper.py 
b/systemvm/debian/opt/cloud/bin/cs/CsHelper.py
index e298917..5998fd9 100755
--- a/systemvm/debian/opt/cloud/bin/cs/CsHelper.py
+++ b/systemvm/debian/opt/cloud/bin/cs/CsHelper.py
@@ -29,8 +29,8 @@ from netaddr import *
 
 PUBLIC_INTERFACES = {"router": "eth2", "vpcrouter": "eth1"}
 
-STATE_COMMANDS = {"router": "ip addr | grep eth0 | grep inet | wc -l | xargs 
bash -c  'if [ $0 == 2 ]; then echo \"MASTER\"; else echo \"BACKUP\"; fi'",
-                  "vpcrouter": "ip addr | grep eth1 | grep state | awk '{print 
$9;}' | xargs bash -c 'if [ $0 == \"UP\" ]; then echo \"MASTER\"; else echo 
\"BACKUP\"; fi'"}
+STATE_COMMANDS = {"router": "ip addr show dev eth0 | grep inet | wc -l | xargs 
bash -c  'if [ $0 == 2 ]; then echo \"MASTER\"; else echo \"BACKUP\"; fi'",
+                  "vpcrouter": "ip addr show dev eth1 | grep state | awk 
'{print $9;}' | xargs bash -c 'if [ $0 == \"UP\" ]; then echo \"MASTER\"; else 
echo \"BACKUP\"; fi'"}
 
 
 def reconfigure_interfaces(router_config, interfaces):
@@ -215,7 +215,7 @@ def save_iptables(command, iptables_file):
 
 def execute2(command, wait=True):
     """ Execute command """
-    logging.debug("Executing: %s" % command)
+    logging.info("Executing: %s" % command)
     p = subprocess.Popen(command, stdout=subprocess.PIPE, 
stderr=subprocess.PIPE, shell=True)
     if wait:
         p.wait()
diff --git a/systemvm/debian/opt/cloud/bin/cs/CsRedundant.py 
b/systemvm/debian/opt/cloud/bin/cs/CsRedundant.py
index 441723b..8f38961 100755
--- a/systemvm/debian/opt/cloud/bin/cs/CsRedundant.py
+++ b/systemvm/debian/opt/cloud/bin/cs/CsRedundant.py
@@ -102,7 +102,7 @@ class CsRedundant(object):
                 command = "ip link show %s | grep 'state UP'" % dev
                 devUp = CsHelper.execute(command)
                 if devUp:
-                    logging.info("Device %s is present, let's start keepalive 
now." % dev)
+                    logging.info("Device %s is present, let's start keepalived 
now." % dev)
                     isDeviceReady = True
 
         if not isDeviceReady:
@@ -231,7 +231,7 @@ class CsRedundant(object):
             return
 
         self.set_lock()
-        logging.info("Router switched to fault mode")
+        logging.info("Setting router to fault")
 
         interfaces = [interface for interface in self.address.get_interfaces() 
if interface.is_public()]
         for interface in interfaces:

Reply via email to