2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-30 14:55:16 +00:00
Commit Graph

243 Commits

Author SHA1 Message Date
Daniel Hilst eb30d2e92a fix(xcat-core): the Genesis build-root package list and payload check can only be read by evaluating shell
builddeb-genesis-base built its package list inline, between apt-get
update and apt-get install. A test could reach the list only by cutting
the REQUIRED_PACKAGES assignment out of the script and evaluating it.
It could not reach the choice between renamed packages (bind9-dnsutils
or dnsutils, util-linux-extra or util-linux) at all. The payload check
in verify-genesis-payload was bash, so a test could only run the script
and read its stderr.

XCAT::GenesisBuildRoot::required_packages() now returns the list for a
dpkg architecture. A code ref says which packages the release carries;
the default asks apt-cache. builddeb-genesis-base calls it at the same
point in the build and installs the same packages.

XCAT::GenesisPayload holds the mandatory-command list and the payload
check. verify-genesis-payload runs its main() and keeps the same
arguments, exit codes and messages. buildrpms.pl stages the module
beside the script. Both modules use core Perl only, because the build
root has perl-base and nothing more.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-24 17:28:04 -03:00
Daniel Hilst 646b57c123 Merge master into fix/ubuntu-genesis-native-sbuild
master changed the same three files this branch changes, so the pull request could not
merge. Conflicts and how each was resolved:

xCAT-genesis-builder/builddeb-genesis-base. Both sides teach the build root to cope with
a package whose name moved between releases. master added optional_packages(), which
keeps a package only where apt has a candidate, and called it for util-linux-extra. This
branch added add_first_available(), which takes the first name apt carries and fails when
it carries none, and calls it for bind9-dnsutils/dnsutils and util-linux-extra/util-linux,
plus add_if_available() for tzdata-legacy. The branch covers master's case and two more,
so its helpers are kept and optional_packages() goes with its only caller. Every other
master change to this file, including the DHCP client fix, is preserved.

xCAT-test/unit/genesis_payload_verification.t. master has four assertions this branch does
not: two payloads missing an absolute path. Its version is kept. The branch replaced
plan skip_all with a fail(), because skipping covers nothing when the file under test is
the gate itself, and that change is applied to master's version.

xCAT-test/unit/genesis_ubuntu_build_root.t. master's added assertions drive
optional_packages() directly, which the resolved builder no longer has. This branch's
version matches the implementation that survives, and it already dies rather than skipping
when the builder is missing, so it is kept whole.

prove -j4 -r xCAT-test/unit passes: 212 files, 5892 tests.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-18 07:56:24 -03:00
Daniel Hilst 2f715ac371 Merge pull request #7818 from VersatusHPC/release/2.19-rc1
ci(xcat-core): Fixes to get CI running for all 2.19 targets
2026-09-17 18:18:48 -03:00
Daniel Hilst eb37cd6e20 fix(xcat-core): naming util-linux-extra stops the Genesis build on jammy
REQUIRED_PACKAGES named util-linux-extra for every release. focal and jammy
have no such package -- apt reports "Candidate: (none)" -- so apt-get install
exits non-zero and, under set -euo pipefail, the build stops before dracut
runs. hwclock is in util-linux there, which is essential and already present.

optional_packages() keeps a package only where apt has a candidate for it, and
util-linux-extra goes through it. The unconditional list keeps isc-dhcp-client
and ifenslave, which every release has and neither of which the build root
carries by itself.

The call to verify-genesis-payload goes with it. That script is added by the
genesis payload branch, not this one, so the line stopped the build at the
point it was meant to guard.

Also corrects the plan count and a dereference in the test committed before
this one.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-16 18:03:52 -03:00
Daniel Hilst b91795a8f4 test(xcat-core): a failed extraction in thirteen test files stops the whole suite
Thirteen test files this branch adds call BAIL_OUT at fifty-one places:
an extraction that stopped matching, a fixture that is not there, a
harness that wrote no log. prove stops every remaining file on a
bail-out, not only the file that called it, so one of them hides the
results of every test that would have run after it. die is just as loud
and costs only its own file.

