2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-21 01:42:15 +00:00
Commit Graph

20 Commits

Author SHA1 Message Date
Daniel Hilst dfad7287f0 Merge pull request #7984 from VersatusHPC/fix/genesis-ubuntu-mawk-rebased
fix(xcat-core): the Ubuntu Genesis image runs its awk programs under mawk
2026-10-29 15:24:52 -03:00
Daniel Hilst 6980a71de5 fix(xcat-core): Genesis node stops at "Getting initial certificate"
openssl req reads the config file at OPENSSLDIR/openssl.cnf and exits 1 when it is
absent. install() in xCAT-genesis-base/dracut_105/{ubuntu,el}/module-setup.sh runs
dracut_install openssl, which copies the program and its shared libraries and nothing
else. OPENSSLDIR is /usr/lib/ssl on Ubuntu and /etc/pki/tls on EL, so the one file
doxcat writes serves EL alone, and getcert loops on openssl req until it gives up.

Measured on an Ubuntu compute node: /usr/lib/ssl did not exist, the image carried
/etc/pki/tls/openssl.cnf, and the key verified "RSA key ok". Supplying a config turned
the same command into a 1602 byte certificate request.

Each module now installs the config file that its own openssl names, and the image
build stops when that file is absent. getcert reports what openssl printed beside the
key it used, and reads the file with bash builtins so it needs no external command.

Two mutations, each failing only the cases that name it: dropping the install call
fails both module cases and keeps the other four; restoring the old message fails the
message case alone.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 08:51:23 -03:00
Daniel Hilst c14d79790a fix(xcat-core): the Ubuntu Genesis image runs its awk programs under mawk
An Ubuntu compute node booted into legacy Genesis never reports a destiny. The console
shows doxcat reach "Getting initial certificate", then:

  awk: 8: unexpected character '&'
  awk: /usr/bin/allowcred.awk: line 14: syntax error at or near }

and the node stays in powering-on until the case times out. The payload built on
2026-10-23 carries /usr/bin/awk as a symlink to mawk, with no gawk.

allowcred.awk, minixcatd.awk and udpcat.awk open a TCP stream with the gawk |& coprocess
and the /inet/ special file. mawk rejects both at parse time. install() in
dracut_105/ubuntu/module-setup.sh staged /usr/bin/awk from the build root, and on Ubuntu
that alternative is mawk, so the image got an awk that cannot parse its own programs. The
EL payload is unaffected: there /usr/bin/awk is gawk.

install() now installs gawk by name and points usr/bin/awk at it, the build root carries
gawk, and XCAT::GenesisPayload reads usr/bin/awk back and refuses a payload whose awk is
not gawk. dracut_install reports a missing command and returns, and awk is a symlink the
module makes itself, so nothing in the build said why.

genesis_ubuntu_awk.bats, genesis_ubuntu_build_root.t and genesis_payload_verification.t
fail on the parent commit and pass on this one.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-24 10:04:15 -03:00
Daniel Hilst 09e277a6a1 fix(xcat-genesis-base): the deb ships a Genesis loader with no execute bit, so every node panics
An Ubuntu node that netboots legacy Genesis dies with

  Failed to execute /init (error -13)
  Kernel panic - not syncing: No working init found.

xCAT-genesis-base/debian/rules is a bare `dh $@`, so dh_fixperms applies its
*.so* rule to the whole package. That is right for a Debian shared library and
wrong for a netboot ROOT FILESYSTEM: the kernel execs the payload's dynamic
loader, and a loader with no execute bit makes open_exec() return EACCES, so
every ELF in the image fails to start. mknb copies the tree verbatim into
genesis.fs.<arch>.lzma, so the mode travels into the image. The pipeline's iPXE
command line carries `quiet`, which hid the reason.

Measured on xcat-master-ub from the installed package:
  644 .../netboot/genesis/x86_64/fs/usr/lib64/ld-linux-x86-64.so.2
  755 .../netboot/genesis/x86_64/fs/usr/bin/basename

and reproduced away from the lab: that management node's own kernel and image
under qemu panicked at 35 seconds, a repack with no change panicked again, and a
repack with only chmod 0755 on the loader reached /init and started dracut.

