Fix reinstall of worker nodes
When the wipedisk code was updated, there were some changes that had to be used only on controllers but the code was doing the same thing on all the node types. In this review we add the proper branching of the code based on the node type. Closes-Bug: 1912623 Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com> Change-Id: I91f68a7894da51a7d64602254a68cf7acbd4bcf2
This commit is contained in:
parent
95e5906a6b
commit
32fbc7e5aa
|
@ -100,11 +100,14 @@ fi
|
|||
BACKUP_PART_GUID="BA5EBA11-0000-1111-2222-000000000002"
|
||||
part_type_guid_str="Partition GUID code"
|
||||
|
||||
# get the nodetype variable to check later if this node is a controller
|
||||
. /etc/platform/platform.conf
|
||||
|
||||
for dev in $WIPE_HDD
|
||||
do
|
||||
if [[ -e $dev ]]
|
||||
then
|
||||
if [ "$dev" == "$rootfs" ]
|
||||
if [[ "$dev" == "$rootfs" && "${nodetype}" == "controller" ]]
|
||||
then
|
||||
part_numbers=( $(parted -s $dev print | awk '$1 == "Number" {i=1; next}; i {print $1}') )
|
||||
for part_number in "${part_numbers[@]}"; do
|
||||
|
|
Loading…
Reference in New Issue