Fifteen comments the branch added also carried the incident rather than
the constraint. Three pasted an error transcript, five traced a failure
from a macro or a missing file out to a node that never boots, and the
rest counted call sites, package sizes or dracut build numbers. Each now
states the one fact the reader cannot re-derive from the code.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-14 08:46:57 -03:00
Daniel Hilst 61fdf385bc test(xcat-core): the Genesis build-root test stops the whole suite, and its comments over-explain
genesis_ubuntu_build_root.t called BAIL_OUT at four places where an
extraction stopped matching. prove stops every remaining file on a
bail-out, so one stale regex in this file hides the results of the tests
that would have run after it. die is just as loud and costs only this
file.

The branch also states one fact in four places. That dracut copies the
kernel out of the root it runs in appears in the builddebs.pl header, in
its Genesis section, in BuildUtils.pm and in the builder, each time with
the incident that produced it. The chroot stage directory is explained
twice, once at its declaration and again at its only use. Each fact now
stands where the reader meets it, without the bug report around it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-14 08:27:58 -03:00
Daniel Hilst 915d8364b5 fix(xcat-core): two Genesis builds in different chroots share one directory
The sbuild chroots bind-mount /var/lib/sbuild/build on /build, so every session
of every chroot sees the same directory. Staging the builder there let two builds
running at once overwrite each other's copy: one of them read a half-written
script and stopped with "-get: command not found". The output of an earlier run
stayed in it too, so a build collected another codename's deb and left 1.9 GB on
the build host.

Stage under /xcat-genesis-build instead. It lives in the session overlay and goes
away with the session.

26.04 also moved the backward-compatibility zone names out of tzdata into
tzdata-legacy, and the dracut module names 106 of them. Install it where apt has
it.

The three images (jammy 180 MB, noble 328 MB, resolute 432 MB) build with no
error in any log.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-12 09:54:53 -03:00
Daniel Hilst 5ff9b941b5 fix(xcat-core): the Genesis image is published into releases it cannot boot
builddebs.pl publishes every Architecture:all deb into every release, because
every other xcat-core deb is the same file for all of them. The Genesis image is
not: it carries the kernel of the root that built it. All three images therefore
landed in all three suites, and apt serves the newest, which belongs to another
release.

deb_belongs_to_dist reads the codename back from the version and keeps an image
out of any other suite. A deb with no codename in its version is unaffected.

The jammy build also stopped on /usr/share/terminfo/l/linux and v/vt100:
ncurses-base installs terminfo under /lib, and the module asks for the
/usr/share copies, which come from ncurses-term. noble happened to have it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-12 09:13:26 -03:00
Daniel Hilst 4bbed9e184 fix(xcat-core): the Genesis build root is missing nine commands the image needs
The first native build stopped on the payload lint. The Ubuntu dracut module
installs ping, nc, nslookup, sfdisk, mkfs.btrfs, usb.ids, poweroff, reboot and
shutdown unconditionally, and no package in the build root supplies any of them.
dracut reported each one with a FAILED: line and exited 0, which is how the image
that shipped without dhclient was packaged. Add iputils-ping, netcat-openbsd,
fdisk, btrfs-progs, hwdata and systemd-sysv.

Two names change between releases. util-linux-extra appeared in 23.04, so the
jammy build stopped with "E: Unable to locate package util-linux-extra" where
hwclock is still in util-linux; bind9-dnsutils replaced dnsutils in 22.04.
add_first_available installs the first name apt knows and stops the build when a
release carries none of them.

dch reads debian/control from the working directory, not from the file it writes,
so the build directory has to be the working directory before it runs.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-12 08:56:31 -03:00
Daniel Hilst b5bd2e4657 fix(xcat-core): the Ubuntu Genesis image is built from the build host kernel
dracut copies the kernel, the kernel modules and every command out of the root
it runs in. The Ubuntu Genesis deb was built once, on the build host, so every
Ubuntu release got the build host's kernel. Nothing called the builder at all:
the pipelines converted the EL rpm with alien instead.

