Fix for detection of existing file system in the prestage process
During prestage with a prestage iso, the existing filesystem must
not be overwritten if an installation with an install_guid exists,
when the force_install parameter is not specified.
However, when logical volumes are used, the check for a valid
installation does not succeed, resulting in the installer
overwriting the existing installation.
This commit fixes this issue by inspecting the volume for an
installation. This commit also ensures that if an invalid storage
device is specified for root device, then a failure is reported
and the system breaks into a bash shell.
Test Plan:
PASS: Verify that the installer does not overwrite an existing
installation with an install_guid.
PASS: Verify that the installer reports an error and breaks into
a bash shell if an invalid storage device is specified for root
device.
Reviewed: https:/ /review. opendev. org/c/starlingx /metal/ +/870552 /opendev. org/starlingx/ metal/commit/ ea1b8629e67dcf9 a047ad2175e9f72 0d7190205b
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit ea1b8629e67dcf9 a047ad2175e9f72 0d7190205b
Author: Shrikumar Sharma <email address hidden>
Date: Mon Jan 16 14:34:12 2023 +0000
Fix for detection of existing file system in the prestage process
During prestage with a prestage iso, the existing filesystem must
not be overwritten if an installation with an install_guid exists,
when the force_install parameter is not specified.
However, when logical volumes are used, the check for a valid
installation does not succeed, resulting in the installer
overwriting the existing installation.
This commit fixes this issue by inspecting the volume for an
installation. This commit also ensures that if an invalid storage
device is specified for root device, then a failure is reported
and the system breaks into a bash shell.
Test Plan:
PASS: Verify that the installer does not overwrite an existing
installation with an install_guid.
PASS: Verify that the installer reports an error and breaks into
a bash shell if an invalid storage device is specified for root
device.
Closes-Bug: 2002999
Change-Id: I1d4ef10ce741b9 8455c6546736744 8e05f37fd64
Signed-off-by: Shrikumar Sharma <email address hidden>