From dcdcadad22a406d565632a015522428dc24a67c4 Mon Sep 17 00:00:00 2001 From: Daian Cardoso Sganderlla Date: Thu, 7 Apr 2022 16:01:32 -0400 Subject: [PATCH] Add Ceph's mpath partition types Today StarlingX just checks for regular partition type while checking some partitions. Because of that, when using a mpath disk there are some cases that StarlingX will treat these partition as standard partitions, instead of Ceph's partitions. Test Plan: PASS: Install AIO-SX PASS: Install AIO-SX with one of the disks previously configured as an OSD Story: 2010046 Task: 45432 Signed-off-by: Daian Cardoso Sganderlla Change-Id: Ib63a48aacc790b266c2837cdd6eb58e412dc3490 --- bsp-files/kickstarts/pre_disk_setup_common.cfg | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bsp-files/kickstarts/pre_disk_setup_common.cfg b/bsp-files/kickstarts/pre_disk_setup_common.cfg index b5e48081..aca5fcde 100644 --- a/bsp-files/kickstarts/pre_disk_setup_common.cfg +++ b/bsp-files/kickstarts/pre_disk_setup_common.cfg @@ -151,8 +151,10 @@ else # Make a list of all the hard drives that are to be wiped WIPE_HDD="" # Partition type OSD has a unique globally identifier - CEPH_OSD_GUID="4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D" - CEPH_JOURNAL_GUID="45B0969E-9B03-4F30-B4C6-B4B80CEFF106" + CEPH_REGULAR_OSD_GUID="4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D" + CEPH_REGULAR_JOURNAL_GUID="45B0969E-9B03-4F30-B4C6-B4B80CEFF106" + CEPH_MPATH_OSD_GUID="4FBD7E29-8AE0-4982-BF9D-5A8D867AF560" + CEPH_MPATH_JOURNAL_GUID="45B0969E-8AE0-4982-BF9D-5A8D867AF560" # Check if we wipe OSDs if [ "$(curl -sf http://pxecontroller:6385/v1/ihosts/wipe_osds 2>/dev/null)" = "true" ]; then @@ -184,7 +186,7 @@ else for part_number in "${part_numbers[@]}"; do sgdisk_part_info=$(sgdisk -i $part_number $dev) part_type_guid=$(echo "$sgdisk_part_info" | grep "$part_type_guid_str" | awk '{print $4;}') - if [ "$part_type_guid" == $CEPH_OSD_GUID ]; then + if [ "$part_type_guid" == $CEPH_REGULAR_OSD_GUID -o "$part_type_guid" == $CEPH_MPATH_OSD_GUID ]; then wlog "OSD found on $dev, skipping wipe" wipe_dev="false" break @@ -258,7 +260,7 @@ do fi fi wlog "Wiping partition $part" - if [ $WIPE_CEPH_OSDS == "true" -a "$part_type_guid" == $CEPH_JOURNAL_GUID ]; then + if [[ $WIPE_CEPH_OSDS == "true" && ( "$part_type_guid" == $CEPH_REGULAR_JOURNAL_GUID || "$part_type_guid" == $CEPH_MPATH_JOURNAL_GUID ) ]]; then # Journal partitions require additional wiping. Based on the ceph-manage-journal.py # script in the integ repo (at the ceph/ceph/files/ceph-manage-journal.py location) # wiping 100MB of data at the beginning of the partition should be enough. We also