builddebs.pl gains --genesis, --genesis-only and --genesis-dist. The Genesis
deb is now built once per codename inside that codename's <codename>-<arch>-sbuild
chroot, the chroots xcat-dep's sbuild-all.pl already creates on the Ubuntu build
host. builddeb-genesis-base takes --expect-codename and stops when the root it
woke up in is a different release, so a build on the build host cannot produce a
codename's image.

builddebs.pl reads the build log through XCAT::BuildUtils::genesis_log_errors and
fails the build on FAILED:, a package apt cannot find and four more lines that a
zero exit status hides. The extracted payload goes through verify-genesis-payload
with the command list read back from the dracut module, plus the DHCP client, the
97xcat hooks and a /lib/modules that holds this chroot's kernel and no other.

The build root gains isc-dhcp-client, ifenslave and util-linux-extra, which
supply dhclient, ifenslave and hwclock.

genesis_deb_per_codename.t, genesis_payload_verification.t and
genesis_ubuntu_build_root.t fail without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-12 08:27:42 -03:00
Daniel Hilst da9e17fb53 fix(xcat-core): check the absolute paths the Genesis module installs, and name the deb the rename supersedes
verify-genesis-payload dropped every name that started with "/" before checking
the payload, so the 609 absolute paths the EL dracut module installs were
checked by nothing. An image with no /usr/bin/awk passed. The filter now drops
only option words, and an absolute name is read back under the payload root.

The ppc64 to ppc64el rename left the new Genesis base deb without a relation to
the deb it replaces, so dpkg kept xcat-genesis-base-ppc64 installed beside it
with its own copy of the files under /opt/xcat/share/xcat/netboot/genesis.
builddeb-genesis-base and debuild-xcat-genesis-base now write Replaces and
Breaks for the superseded package, as the genesis-scripts control file already
does. The native path takes the architecture rewrite into rewrite_control() so
the superseded name is derived in one place.

genesis_payload_verification.t, genesis_base_deb_arch.t and
genesis_base_deb_control_rewrite.t fail without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-11 16:00:57 -03:00
Daniel Hilst 24e22671b4 Merge branch 'master' of https://github.com/xcat2/xcat-core into release/2.19-rc1
master moved 149 commits ahead of the branch point and four files needed a
decision.

xCAT/debian/control and xCATsn/debian/control: master moved nmap and
ipmitool-xcat into Depends, raised the ipmitool version and added the s390x
OpenEmbedded Genesis recommendation. The branch made the genesis-scripts
dependency per architecture. Both are kept, so the ppc64el metapackage depends
on xcat-genesis-scripts-ppc64el and no longer on the amd64 package.

build-utils/lib/XCAT/BuildUtils.pm and xCAT-test/unit/build_utils.t: master
replaced @DEB_ARCHES plus the branch's %NO_RISCV64 exception list with
%ARCH_PACKAGES, which carries the architecture list per package.
deb_package_arches returns the same answer for every package, so master's form
is kept and %NO_RISCV64 is dropped.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-11 15:59:58 -03:00
Daniel Hilst 9aaf52235b fix(xcat-core): the Ubuntu Genesis image ships without a DHCP client
builddeb-genesis-base installs its build root from REQUIRED_PACKAGES. That list
has no isc-dhcp-client, no ifenslave and no util-linux-extra, so dracut cannot
find dhclient, ifenslave or hwclock. dracut_install prints one line for each and
returns, the script never reads dracut's result, and the .deb is packaged with
three holes. A Genesis image with no dhclient never obtains a provisioning lease.

Add the three packages, and run verify-genesis-payload on the extracted payload
before dpkg-buildpackage. --commands-from reads the command names back from the
module that is about to be built, so a later addition to the module is checked
too. This is what xCAT-genesis-base.spec already does for EL.

genesis_ubuntu_build_root.t fails five of its eight assertions without this
change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-11 15:09:27 -03:00
Daniel Hilst 3e302e7f19 test(xcat-core): Introduce BATS & convert shell scripting tests to it
The go-xcat shell behavior tests were written as Perl harnesses, which made the shell assertions harder to read and kept shell-specific setup outside a native shell test framework.

