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.
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