cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [38/50] [abbrv] git commit: updated refs/heads/feature/systemvm-persistent-config to 8620642
Date Mon, 16 Feb 2015 16:48:19 GMT
Fix the checkrouter.sh script in order to report the routers state


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9fb2e20b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9fb2e20b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9fb2e20b

Branch: refs/heads/feature/systemvm-persistent-config
Commit: 9fb2e20b2f3b10350c608b281bf6c5c39b67caa0
Parents: 195cc4c
Author: wilderrodrigues <wrodrigues@schubergphilis.com>
Authored: Fri Feb 6 13:21:09 2015 +0100
Committer: wilderrodrigues <wrodrigues@schubergphilis.com>
Committed: Mon Feb 16 16:08:44 2015 +0100

----------------------------------------------------------------------
 .../debian/config/opt/cloud/templates/checkrouter.sh.templ   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9fb2e20b/systemvm/patches/debian/config/opt/cloud/templates/checkrouter.sh.templ
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/templates/checkrouter.sh.templ b/systemvm/patches/debian/config/opt/cloud/templates/checkrouter.sh.templ
index fbf4f0f..35ba766 100755
--- a/systemvm/patches/debian/config/opt/cloud/templates/checkrouter.sh.templ
+++ b/systemvm/patches/debian/config/opt/cloud/templates/checkrouter.sh.templ
@@ -44,10 +44,14 @@ then
     bumped="Bumped: YES"
 fi
 
-stat=`tail -n 1 [RROUTER_LOG] | grep "Status"`
+state="Status: BACKUP"
+isMaster=`grep -Po '(?<="redundant_master": ")[^"]*' /etc/cloudstack/cmdline.json`
 if [ $? -eq 0 ]
 then
-    echo "$stat&$bumped"
+    if [ "$isMaster" = true ] ; then
+        state="Status: MASTER"
+    fi
+    echo "$state&$bumped"
 fi
 
 if [ $nolock -eq 0 ]


Mime
View raw message