Add BATS to the GitHub Actions dependency set, run BATS tests from the same preserved source tree as the Perl unit suite, and move the go-xcat repository checks into xCAT-test/autotest/bats.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-08 12:57:16 -03:00
Vinícius Ferrão 76e8d7069d fix(genesis): retain s390x glibc library path
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-06 04:08:59 -03:00
Vinícius Ferrão ddba7567fc fix(genesis): remove unused s390x tune value 2026-09-06 04:02:24 -03:00
Vinícius Ferrão 560de199a9 fix(genesis): align shellcheck trap annotation 2026-09-06 03:46:17 -03:00
Vinícius Ferrão 6c3293afc5 fix(genesis): isolate s390x guest identity 2026-09-06 03:34:19 -03:00
Vinícius Ferrão 2404f71785 fix(genesis): restore repository KAS paths 2026-09-06 03:32:20 -03:00
Vinícius Ferrão 86988d5edc fix(genesis): resolve KAS paths locally 2026-09-06 02:11:20 -03:00
Vinícius Ferrão 5edadd2247 docs(genesis): document architecture query 2026-09-06 02:03:17 -03:00
Vinícius Ferrão 959b0d2d3c fix(genesis): preserve s390x LPAR identity 2026-09-06 02:03:08 -03:00
Vinícius Ferrão e53d351d17 fix(genesis): harden qeth activation 2026-09-06 02:02:58 -03:00
Vinícius Ferrão 173b66f1e1 fix(genesis): initialize qeth state arrays 2026-09-06 00:54:58 -03:00
Vinícius Ferrão 3b69095b73 fix(genesis): use correct s390-tools paths 2026-09-06 00:35:37 -03:00
Vinícius Ferrão 0823c36864 feat(genesis): activate s390x qeth devices 2026-09-06 00:25:56 -03:00
Vinícius Ferrão 1ad58570e8 feat(genesis): add s390x network tooling 2026-09-06 00:21:01 -03:00
Daniel Hilst 0b31e2146e fix(xcat-core): the el10 Genesis image gives root the home directory /root
Every case that boots a node into the el10 legacy Genesis image fails with
"root@<cn>: Permission denied (publickey,password,keyboard-interactive)".
mknb writes the management node key to /.ssh/authorized_keys, and sshd looks
for it under the home directory of root.

The dracut cmdline hook deletes the root entry the image ships with
"sed -i '/^root:x/d'" and appends its own entry with the home directory /.
dracut 99base writes that entry, and from dracut 060 the password field holds
x only when the image is built --hostonly. The Genesis image is built with -N,
so el10 (dracut 107) ships "root::0:0::/root:/bin/sh". The delete does not
match, two root entries survive, and getpwnam returns the first one. el8
(dracut 049) and el9 (dracut 057) always ship the x and are not affected.

The delete now matches the user name only. All three cmdline hooks carry the
same statement and all three change.

genesis_root_home.t runs the rewrite against both entry shapes and fails on
the empty password field without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-05 00:36:55 -03:00
Daniel Hilst 772f11c257 fix(xcat-core): the el10 Genesis image carries no openssl, so getcert never returns
A compute node that boots the legacy Genesis image built on el10 stops after
"Getting initial certificate --> <mn>:3001". /etc/xcat is empty, getdestiny never runs and
the node reports no destiny, so xcatd leaves nodelist.status at powering-on. On the node,
openssl reports "command not found" and the getcert process stays alive.

xCAT-genesis-base.spec never build-requires openssl. el8 and el9 hold /usr/bin/openssl in
the build root as a dependency of another package, and el10 does not, so dracut_install in
dracut_105/el/module-setup.sh installed nothing and reported nothing. getcert line 8 waits
for openssl with no bound, which turns the missing command into a wait instead of an error.

The spec now build-requires openssl on every release. verify-genesis-payload reads the
command names back from the dracut module with --commands-from and requires each one in the
payload, so the next name the build root does not supply fails the build. getcert reports a
missing openssl and stops, and bounds the wait for /etc/xcat/certkey.pem at 600 seconds,
which is far longer than the background 4096 bit key needs.

