From 12d564b37db9b70562f914e8427f0a27e9485e61 Mon Sep 17 00:00:00 2001 From: Pedro Henrique Linhares Date: Thu, 17 Jun 2021 16:21:57 -0300 Subject: [PATCH] On AIO-DX only start Ceph MON and MDS via MTC Defer start of Ceph ODSs to SM in order to avoid a race condition between MTC and SM when starting OSDs. This is only required for AIO-DX where SM manages the floating monitor and OSDs. Closes-Bug: 1932351 Signed-off-by: Pedro Henrique Linhares Change-Id: Ia718ae696d8158e63660ee54d226271a6bcb476e --- ceph/ceph/files/ceph.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ceph/ceph/files/ceph.sh b/ceph/ceph/files/ceph.sh index 53e5a114a..e646a149f 100644 --- a/ceph/ceph/files/ceph.sh +++ b/ceph/ceph/files/ceph.sh @@ -22,8 +22,18 @@ logecho () start () { - logecho "Starting ceph services..." - ${INITDIR}/ceph start >> ${LOGFILE} 2>&1 + SERVICES="" + if [[ "$system_type" == "All-in-one" ]] && [[ "$system_mode" == "duplex" ]]; then + # In an AIO-DX configuration SM manages the floating MON and OSDs. Here + # we defer starting OSDs directly via the init script to allow SM to + # start them at the appropriate time. This will eliminate a race between + # MTC and SM starting OSDs simultaneously. Continue to start MON/MDS + # service here so that MDS is operational after the monitor is up. + SERVICES="mon mds" + fi + + logecho "Starting ceph ${SERVICES} services..." + ${INITDIR}/ceph start ${SERVICES} >> ${LOGFILE} 2>&1 RC=$? if [ ! -f ${CEPH_FILE} ]; then