Merge "[ceph-osd] Fix a bug with DB orphan volume removal"

This commit is contained in:
Zuul 2021-01-19 22:35:58 +00:00 committed by Gerrit Code Review
commit be1c673fba
2 changed files with 2 additions and 2 deletions

View File

@ -15,6 +15,6 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Ceph OSD
name: ceph-osd
version: 0.1.16
version: 0.1.17
home: https://github.com/ceph/ceph
...

View File

@ -207,7 +207,7 @@ function prep_device {
fi
logical_volumes="$(lvs --noheadings -o lv_name ${VG} | xargs)"
for volume in ${logical_volumes}; do
data_volume=$(echo ${volume} | sed -E -e 's/db|wal/lv/g')
data_volume=$(echo ${volume} | sed -E -e 's/-db-|-wal-/-lv-/g')
if [[ -z $(lvs --noheadings -o lv_name -S "lv_name=${data_volume}") ]]; then
# DB or WAL volume without a corresponding data volume, remove it
lvremove -y /dev/${VG}/${volume}