The spec read %{_target_cpu} after BuildArch: noarch, where rpm has already set it to
noarch, so the dmidecode and efibootmgr build-requires never applied and a sed deleted their
dracut_install line on every architecture. Every shipped image lacks both. The spec now
reads %{tarch}, and the dracut module installs whichever of the two the build root carries,
because ppc64le packages neither.

xCAT-test/unit/genesis_getcert_missing_openssl.t, genesis_payload_verification.t and
genesis_base_spec_buildrequires.t fail on the test commit before this one.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-04 23:50:47 -03:00
Daniel Hilst 4c8162824d fix(xcat-core): the alien Genesis base deb keeps the rpm architecture
debuild-xcat-genesis-base maps only x86_64 to amd64. For the ppc64 rpm it
leaves every name at ppc64, so it builds xcat-genesis-base-ppc64 and
writes "Breaks: xcat-genesis-scripts-ppc64". The Debian architecture is
ppc64el, and the packages xCAT-genesis-scripts builds for it are named
ppc64el, so the Breaks names a package no repository publishes.

This change replaces the single x86_64 test with an architecture map:
x86_64 to amd64, ppc64 and ppc64le to ppc64el. The map now drives the
source tree rename, the control and changelog rewrite, and the Breaks
field. PACKAGE_ARCH keeps the rpm value, because the preinst removes the
Genesis tree under that name.

genesis_base_deb_arch.t drives the script with alien shadowed. It fails
the three ppc64el assertions without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-04 19:51:18 -03:00
Daniel Hilst 1db2c7cde0 fix(xcat-core): the genesis harness passes on a nodeset that failed and a node that never booted
The nodeset_shell_incorrectmasterip case passed while "nodeset testnode shell" failed with
"/tftpboot/boot/grub2/grub2.x86_64 does not exits". The grub2 sub-case asserted nothing. Every
genesis case reported "After 30 iterations node status: powering-on" and passed anyway.

check_destiny in xCAT-test/autotest/testcase/genesis/test.sh discarded the return value of
runcmd and read the boot configuration file, which grub2.pm writes before it stops on the
missing boot loader. xCAT builds no grub2 boot loader for x86_64, so the file is absent on a
correctly built management node. wait_for_boot in genesistest.pl waited for nodelist.status
"booted"; a Genesis node reports its destiny with getdestiny and xcatd writes "shell",
"configuring" or "booting" from it. Every caller discarded the return value. The node did not
reach even those statuses, because getdestiny makes its request file with mktemp and the
dracut module never installed it.

check_destiny now returns the status of nodeset, and the grub2 check stages an empty
grub2.<arch> when the management node has none and removes it after. wait_for_node_status
takes the status the destiny implies and each caller fails when the node does not reach it;
the shell case moved into run_nodeset_shell_test so its result can be read. clearenv no longer
waits, because "rinstall <node> boot" boots a disk with no operating system and reports
nothing. The dracut modules install mktemp and verify-genesis-payload requires it.

Tests: genesis_incorrectmasterip_check.t runs the check with a failing nodeset and reads
whether the boot loader is present when nodeset runs; genesis_testcase_helpers.t drives the
status wait and the shell case; genesis_payload_verification.t reads a payload without mktemp.
Each fails on the parent commit.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>

(cherry picked from commit 8ecf0a806785023aca0ea6d1b0e41810630816b2)

The Release hunk of the original commit is dropped. buildrpms.pl writes Release from
SOURCE_DATE_EPOCH at build time, so the committed snap stamp is build debris.
2026-09-04 19:29:00 -03:00
Daniel Hilst 279207cf0a fix(xcat-core): the legacy Genesis image for el10 carries no DHCP client
A compute node that boots the legacy Genesis image on el10 x86_64 never acquires an
address. Its serial console reports "/usr/bin/doxcat: line 293: dhclient: command not
found" and then "It seems to be taking a while to acquire an IPv4 address". The DHCP
server side is sound: Kea leases the address and the node never asks for it.

AlmaLinux 10 and EPEL 10 package no ISC dhcp-client. dracut_install reports a missing
binary and returns, so module-setup.sh named dhclient, the build kept going and the image
shipped without a client. doxcat then named dhclient at six call sites with no
alternative.

