Updated Branches: refs/heads/4.2-forward 3dc8b8863 -> 8451d3532
CLOUDSTACK-4601: Add PATH for cron job of check_heartbeat.sh Also fix a typo in the script template. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8451d353 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8451d353 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8451d353 Branch: refs/heads/4.2-forward Commit: 8451d353241ccc03ecfb234bd5b38f9625fc80dd Parents: 3dc8b88 Author: Sheng Yang <[email protected]> Authored: Tue Sep 3 16:51:13 2013 -0700 Committer: Sheng Yang <[email protected]> Committed: Tue Sep 3 16:54:53 2013 -0700 ---------------------------------------------------------------------- patches/systemvm/debian/config/etc/init.d/cloud-early-config | 2 +- .../debian/config/root/redundant_router/check_heartbeat.sh.templ | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8451d353/patches/systemvm/debian/config/etc/init.d/cloud-early-config ---------------------------------------------------------------------- diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config index d847c24..88ecc11 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -848,7 +848,7 @@ setup_redundant_router() { crontab -l|grep "check_heartbeat.sh" if [ $? -ne 0 ] then - (crontab -l; echo "*/1 * * * * $rrouter_bin_path/check_heartbeat.sh 2>&1 > /dev/null") | crontab + (crontab -l; echo -e "SHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n*/1 * * * * $rrouter_bin_path/check_heartbeat.sh 2>&1 > /dev/null") | crontab fi } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8451d353/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ ---------------------------------------------------------------------- diff --git a/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ b/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ index 7a980bd..1a390e6 100755 --- a/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ +++ b/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ @@ -22,7 +22,7 @@ then lasttime=$(cat [RROUTER_BIN_PATH]/keepalived.ts2) thistime=$(cat [RROUTER_BIN_PATH]/keepalived.ts) diff=$(($thistime - $lasttime)) - if [ $diff -lt 30] + if [ $diff -lt 30 ] then echo Keepalived process is dead! >> [RROUTER_LOG] service keepalived stop >> [RROUTER_LOG] 2>&1
