From 38d9f35c054e639625c5216b38217d1258e53cc5 Mon Sep 17 00:00:00 2001 From: Stephen Taylor Date: Mon, 5 Oct 2020 21:45:28 +0000 Subject: [PATCH] [ceph-osd] Don't try to prepare OSD disks that are already deployed This addresses an issue that can prevent some OSDs from being able to restart properly after they have been deployed. Some OSDs try to prepare their disks again on restart and end up crash looping. This change fixes that. Change-Id: I9edc1326c3544d9f3e8b6e3ff83529930a28dfc6 --- ceph-osd/Chart.yaml | 2 +- .../templates/bin/osd/ceph-volume/_init-with-ceph-volume.sh.tpl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ceph-osd/Chart.yaml b/ceph-osd/Chart.yaml index a97800f32..0646ccb73 100644 --- a/ceph-osd/Chart.yaml +++ b/ceph-osd/Chart.yaml @@ -15,6 +15,6 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Ceph OSD name: ceph-osd -version: 0.1.3 +version: 0.1.4 home: https://github.com/ceph/ceph ... diff --git a/ceph-osd/templates/bin/osd/ceph-volume/_init-with-ceph-volume.sh.tpl b/ceph-osd/templates/bin/osd/ceph-volume/_init-with-ceph-volume.sh.tpl index 4aceffae9..6cd9d5b8f 100644 --- a/ceph-osd/templates/bin/osd/ceph-volume/_init-with-ceph-volume.sh.tpl +++ b/ceph-osd/templates/bin/osd/ceph-volume/_init-with-ceph-volume.sh.tpl @@ -272,6 +272,7 @@ function osd_disk_prepare { if [[ ! -z "${OSD_ID}" ]]; then if ceph --name client.bootstrap-osd --keyring $OSD_BOOTSTRAP_KEYRING osd ls |grep -w ${OSD_ID}; then echo "Running bluestore mode and ${OSD_DEVICE} already bootstrapped" + CEPH_LVM_PREPARE=0 elif [[ $OSD_FORCE_REPAIR -eq 1 ]]; then echo "OSD initialized for this cluster, but OSD ID not found in the cluster, reinitializing" else