The EL rpm is unaffected, because it never runs dh_fixperms. This is why only
the Ubuntu genesis-legacy cell saw it, and why that cell has never had a
non-mock green. It is not a regression: the same recipe builds the published
xcat-genesis-base-amd64.

The bit is restored AFTER dh_fixperms rather than excluding the tree with -X,
which would also skip its chown 0:0 pass and ship the payload owned by the build
user.

genesis_deb_loader_executable.t asserts the override exists, still calls
dh_fixperms, is scoped to the netboot tree, names both the glibc and the ppc64le
loader, and runs the chmod AFTER dh_fixperms. Three of its ten assertions fail
without the override, and the ordering assertion fails if the chmod is moved
first -- which is the mistake that looks correct.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 12:16:02 -03:00
Vinícius Ferrão dd26b11a01 fix(genesis): clear stale identity text from the console header
A shorter node identity leaves the prefix of the previous text on screen.
Pad the field on each redraw to erase that prefix.

Limit the field to the context buffer before padding. This keeps leading
spaces from truncating the identity on wide terminals.
2026-10-21 11:43:06 -03:00
Vinícius Ferrão 5d125637ee fix(genesis): retain the selected journal entry across history rollover
A paused journal view restores a row number after refreshing its history.
When older records leave the window, that row selects a different entry.

Match the selected entry by its journal cursor and retain its wrapped-line
position. If the entry has left the window, select the oldest retained row
without resuming follow mode.
2026-10-18 19:06:39 -03:00
Vinícius Ferrão 8f12cf66cd fix(genesis): retain the first entry in the journal view 2026-10-16 20:52:09 -03:00
Vinícius Ferrão 64b667f03b refactor(genesis): share the POWER metadata patch hook
Keep the machine-specific prepends and their existing patch guard. Both POWER targets call the same recipe function.
2026-10-13 22:16:51 -03:00
Vinícius Ferrão c66822cd60 refactor(genesis): share common machine image policy
Keep hardware and tuning settings in each machine. Use a common include for the repeated image and recommendation settings without changing their override semantics.
2026-10-13 22:16:50 -03:00
Vinícius Ferrão 8f1ece8da7 refactor(genesis): share status publication across services
Preserve component labels, failure messages and exit policy at each caller. Give the runtime library its own package so discovery does not depend on the init package that already depends on discovery.
2026-10-13 22:16:50 -03:00
Vinícius Ferrão 8d452b1035 refactor(genesis): share static console dialogs 2026-10-13 22:16:50 -03:00
Vinícius Ferrão 0adb4b87cf refactor(genesis): share action refresh requests 2026-10-13 22:16:49 -03:00
Vinícius Ferrão d909b3f6fa refactor(genesis): share destiny protocol operations 2026-10-13 22:16:49 -03:00
Vinícius Ferrão 846515d019 refactor(genesis): share deploy artifact resolution 2026-10-13 22:16:49 -03:00
Daniel Hilst 0682d56de6 Merge master into fix/remove-xcat-genesis-builder
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-01 09:03:27 -03:00
Daniel Hilst c87fec574b Merge master into fix/remove-xcat-genesis-builder
Master merged #7835, which changed the Genesis base files under
xCAT-genesis-builder/, the directory this branch removes. The merge
keeps master's content at this branch's paths:

- GenesisBuildRoot.pm, genesis_payload_verification.t and
  genesis_ubuntu_build_root.t take master's newer versions, pointed at
  xCAT-genesis-base/.
- verify-genesis-payload and GenesisPayload.pm are identical on both
  sides; the copies at the old path are dropped.
- buildrpms.pl keeps stage_genesis_base_sources(), which already stages
  what master added inline.
- builddebs.pl and the new genesis_deb_per_codename.t now use
  xCAT-genesis-base/.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-24 22:16:30 -03:00
Daniel Hilst 052d2d5fbe fix(xcat-core): Genesis base tests from master read the old directory and evaluate shell
Master added a workflow and several tests after this branch renamed
xCAT-genesis-builder to xCAT-genesis-base. They still name files under
xCAT-genesis-builder/, which no longer exists, so they fail or read
nothing. The OpenEmbedded workflow, six bats files and four unit tests
now use the new paths.

