Prestaged.iso install resumes to normal boot when the rootfs_device

Bug #2002999 reported by Shrikumar Sharma
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Shrikumar Sharma

Bug Description

Brief Description

DC Debian - Prestaged.iso install resumes to normal boot when the rootfs_device does not match with the one defined in the prestaged.iso.

Severity

<Minor: System/Feature is usable with minor issue>

Steps to Reproduce

Generate a prestaged.iso, either using ks-setup or roots_device/boot_device to configure the target install disks (make sure to use a subcloud with disks which do not match with the configurations defined in the prestaged.iso)

For example, we can use the ks-setup.cfg and the subcloud configuration bellow:

BOARD_VENDOR=$(cat /sys/devices/virtual/dmi/id/board_vendor)
BOARD_NAME=$(cat /sys/devices/virtual/dmi/id/board_name)
PRODUCT_NAME=$(cat /sys/devices/virtual/dmi/id/product_name)wlog "BOARD_VENDOR=${BOARD_VENDOR}"
wlog "BOARD_NAME=${BOARD_NAME}"
wlog "PRODUCT_NAME=${PRODUCT_NAME}"# Setup rootfs/boot device based on server type
if [[ ${PRODUCT_NAME} == *"ProLiant e910t"* ]]; then
    rootfs_device=/dev/nvme1n1
elif [[ ${PRODUCT_NAME} == *"Proteus I_Mix"* ]]; then
    rootfs_device=/dev/nvme0n1
elif [[ ${PRODUCT_NAME} == *"TRITON"* ]]; then
    rootfs_device=/dev/nvme0n1
elif [[ ${PRODUCT_NAME} == *"PowerEdge XR11"* ]]; then
    rootfs_device=/dev/disk/by-path/pci-0000:00:17.0-ata-1.0
fi
boot_device=${rootfs_device}
wlog "rootfs_device=${rootfs_device}"
wlog "boot_device=${boot_device}"
subcloud_x disks:

software_version: 22.12
bootstrap_interface: eno3
bootstrap_address: 2620:10a:a001:d41::55
bootstrap_address_prefix: 64
#bmc_address: 2620:10a:a001:d42:3a68:ddff:fe50:5271
bmc_address: 2620:10a:a001:d42::55
bmc_username: sysadmin
#nexthop_gateway: 2620:10a:a001:a103::1094
##network_address: 2620:10a:b001:a103::0
##network_mask: 64
##0 - Standard Controller, Serial Console
##1 - Standard Controller, Graphical Console
##2 - AIO, Serial Console
##3 - AIO, Graphical Console
##4 - AIO Low-latency, Serial Console
##5 - AIO Low-latency, Graphical Console
install_type: 3
console_type: tty0
#bootstrap_vlan: 103
rootfs_device: /dev/disk/by-path/pci-0000:03:00.0-scsi-0:2:0:0
boot_device: /dev/disk/by-path/pci-0000:03:00.0-scsi-0:2:0:0
wait_for_timeout: 3600
no_check_certificate: True
Note: The disk path of the subcloud does not match with any confuguration we have on ks-setup.cfg

Expected Behavior

The prestaged.iso install should halt with a message saying that the roofs_device/boot_device/inst_dev was not set.
The boot console should remain active, then user can debug and collect the error logs.

Actual Behavior

The prestaged.iso install halts with a message saying that the inst_dev is invalid and immediately resumes the install to normal boot.

Reproducibility

100% reproducible

System Configuration

DC

Load info (eg: 2022-03-10_20-00-07)

SW_VERSION="22.12"
BUILD_TARGET="Host Installer"
BUILD_TYPE="Formal"
BUILD_ID="2022-12-09_22-00-10"
SRC_BUILD_ID="23"JOB="wrcp-22.12-debian"
BUILD_BY="jenkins"
BUILD_NUMBER="35"
BUILD_HOST="yow-wrcp-lx.wrs.com"
BUILD_DATE="2022-12-10 03:00:10 +0000"
Last Pass

new test scenario.

Timestamp/Logs

n/a

Alarms

n/a

Test Activity

Feature Testing

Workaround

n/a

Changed in starlingx:
assignee: nobody → Shrikumar Sharma (ssharma3)
Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to metal (master)

Reviewed: https://review.opendev.org/c/starlingx/metal/+/870552
Committed: https://opendev.org/starlingx/metal/commit/ea1b8629e67dcf9a047ad2175e9f720d7190205b
Submitter: "Zuul (22348)"
Branch: master

commit ea1b8629e67dcf9a047ad2175e9f720d7190205b
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: I1d4ef10ce741b98455c65467367448e05f37fd64
    Signed-off-by: Shrikumar Sharma <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
importance: Medium → Low
tags: added: stx.8.0 stx.distcloud
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.