doxcat now chooses its client at run time. genesis_dhcp_command() returns the command
line for one interface and one address family, and genesis_start_dhcp() runs it and
reports when the image carries none. The ISC client keeps its command line where a
release packages it, so el8 and el9 are unchanged. Where it is absent, dhcpcd stands in:
AlmaLinux 10 baseos packages it at 236 KB, and it carries its own resolv.conf, hostname
and ntp hooks, so it needs no dhclient-script. dhcpcd on a single interface exits when
its 30 second timeout expires and de-configures the interface as it goes, so it is asked
for -t 0 and -p.

The dracut module installs whichever client the build root carries, together with the
hooks dhcpcd runs on every lease. The spec build-requires dhcpcd from rhel 10 on, and
verify-genesis-payload now requires usr/sbin/dhcpcd there, so an image that ships with no
client fails the build instead of reaching a node.

genesis_dhcp_client.t drives both routines with the clients shadowed by recording stubs.
It fails on the parent commit, and deleting the dhcpcd branch turns five of its
assertions red.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit b9329998c80383bb0397d16a558f66a6bb9db399)
2026-09-04 19:26:23 -03:00
Daniel Hilst ff20388fed fix(xcat-core): the legacy Genesis image never reaches doxcat, so no node boots a shell
A compute node fetches the legacy Genesis kernel and initramfs, the kernel starts, and then
nothing else happens: doxcat never runs, the node acquires no address, sshd refuses every
connection and the node stays at status=powering-on. The five genesis test cases in
xCAT-test/autotest/testcase/genesis have never passed. VersatusHPC/xcat-internal#78.

Three holes in the image, each fatal on its own. dracut_105/el/xcat-cmdline.sh ends in
`while :; do tmux attach-session -t doxcat || tmux new-session -s doxcat doxcat; done`, and the
image carries no locale data, so tmux exits with "need UTF-8 locale" and the loop spins
without ever reaching doxcat. module-setup.sh does not install
/usr/libexec/openssh/sshd-session, which OpenSSH 9.8 and later exec for every connection and
which EL9 now ships. xCAT-genesis-base.spec does not BuildRequire dhcp-client, so dhclient is
absent from the build chroot; dracut_install reports the missing binary and returns, and the
module install function keeps going, so the image ships without it.

xcat-cmdline.sh now resolves xcat_console_mode() once and runs doxcat directly when the
terminal multiplexer cannot start a session; the same shape replaces the screen loop on
Ubuntu. module-setup.sh installs the OpenSSH session helpers and the C.utf8 locale where they
exist. The spec BuildRequires dhcp-client on the releases that package it, and runs the new
xCAT-genesis-builder/verify-genesis-payload over the extracted payload, which fails the build
when sshd needs a helper the image lacks, when tmux has no UTF-8 locale, or when a binary the
caller named is missing.

The same runs exposed four defects in the test cases themselves. test.sh defined its synthetic
node as ppc64le whatever the management node was, so nodeset could not find a genesis kernel on
x86_64. genesistest.pl get_os() matched neither AlmaLinux nor Rocky and reported the OS as
unsupported. The -g check read $? instead of check_genesis_file()'s return value, so it could
never fail. And testxdsh() met "REMOTE HOST IDENTIFICATION HAS CHANGED" from the second boot
on, because Genesis makes new host keys every boot and nothing dropped the stale known_hosts
entry. test.sh now derives the node arch from uname and takes the tftp root from TFTPDIR,
get_os() recognises the redhat family, report_genesis_files() carries the result to an exit
status, and forget_host_keys() runs makeknownhosts -r before each probe.