Two of those unit tests could reach the code only as shell.
genesis_ubuntu_build_root.t cut the package list out of
builddeb-genesis-base and evaluated it through bash.
genesis_payload_verification.t ran the bash verifier and parsed its
stderr.

XCAT::GenesisBuildRoot::required_packages() now returns the build-root
package list, and builddeb-genesis-base calls it. XCAT::GenesisPayload
holds the mandatory-command list and the payload check, and
verify-genesis-payload runs its main() with the same arguments, exit
codes and messages. stage_genesis_base_sources() stages the module
beside the script. Both modules use core Perl only.

The two tests now call these functions with chosen inputs and assert
the exact results. genesis_base_sources_staged.t expects the module in
the staged tarball.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-24 17:28:26 -03:00
Daniel Hilst e1e48a485d Merge master into fix/remove-xcat-genesis-builder
Master fixed debuild-xcat-genesis-base and added a bats test for it. The
branch deleted that script as unused. The merge keeps the script and
moves it to xCAT-genesis-base with the other Genesis base files.

Master also stages verify-genesis-payload for the spec %install check.
stage_genesis_base_sources() now stages it too, and
genesis_base_sources_staged.t expects it in the tarball.

The workflow, builds.rst and xcat_probe_package_payload.t take the
master version.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-24 16:42:35 -03:00
Daniel Hilst 1e939d4cb0 fix(xcat-core): the rename took the OpenEmbedded build instructions with it
Deleting xCAT-genesis-builder/README.md removed 99 lines that describe the
build path this branch keeps: the kas virtualenv, the architectures `oe/build`
accepts, the console keys, `oe/export`, the signed-extension workflow with
`oe/export-extension`, and the `oe/report` baseline comparison. Only the legacy
RPM builder half was dead. The reader is now told nothing about how to build a
Genesis image.

xCAT-genesis-base/README.md carries that half with its paths on the new
directory. The legacy RPM builder chapter stays deleted.

go-xcat keeps xCAT-genesis-builder in GO_XCAT_UNINSTALL_LIST. No build
produces that rpm any more, but a management node installed before 2.19 still
has it, and the list is what `go-xcat uninstall` hands to the package manager.

genesis_readme_paths.t asserts every in-tree path the README names exists, and
that its link to the architecture plan resolves. It reads the file because the
file is the artifact: the text is the instruction. It matches any xCAT-*
directory rather than the new name alone, so a path left on the old name fails
instead of going uncollected, and it bails below a fixed floor so a pattern
that stops matching cannot pass on an empty plan.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-16 18:19:40 -03:00
Daniel Hilst 2a7364476e fix(xcat-core): xCAT-genesis-builder is named for a builder nothing calls
The directory holds the Genesis image sources and, beside them, a builder that
no pipeline runs. buildrpm, debuild-xcat-genesis-base, install, install.ubuntu,
check, cmdlist_check, findmcprpms, xCAT-genesis-builder.spec and the root
makerpm-genesisbuilder have no caller. So has build-ubunturepo, which
builddebs.pl replaced, and its -r flag has set an unread variable since 2013.
docs/source/references/coral/known_issues/genesis_base.rst tells the reader to
install an rpm no build produces, and go-xcat offers to remove that package.

Delete all of them, and rename the directory xCAT-genesis-base for what it
holds: the dracut modules the EL spec and the Ubuntu builder read, the
OpenEmbedded layers the GitHub job builds, the deb packaging, the image scripts
and 80-net-name-slot.rules.

Every reader of the old path is updated: buildrpms.pl, .gitattributes, the OE
workflow and the OpenEmbedded tests. buildrpms.pl mapped the package
xCAT-genesis-base to the directory xCAT-genesis-builder; the two names are the
same now, so the mapping goes.

xcat_probe_package_payload.t read build-ubunturepo for the probe helper staging.
builddebs.pl stages them with XCAT::BuildUtils::stage_probe_helpers, which
build_utils.t drives directly.

genesis_base_sources_staged.t passes with this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-12 08:45:49 -03:00