2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-26 12:22:15 +00:00
Commit Graph

19 Commits

Author SHA1 Message Date
Daniel Hilst dc8c5cefed fix(xcat-core): Genesis sends a DUID the reservation does not hold, and makedns aborts on a /62
Both Genesis images built a DUID-UUID from the nil SMBIOS UUID. makedhcp refuses that UUID,
because nodeimport writes it to every PowerKVM node, and reserves the hardware address instead,
so the client sent an identifier no reservation held and the node took a pool address with no
boot file. genesis-duid and doxcat now keep the DUID-LL for it, which is what Kea reads the
hardware address out of.

getzonesfornet died on an IPv6 prefix that is not a multiple of 4, which took makedns and
makedhcp with it for a /62 or a /126 network. A reverse zone is delegated on a nibble, so the
prefix is rounded down and the enclosing zone is returned. Both copies of the routine are fixed.

The test suite needs socat and jq, and five bats files skipped without them, so the workflow
installs both. Template.pm drops the unused _is_el10, credentials.pm drops a repeated import,
and two comments that recorded bug history are cut to the fact the code cannot show.

Reverting any one fix fails named assertions: 1 of 8 and 1 of 3 bats cases for the two Genesis
images, and 4 of 30 in ddns_ipv6.t, which traps the abort so the file still reports.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-27 10:20:52 -03:00
Daniel Hilst 0998d0ab26 fix(xcat-core): OpenEmbedded Genesis sends a DUID no reservation matches
A node booted into the OpenEmbedded Genesis image gets a DHCPv6 pool address and no
bootfile-url, so it does not netboot over IPv6. The image sets ipv6.dhcp-duid=ll in
10-xcat-genesis.conf, so NetworkManager sends a DUID-LL, while
kea_node_reservations6 in xCAT-server/lib/xcat/plugins/dhcp.pm reserves by duid for
every node that has a vpd.uuid. Kea rejects a reservation that carries both a duid
and a hw-address, so the reservation holds the DUID-UUID alone and the DUID-LL
matches nothing.

NetworkManager cannot build that DUID itself: ipv6.dhcp-duid takes llt, ll,
stable-llt, stable-ll, stable-uuid, lease or a literal hexadecimal DUID, and every
UUID form it generates comes from the machine-id, not from SMBIOS. genesis-duid
therefore reads the SMBIOS UUID at boot and writes the literal DUID into
15-xcat-genesis-duid.conf, which NetworkManager reads after 10-xcat-genesis.conf and
so wins. xcat-genesis-duid.service runs it before NetworkManager starts, because
NetworkManager reads conf.d only at startup. The byte order is the one doxcat and
makedhcp use, so both Genesis generations now send the same identity.

A node with no SMBIOS UUID keeps the DUID-LL: makedhcp cannot build a DUID for it, so
its reservation holds a hw-address, which Kea reads out of a DUID-LL.

genesis_openembedded_duid.bats and genesis_openembedded_duid.t fail without these
files.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 17:52:04 -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