mirror of https://github.com/apache/cloudstack.git
CS-15970: Fix Redundant Router status for master and backup routers
Bug found when host is XenServer Fixes path from /root to /opt/cloud/bin for both XenServer and VMWare hosts Signed-off-by: Rohit Yadav <rohit.yadav@citrix.com> Signed-off-by: unknown <aprateek@aprateek-PC.(none)>
This commit is contained in:
parent
9dc685cefb
commit
718c281a87
|
|
@ -1880,7 +1880,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
|||
VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
|
||||
String controlIp = getRouterSshControlIp(cmd);
|
||||
result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null,
|
||||
"/root/checkrouter.sh ");
|
||||
"/opt/cloud/bin/checkrouter.sh ");
|
||||
|
||||
if (!result.first()) {
|
||||
s_logger.error("check router command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + " failed, message: " + result.second());
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ setup_redundant_router() {
|
|||
cp /root/redundant_router/arping_gateways.sh.templ $rrouter_bin_path/arping_gateways.sh
|
||||
cp /root/redundant_router/check_bumpup.sh $rrouter_bin_path/
|
||||
cp /root/redundant_router/disable_pubip.sh $rrouter_bin_path/
|
||||
cp /root/redundant_router/checkrouter.sh.templ /root/checkrouter.sh
|
||||
cp /root/redundant_router/checkrouter.sh.templ /opt/cloud/bin/checkrouter.sh
|
||||
sed -i "s/\[ROUTER_ID\]/$NAME/g" /etc/keepalived/keepalived.conf
|
||||
sed -i "s/\[ROUTER_IP\]/$GUEST_GW\/$GUEST_CIDR_SIZE/g" /etc/keepalived/keepalived.conf
|
||||
sed -i "s/\[BOARDCAST\]/$GUEST_BRD/g" /etc/keepalived/keepalived.conf
|
||||
|
|
@ -479,7 +479,7 @@ setup_redundant_router() {
|
|||
sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" $rrouter_bin_path/primary-backup.sh
|
||||
sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" $rrouter_bin_path/check_heartbeat.sh
|
||||
sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" $rrouter_bin_path/arping_gateways.sh
|
||||
sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" /root/checkrouter.sh
|
||||
sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" /opt/cloud/bin/checkrouter.sh
|
||||
chmod a+x $rrouter_bin_path/*.sh
|
||||
|
||||
sed -i "s/--exec\ \$DAEMON;/--exec\ \$DAEMON\ --\ --vrrp;/g" /etc/init.d/keepalived
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null
|
|||
if [ $? -eq 0 ]
|
||||
then
|
||||
is_redundant=1
|
||||
sudo /root/checkrouter.sh --no-lock|grep "Status: MASTER" > /dev/null 2>&1
|
||||
sudo /opt/cloud/bin/checkrouter.sh --no-lock|grep "Status: MASTER" > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
is_master=1
|
||||
|
|
|
|||
Loading…
Reference in New Issue