Merge "Add rook provisioned osd check in kickstart for restore case"
This commit is contained in:
commit
b6c6b4da6e
@ -167,6 +167,13 @@ else
|
|||||||
# Avoid wiping ceph osds if sysinv tells us so
|
# Avoid wiping ceph osds if sysinv tells us so
|
||||||
if [ ${WIPE_CEPH_OSDS} == "false" ]; then
|
if [ ${WIPE_CEPH_OSDS} == "false" ]; then
|
||||||
wipe_dev="true"
|
wipe_dev="true"
|
||||||
|
|
||||||
|
pvs | grep -q "$dev *ceph"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
wlog "skip rook provisoned disk $dev"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
part_numbers=( `parted -s $dev print | awk '$1 == "Number" {i=1; next}; i {print $1}'` )
|
part_numbers=( `parted -s $dev print | awk '$1 == "Number" {i=1; next}; i {print $1}'` )
|
||||||
# Scanning the partitions looking for CEPH OSDs and
|
# Scanning the partitions looking for CEPH OSDs and
|
||||||
# skipping any disk found with such partitions
|
# skipping any disk found with such partitions
|
||||||
@ -178,7 +185,15 @@ else
|
|||||||
wipe_dev="false"
|
wipe_dev="false"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pvs | grep -q -e "${dev}${part_number} *ceph" -e "${dev}p${part_number} *ceph"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
wlog "Rook OSD found on $dev$part_number, skip wipe"
|
||||||
|
wipe_dev="false"
|
||||||
|
break
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$wipe_dev" == "false" ]; then
|
if [ "$wipe_dev" == "false" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user