Merge "Fix AIO-DX Uncontrolled Swact ceph-mon failure"
This commit is contained in:
commit
d3a2211acd
@ -49,6 +49,8 @@ if [ "${system_type}" == "All-in-one" ] && [ "${system_mode}" == "duplex" ]; the
|
|||||||
CEPH_LAST_ACTIVE_CONTROLLER_0_FLAG="${CEPH_MON_LIB_PATH}/.last_ceph_mon_active_controller_0"
|
CEPH_LAST_ACTIVE_CONTROLLER_0_FLAG="${CEPH_MON_LIB_PATH}/.last_ceph_mon_active_controller_0"
|
||||||
CEPH_LAST_ACTIVE_CONTROLLER_1_FLAG="${CEPH_MON_LIB_PATH}/.last_ceph_mon_active_controller_1"
|
CEPH_LAST_ACTIVE_CONTROLLER_1_FLAG="${CEPH_MON_LIB_PATH}/.last_ceph_mon_active_controller_1"
|
||||||
CEPH_LAST_ACTIVE_CONTROLLER_FLAG="${CEPH_MON_LIB_PATH}/.last_ceph_mon_active_${HOSTNAME/-/_}"
|
CEPH_LAST_ACTIVE_CONTROLLER_FLAG="${CEPH_MON_LIB_PATH}/.last_ceph_mon_active_${HOSTNAME/-/_}"
|
||||||
|
|
||||||
|
CEPH_MON_SHUTDOWN_COMPLETE="${CEPH_MON_LIB_PATH}/.ceph_mon_shutdown_complete"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BINDIR=/usr/bin
|
BINDIR=/usr/bin
|
||||||
@ -181,7 +183,13 @@ can_start_ceph_mon ()
|
|||||||
else
|
else
|
||||||
local CEPH_OTHER_ACTIVE_CONTROLLER_FLAG="${CEPH_LAST_ACTIVE_CONTROLLER_0_FLAG}"
|
local CEPH_OTHER_ACTIVE_CONTROLLER_FLAG="${CEPH_LAST_ACTIVE_CONTROLLER_0_FLAG}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "${CEPH_OTHER_ACTIVE_CONTROLLER_FLAG}" ]; then
|
if [ -f "${CEPH_OTHER_ACTIVE_CONTROLLER_FLAG}" ]; then
|
||||||
|
|
||||||
|
if [ -f "${CEPH_MON_SHUTDOWN_COMPLETE}" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Verify drbd-cephmon status
|
# Verify drbd-cephmon status
|
||||||
for times in {9..0}; do
|
for times in {9..0}; do
|
||||||
is_drbd_cephmon_in_sync
|
is_drbd_cephmon_in_sync
|
||||||
@ -284,6 +292,8 @@ start ()
|
|||||||
# Remove old flags
|
# Remove old flags
|
||||||
rm -f "${CEPH_LAST_ACTIVE_CONTROLLER_0_FLAG}"
|
rm -f "${CEPH_LAST_ACTIVE_CONTROLLER_0_FLAG}"
|
||||||
rm -f "${CEPH_LAST_ACTIVE_CONTROLLER_1_FLAG}"
|
rm -f "${CEPH_LAST_ACTIVE_CONTROLLER_1_FLAG}"
|
||||||
|
rm -f "${CEPH_MON_SHUTDOWN_COMPLETE}"
|
||||||
|
|
||||||
# Create new flag
|
# Create new flag
|
||||||
touch "${CEPH_LAST_ACTIVE_CONTROLLER_FLAG}"
|
touch "${CEPH_LAST_ACTIVE_CONTROLLER_FLAG}"
|
||||||
fi
|
fi
|
||||||
@ -292,9 +302,15 @@ start ()
|
|||||||
|
|
||||||
stop ()
|
stop ()
|
||||||
{
|
{
|
||||||
|
local service="$1"
|
||||||
|
|
||||||
wlog "-" INFO "Ceph STOP $1 command received."
|
wlog "-" INFO "Ceph STOP $1 command received."
|
||||||
with_service_lock "$1" ${CEPH_SCRIPT} stop $1
|
with_service_lock "$1" ${CEPH_SCRIPT} stop $1
|
||||||
wlog "-" INFO "Ceph STOP $1 command finished."
|
wlog "-" INFO "Ceph STOP $1 command finished."
|
||||||
|
|
||||||
|
if [ "${service}" == "mon" ] && [ "${system_type}" == "All-in-one" ] && [ "${system_mode}" == "duplex" ]; then
|
||||||
|
touch "${CEPH_MON_SHUTDOWN_COMPLETE}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
restart ()
|
restart ()
|
||||||
@ -304,7 +320,8 @@ restart ()
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
wlog "-" INFO "Ceph RESTART $1 command received."
|
wlog "-" INFO "Ceph RESTART $1 command received."
|
||||||
with_service_lock "$1" ${CEPH_SCRIPT} restart $1
|
stop "$1"
|
||||||
|
start "$1"
|
||||||
wlog "-" INFO "Ceph RESTART $1 command finished."
|
wlog "-" INFO "Ceph RESTART $1 command finished."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user