Subcloud local install - Failure to set instdev parameter when we use ks-setup.cfg
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Shrikumar Sharma |
Bug Description
Brief Description
-------
DC Debian: Subcloud local install - Failure to set instdev parameter when we use ks-setup.cfg
error:
Export %ks-early hook script /tmp/lat/
2022-11-14 23:40:52.367 kickstart ks-early info: UEFI Firmware execution
2022-11-14 23:40:52.384 kickstart ks-early info: *******
2022-11-14 23:40:52.386 kickstart ks-early info: *** Pre Partition - Volume Remove & Wipe Disk ***
2022-11-14 23:40:52.389 kic Waiting for disks to be available
2022-11-14 23:40:52.400 kickstart ks-early info: Disks became available
2022-11-14 23:40:52.403 kickstart ks-early info: Install traits: controller
2022-11-14 23:40:52.406 kickstart ks-early info: controller LAT size parameters: FSZ=32 BSZ=512 RSZ=20480 VSZ=20480
2022-11-14 23:40:52.409 kickstart ks-early info: controller /proc/cmdline:
2022-11-14 23:40:52.448 kickstart ks-early info: controller Controller Function
2022-11-14 23:40:52.449 kickstart ks-early info: controller Standard system
2022-11-14 23:40:52.476 kickstart ks-early warn: controller timezone not set ; 'timezone --nontp --utc UTC'
Error no kernel argument instdev=...
ks-setup.cfg
BOARD_VENDOR=$(cat /sys/devices/
BOARD_NAME=$(cat /sys/devices/
PRODUCT_NAME=$(cat /sys/devices/
wlog "BOARD_
wlog "BOARD_
wlog "PRODUCT_
if [[ ${PRODUCT_NAME} == *"ProLiant e910t"* ]]; then
rootfs_
elif [[ ${PRODUCT_NAME} == *"Proteus I_Mix"* ]]; then
rootfs_
elif [[ ${PRODUCT_NAME} == *"TRITON"* ]]; then
rootfs_
elif [[ ${PRODUCT_NAME} == *"PowerEdge XR11"* ]]; then
rootfs_
fi
boot_device=
wlog "rootfs_
wlog "boot_device=
subcloud disks - from install-values file:
[sysadmin@
rootfs_device: /dev/disk/
boot_device: /dev/disk/
Product name
sysadmin@
PowerEdge XR11
Severity
-------------
<Critical: System/Feature is not usable after the defect>
Steps to Reproduce
-------
Generate prestaged.iso (use the ks-setup.cfg script described above)
burn prestaged.iso into a USB
boot subcloud from USB
Expected Behavior
-----------------
Kickstart should be able to set the "instdev" parameter according to the PRODUCT_NAME
Actual Behavior
-----------------
It fails to set "instdev", then the install from USB fails
Reproducibility
-----------------
100% reproducible
System Configuration
-------
DC
Load info (eg: 2022-03-
-------
[sysadmin@
SW_VERSION="22.12"
BUILD_TARGET="Host Installer"
BUILD_TYPE="Formal"
BUILD_ID=
SRC_BUILD_
BUILD_BY="jenkins"
BUILD_NUMBER="159"
BUILD_HOST=
BUILD_DATE=
Last Pass
-----------
new test scenario.
Timestamp/Logs
-----------------
kickstart logs:
[ 17.379387] Buffer I/O error on dev sr0, logical block 0, async page read
[ 18.375406] attempt to access beyond end of device
[ 18.375406] sr0: rw=0, want=182248, limit=182240
Devices should be properly configured.
Mon Nov 14 23:40:52 UTC 2022
Export %ks-early hook script /tmp/lat/
2022-11-14 23:40:52.367 kickstart ks-early info: UEFI Firmware execution
2022-11-14 23:40:52.384 kickstart ks-early info: *******
2022-11-14 23:40:52.386 kickstart ks-early info: *** Pre Partition - Volume Remove & Wipe Disk ***
2022-11-14 23:40:52.389 kic Waiting for disks to be available
2022-11-14 23:40:52.400 kickstart ks-early info: Disks became available
2022-11-14 23:40:52.403 kickstart ks-early info: Install traits: controller
2022-11-14 23:40:52.406 kickstart ks-early info: controller LAT size parameters: FSZ=32 BSZ=512 RSZ=20480 VSZ=20480
2022-11-14 23:40:52.409 kickstart ks-early info: controller /proc/cmdline:
2022-11-14 23:40:52.448 kickstart ks-early info: controller Controller Function
2022-11-14 23:40:52.449 kickstart ks-early info: controller Standard system
2022-11-14 23:40:52.476 kickstart ks-early warn: controller timezone not set ; 'timezone --nontp --utc UTC'
Error no kernel argument instdev=...[ 19.507516] EXT4-fs (sdb5): 2 orphan inodes deleted
[ 19.512405] EXT4-fs (sdb5): recovery complete
[ 19.517884] EXT4-fs (sdb5): mounted filesystem with ordered data mode. Opts: (null)
Save install-fail.log to partition fluxdata /var (/dev/sdb5)
[ 31.540423] sysrq: Resetting
generate prestaged.iso script output logs:
generate prestaged.iso with ks-setup.cfg:
sudo ./gen-prestaged
/var/rootdirs/
mount: /var/rootdirs/
INFO: Generating prestage.iso from params:
INFO: Parameters:
INFO: COMMON_ARGS: initrd=/initrd instdate=
Warning: creating filesystem that does not conform to ISO-9660.
isohybrid: Warning: more than 1024 cylinders: 3682
isohybrid: Not all BIOSes will be able to boot this device
Note: we can see the the "INFO: Parameters" is empty.
gen-prestaged-
Alarms
--------------
n/a
Test Activity
--------------
Feature Testing
Workaround
---------------
use --param to define the boot and rootfs device
Changed in starlingx: | |
assignee: | nobody → Shrikumar Sharma (ssharma3) |
Changed in starlingx: | |
status: | New → In Progress |
Changed in starlingx: | |
importance: | Undecided → Medium |
tags: | added: stx.8.0 stx.distcloud stx.metal |
Reviewed: https:/ /review. opendev. org/c/starlingx /metal/ +/865207 /opendev. org/starlingx/ metal/commit/ 15e971b59e02042 ebac3f19bab197b 62a5b88693
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 15e971b59e02042 ebac3f19bab197b 62a5b88693
Author: Shrikumar Sharma <email address hidden>
Date: Mon Nov 21 23:13:41 2022 +0000
Fix failure to set instdev parameter when we use ks-setup.cfg
When we create the prestage iso with an external script,
ks-setup.cfg, we may not provide the rootfs_device or
boot_device parameter. This is a valid scenario where these
parameters are defined in ks-setup.cfg. An installation failure
is observed in this case.
The cause of the failure is that the prestage code is handled in
a pre-part hook. This commit moves it to a ks-early hook.
In this commit, a provision for the execution of a custom script
named ks-addon.cfg is also made. This script is a bash script
that must execute in the last post hook.
Test Plan:
PASS: Verify that the installation succeeds when the rootfs
and boot device parameters are only specified via
the ks-setup.cfg.
PASS: Verify that the external script, ks-addon.cfg, is executed
after the install and configurations are done.
PASS: Verify that the logs from the execution of ks-addon.cfg
are present in kickstart.log.
Closes-bug: 1997305
Signed-off-by: Shrikumar Sharma <email address hidden> 7cf0609ebee6aac 45671e97987
Change-Id: Ica1735aef3ab45