Tests: genesis_console_mode.t drives xcat_console_mode() with the multiplexer shadowed;
genesis_payload_verification.t drives the verifier over payload trees carrying each hole;
genesis_testcase_helpers.t drives get_os(), check_genesis_file(), report_genesis_files() and
testxdsh(); genesis_incorrectmasterip_check.t runs test.sh against a scratch tftp root. Each
fails on the parent commit. The verifier also reports all three holes against the released
xCAT-genesis-base-x86_64-2.19.0-snap202609021858 payload.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit cb6021eb3cdb3abc75e4dd6704cb42b28074e140)
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-04 19:16:15 -03:00
Vinícius Ferrão 17d2965f18 chore(genesis): align patch author identity 2026-09-04 18:22:16 -03:00
Vinícius Ferrão bfd4442cc2 refactor(genesis): use the extension arch default 2026-09-04 17:15:23 -03:00
Vinícius Ferrão 22646de0a8 fix(genesis): match architectures literally 2026-09-04 17:15:23 -03:00
Vinícius Ferrão 0cbeb3bb56 feat(genesis): report build architectures 2026-09-04 16:54:13 -03:00
Vinícius Ferrão a1e9948997 fix(genesis): limit s390x boot to validated path 2026-09-04 15:31:33 -03:00
Vinícius Ferrão f7e3bd4a96 fix(genesis): keep s390x metadata composable 2026-09-04 14:43:18 -03:00
Vinícius Ferrão dec2227c8e fix(genesis): scope s390x identity handling 2026-09-04 14:42:51 -03:00
Vinícius Ferrão 1fe530431c docs(genesis): document s390x target 2026-09-04 12:48:32 -03:00
Vinícius Ferrão cb09b5033d feat(genesis): report IBM Z identity 2026-09-04 12:48:31 -03:00
Vinícius Ferrão b63e695601 feat(genesis): add s390x OpenEmbedded target 2026-09-04 12:48:31 -03:00
Daniel Hilst 11da82dbba fix(xcat-core): the genesis specs have no riscv64 branch, so %{tarch} stays literal
A riscv64 build of xcat-core dies at xCAT-genesis-scripts with "Cannot find/open
srpm: ...xCAT-genesis-scripts-riscv64-2.19.0-<release>.src.rpm", because the srpm
rpm produced is named xCAT-genesis-scripts-%{tarch}-2.19.0-<release>.src.rpm.

xCAT-genesis-scripts.spec and xCAT-genesis-base.spec take their package name from
%{tarch}, which an %ifarch ladder sets for x86, x86_64, ppc64 and aarch64. riscv64
is absent, so rpm leaves the macro unexpanded and builds a package whose NAME
contains it. buildrpms.pl then looks for the name it asked for and cannot find it.

Add the riscv64 branch to both specs. An arch that is still missing from the
ladder now stops the build with %{error:} instead of naming a package after a
macro.

xCAT-test/unit/genesis_spec_target_arch.t covers this: it fails on riscv64
without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit c9de89ccceaaa618f9e91568d74812b349c513ac)
2026-09-04 12:20:34 -03:00
Vinícius Ferrão 7a58b59d72 fix(genesis): boot the riscv64 image on firmware that describes hardware through ACPI
The riscv64 kernel was built without ACPI. Firmware that publishes ACPI
tables and no device tree - server-class RISC-V boards, and edk2 with
acpi=on - therefore left the kernel with no hardware description: it died
before console initialisation, so a node handed the image by grub2 went
silent at ExitBootServices and never reached the discovery action.

Enable ACPI, its error interfaces and the EFI stub the image is already
booted through. Rebuilt with these options, the same image on the same
firmware parses the RSDP, XSDT, FACP, DSDT, APIC, RHCT and SPCR tables,
reaches multi-user and starts discovering, and the kernel now also sees
the SMBIOS entry point the firmware exports.
2026-08-24 15:45:52 -03:00
Vinícius Ferrão 5424af302c style(genesis): trim source comments 2026-08-21 03:26:13 -03:00
Vinícius Ferrão 395e85ed1c fix(genesis): gate the action service 2026-08-21 02:13:19 -03:00
Vinícius Ferrão 07bc26f15d fix(genesis): tolerate incomplete inventory 2026-08-21 02:12:56 -03:00
Vinícius Ferrão c20ce284eb fix(genesis): keep logging non-fatal 2026-08-21 02:12:22 -03:00
Vinícius Ferrão d28e72a92c fix(genesis): read the full kernel command line 2026-08-21 02:10:22 -03:00