You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2015/02/16 17:40:28 UTC
[37/50] git commit: updated
refs/heads/feature/systemvm-persistent-config to 921f6e2
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/454f3e44
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/454f3e44
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/454f3e44
Branch: refs/heads/feature/systemvm-persistent-config
Commit: 454f3e445f5f3e8a6a9ea29f2929c98f73e19a89
Parents: a118e1b
Author: wilderrodrigues <wr...@schubergphilis.com>
Authored: Fri Feb 6 13:21:09 2015 +0100
Committer: wilderrodrigues <wr...@schubergphilis.com>
Committed: Fri Feb 6 13:21:09 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/454f3e44/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 ]