src/daemon: add entrypoint for ceph-volume to mount OSDs only
Adds: "-e CEPH_DAEMON=OSD_CEPH_VOLUME_ACTIVATE_ONLY" . After osd.id lvm is (unlocked)+mounted, the entrypoint calls stayalive in order to stay running without starting ceph-osd service. This entrypoint enables maintenance of OSDs in containerized_deployment.
Closes: BZ - 1811910
Signed-off-by: utp887 [email protected]
@dsavineau this is what I had in mind for a 'maintenance' entrypoint, where we would be able to run ceph-objectstore-tool/ceph-bluestore-tool.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Would a change like this make more sense? If so I can push another PR.
diff --git a/src/daemon/entrypoint.sh.in b/src/daemon/entrypoint.sh.in
index 6b1355e9..46447376 100755
--- a/src/daemon/entrypoint.sh.in
+++ b/src/daemon/entrypoint.sh.in
@@ -100,6 +100,14 @@ case "$CEPH_DAEMON" in
source /opt/ceph-container/bin/osd_volume_activate.sh
osd_volume_activate
;;
+ osd_ceph_volume_shell)
+ ami_privileged
+ # shellcheck disable=SC1091
+ # TAG: osd_ceph_volume_activate
+ NO_OSD_START=true
+ source /opt/ceph-container/bin/osd_volume_activate.sh
+ osd_volume_activate
+ ;;
mds)
# TAG: mds
source /opt/ceph-container/bin/start_mds.sh
diff --git a/src/daemon/osd_scenarios/osd_volume_activate.sh b/src/daemon/osd_scenarios/osd_volume_activate.sh
index 275b31af..9c4b6b98 100644
--- a/src/daemon/osd_scenarios/osd_volume_activate.sh
+++ b/src/daemon/osd_scenarios/osd_volume_activate.sh
@@ -125,5 +125,10 @@ function osd_volume_activate {
# LimitNOFILE=1048576
# LimitNPROC=1048576
ulimit -n 1048576 -u 1048576
- exec /usr/bin/ceph-osd "${DAEMON_OPTS[@]}" -i "${OSD_ID}"
+
+ if [[ "$NO_OSD_START" == "true" ]]; then
+ /bin/bash
+ else
+ exec /usr/bin/ceph-osd "${DAEMON_OPTS[@]}" -i "${OSD_ID}"
+ fi
}