The genesis boot script sleeps 20 seconds unconditionally with the comment
"wait for NIC initialization", but that wait exists solely for System P LE
(ppc64) hardware discovery -- the surrounding section is explicitly ppc64
only. Every x86_64 and aarch64 node therefore pays a needless 20s delay on
each genesis boot.
Move the sleep inside the `[[ ${ARCH} =~ ppc64 ]]` block so only ppc64 waits.
Applied to the base script and both dracut_105 (el, ubuntu) variants.
Recovered from the unmerged lenovobuild branch (original d0916d9d).
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
(cherry picked from commit 32149f10f4)
Building the genesis netboot image on a usr-merged host (openSUSE Leap
15, and increasingly EL) leaves the extracted root with /bin, /sbin,
/lib and /lib64 as real directories holding the same files that already
live under /usr/*. rpm then sees each binary twice (e.g. fs/bin/bash and
fs/usr/bin/bash) and aborts the install of xCAT-genesis-base with dozens
of file conflicts, so the package cannot be installed. After unpacking
the dracut image, fold those top-level directories into /usr and replace
them with relative symlinks, matching a normal usr-merged layout. The
loop is a no-op when the image already ships them as symlinks, so EL
builds are unaffected.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 0f100de5ac)
A 2.17 -> 2.18 management-node upgrade installs xCAT-genesis-base 2.18 over the
2.14.5 payload that 2.17 shipped, and aborted in three ways that only surface on
the upgrade path (a fresh EL10 install never hit them):
1. usr/lib/dracut/hooks changed type: 2.14.5 shipped it as a real directory,
modern dracut (EL8+) makes it a symlink to ../../../var/lib/dracut/hooks. RPM
refuses to replace a directory with a symlink across an upgrade ("file ...
conflicts"). The %pretrans removal does not help because rpm computes the
conflict from package metadata, not the live filesystem. Materialize the
symlink back into a real directory (with the hook contents) in %install so the
payload type matches the installed 2.14.5 layout.
2. The %pretrans Lua used table.getn()/unpack(), removed in Lua 5.2+, so on
EL8/EL9 (and any upgrade where the dirs exist) the scriptlet died with
"attempt to call a nil value (field getn)". Use #t / table.unpack.
3. The %post ran "mknb" unconditionally; during a full "dnf update xCAT" xcatd is
stopped, so mknb cannot connect and exited non-zero, failing the whole
transaction. Tolerate the failure and leave the genesis-base-updated marker so
the image is rebuilt once xcatd is back.
(cherry picked from commit f421c2b30c)
The genesis-base deb version was frozen at an ancient value, below the lower
bound required by xcat-genesis-scripts (xcat-genesis-base-amd64 >= 2.13.10).
apt therefore refused to install it and its dependents. Bump the version to
track current xCAT so the dependency resolves.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit d8953b0ea6)
This fixes a problem where the dracut image was pulling artifacts from
the build host and not the mock image, e.g. building for EL9 in EL10.
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
This enhancement removes the requirement for the following packages:
* btrfs and related tools
* ntp and related tools
* deprecated/removed rsyslog library
So that the xCAT-genesis-builder can build base netboot images from a RHEL8 system. There are some additional light formatting changes here as well.