Debian: Properly handle wiping Ceph OSDs in kickstarts

Restore equivalent functionality as found in the CentOS kickstarts:
 - Remove code that zaps all disks except for the install disk
 - For disks/partitions that should be wiped, allow dd to wipe critical
   areas of the disk/partition.
 - Allow fluxdata partition to be wiped.
 - Update log message for more accuracy relating to clean up of LAT
   specific partitions: otaroot/otaboot

Test Plan:
 - Fully install/provision AIO-SX node with Ceph storage enabled and
   install ISO with this kickstart update
 - Confirmed that post-install OSDs are preserved and the install disk
   is as expected.
 - Confirmed post-bootstrap that the OSDs are detected and wiped via the
   bootstrap playbook

Change-Id: I547aea6c85d82b9cc792e60d69a2d23c95bb36a0
Closes-Bug: #1989666
Signed-off-by: Robert Church <robert.church@windriver.com>
This commit is contained in:
Robert Church 2022-09-15 00:00:49 -05:00
parent 03d1d9642c
commit 76d1c7e4b2
1 changed files with 4 additions and 16 deletions

View File

@ -1221,10 +1221,6 @@ do
ilog "skipping ${part_name} on ${dev}${part_number}"
continue
;;
"'fluxdata'")
ilog "skipping ${part_name} on ${dev}${part_number}"
continue
;;
*)
dlog "wipe candidate ${part_name} on ${dev}${part_number}"
;;
@ -1310,9 +1306,9 @@ do
dd if=/dev/zero of=$part bs=1M count=100 2>/dev/null
dd if=/dev/zero of=$part bs=1M count=100 seek=$(( `blockdev --getsz $part` / (1024 * 2) - 100 )) 2>/dev/null
else
ilog "STUBBED Wiping ${part_name} on ${part} start and end with dd"
# dd if=/dev/zero of=$part bs=512 count=34 2>/dev/null
# dd if=/dev/zero of=$part bs=512 count=34 seek=$((`blockdev --getsz $part` - 34)) 2>/dev/null
ilog "Wiping ${part_name} on ${part} start and end with dd"
dd if=/dev/zero of=$part bs=512 count=34 2>/dev/null
dd if=/dev/zero of=$part bs=512 count=34 seek=$((`blockdev --getsz $part` - 34)) 2>/dev/null
fi
done
@ -1323,15 +1319,7 @@ do
fi
done
# Zap all disks except for the install disk
for dev in $STOR_DEVS; do
if [ ${dev} != "${by_dev}" ] ; then
ilog "Zapping ${dev}"
sgdisk -Z ${dev}
fi
done
ilog "Destroy otaroot partitions on root disk"
ilog "Ensure any LAT installer root/boot partitions are zapped/wiped"
for oldrootlabel in otaroot otaroot_1 otaroot_b otaroot_b_1
do
oldrootpart=$(blkid --label $oldrootlabel)