cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [26/50] git commit: updated refs/heads/master to 3c429ee
Date Tue, 17 Mar 2015 10:26:28 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/e6b3ee31
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e6b3ee31
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e6b3ee31

Branch: refs/heads/master
Commit: e6b3ee318c048ece6afde4c45c17b3652a59f3c0
Parents: 0a133c0
Author: wilderrodrigues <wrodrigues@schubergphilis.com>
Authored: Fri Feb 6 13:21:09 2015 +0100
Committer: wilderrodrigues <wrodrigues@schubergphilis.com>
Committed: Mon Mar 16 11:40:02 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/e6b3ee31/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