From d29efccdbb7a8397515346de72e075de02288ff2 Mon Sep 17 00:00:00 2001 From: Stephen Taylor Date: Thu, 31 Aug 2023 07:51:43 -0600 Subject: [PATCH] [ceph-osd] Add disk zap to OSD init forced repair case There exists a case for bluestore OSDs where the OSD init process detects that an OSD has already been initialized in the deployed Ceph cluster, but the cluster osdmap does not have an entry for it. This change corrects this case to zap and reinitialize the disk when OSD_FORCE_REPAIR is set to 1. It also clarifies a log message in this case when OSD_FORCE_REPAIR is 0 to state that a manual repair is necessary. Change-Id: I2f00fa655bf5359dcc80c36d6c2ce33e3ce33166 --- ceph-osd/Chart.yaml | 2 +- .../osd/ceph-volume/_init-ceph-volume-helper-bluestore.sh.tpl | 3 ++- releasenotes/notes/ceph-osd.yaml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ceph-osd/Chart.yaml b/ceph-osd/Chart.yaml index f5a617da4..cd7b0d5e4 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.46 +version: 0.1.47 home: https://github.com/ceph/ceph ... diff --git a/ceph-osd/templates/bin/osd/ceph-volume/_init-ceph-volume-helper-bluestore.sh.tpl b/ceph-osd/templates/bin/osd/ceph-volume/_init-ceph-volume-helper-bluestore.sh.tpl index b08354802..b1ce29e4c 100644 --- a/ceph-osd/templates/bin/osd/ceph-volume/_init-ceph-volume-helper-bluestore.sh.tpl +++ b/ceph-osd/templates/bin/osd/ceph-volume/_init-ceph-volume-helper-bluestore.sh.tpl @@ -84,8 +84,9 @@ function determine_what_needs_zapping { 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" + ZAP_DEVICE=1 else - echo "OSD initialized for this cluster, but OSD ID not found in the cluster" + echo "OSD initialized for this cluster, but OSD ID not found in the cluster, repair manually" fi fi else diff --git a/releasenotes/notes/ceph-osd.yaml b/releasenotes/notes/ceph-osd.yaml index a4c5fe6b6..2608cebe6 100644 --- a/releasenotes/notes/ceph-osd.yaml +++ b/releasenotes/notes/ceph-osd.yaml @@ -47,4 +47,5 @@ ceph-osd: - 0.1.44 Update Ceph to 17.2.6 - 0.1.45 Extend the ceph-osd post-apply job PG wait - 0.1.46 Use Helm toolkit functions for Ceph probes + - 0.1.47 Add disk zap to OSD init forced repair case ...