2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-10-21 15:18:19 +00:00
Commit Graph

28687 Commits

Author SHA1 Message Date
Daniel Hilst 32eb096bfe fix(xcat-core): the mock result directory owner ignores include() and stale logs
mock_build_owner parsed chrootuid and chrootgid from the text of the
rendered configuration. A value set in an included file, an assignment
with an inline comment or a double-quoted key, and an include after an
assignment all gave a uid that mock does not build as. Also, a root
build that stopped part way left root-owned 0644 logs in the result
directories, and the next build, as uid 1000, could not append to them.

mock_build_owner now asks mock's own loader, mockbuild.config.load_config,
for chrootuid and chrootgid of the chroot that buildrpms.pl passes to
mock -r. It fails with a clear message when mock is not installed.
prepare_mock_resultdirs moves to XCAT::BuildUtils. It also gives the
files already in both result directories to that owner, so a retry can
append to the old logs and replace a package of the same version. When
mock builds as the caller, nothing changes owner.

native/mock_resultdir_owner.t gave the wrong uid for four of its
configuration cases, and failed the 11 retry checks, before this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-12 11:02:52 -03:00
Daniel Hilst 926c076533 test(xcat-core): the mock result directory owner ignores include() and stale logs
mock_build_owner reads chrootuid and chrootgid from the text of the
rendered configuration. It does not see a value set in an included file,
an assignment with an inline comment or a double-quoted key, or an
include that overrides an earlier assignment. prepare_mock_resultdirs
then gives the result directories to the wrong uid, or to none.

prepare_mock_resultdirs changes only the two directories. A root build
that stopped part way leaves root-owned 0644 logs in them, and mock,
running as uid 1000, cannot append to them on the next run.

native/mock_resultdir_owner.t runs mock's loader on each configuration
case, and checks as root that uid 1000 can append to the stale logs in
both directories. Ubuntu ships no mock, so the workflow runs it in a
Fedora container and fails when it skips. The unit test checks, with
chown recorded, which owner the directories and their files get.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-12 11:02:51 -03:00
Daniel Hilst d3f0fd55c4 fix(xcat-core): the openEuler ppc64le core build runs rpmbuild as root
PR #7897 made mock create its result directory as root by appending
config_opts['chrootuid'] = 0 to every per-package configuration. chrootuid
also selects the uid rpmbuild runs as, so every target now builds as root,
and the 1000 that openeuler-24.03-ppc64le declares no longer applies inside
the chroot.

Remove the assignment and give the result directory to the uid the target
declares. mock_build_owner reads chrootuid and chrootgid from the rendered
configuration, and prepare_mock_resultdirs creates dist/<target>/rpms and its
SRPMS subdirectory and chowns both before the build starts. openeuler-24.03-ppc64le
is the only target that declares a uid; elsewhere mock builds as the caller and
the directories are left alone.

buildrpms_source_only.t records the stages buildall runs, so it now expects the
new one between createmockconfig and buildsources.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-12 11:02:40 -03:00
Daniel Hilst 56a966e54e test(xcat-core): nothing proves the core build keeps the uid its target declares
PR #7897 appends config_opts['chrootuid'] = 0 to every per-package mock
configuration so that mock creates its result directory as root. That also
moves rpmbuild to uid 0 for the whole build.

Assert the opposite: mock_config_text preserves the uid and gid the target
declares, and mock_build_owner reports the owner the result directory needs.
A target that declares no uid reports none, because mock then uses the caller.

Two assertions fail on the unfixed tree: the rendered configuration reports
chrootuid 0 for openeuler-24.03-ppc64le, and 0 for a target that declares
nothing.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-12 11:02:40 -03:00
Daniel Hilst aa05e7026b Merge pull request #7933 from VersatusHPC/refactor/r26-capture-lifecycle
refactor(dhcp): share the packet capture lifecycle
2026-10-12 10:54:00 -03:00
Daniel Hilst 1210e3c831 Merge pull request #7929 from VersatusHPC/refactor/r26-postinstall-bootstrap
refactor(postscripts): share the early postinit disable policy
2026-10-12 10:34:52 -03:00
Daniel Hilst 15db168634 Merge pull request #7928 from VersatusHPC/test/r26-file-io
test(fixtures): reuse file I/O helpers in unit tests
2026-10-12 10:32:31 -03:00
Daniel Hilst 2b1fb5a090 Merge pull request #7927 from VersatusHPC/test/r26-process-helper
test(process): share command execution across unit tests
2026-10-12 10:31:36 -03:00
Daniel Hilst 1786f80541 Merge pull request #7926 from VersatusHPC/test/r26-package-script-behavior
test(packages): exercise go-xcat and postscript behavior
2026-10-12 10:29:13 -03:00
Daniel Hilst eea673f040 Merge pull request #7920 from middelkoopt/tm-bmcsetup-sync
fix(postscripts/bmcsetup): sync with the genesis-scripts copy
2026-10-12 10:28:23 -03:00
Daniel Hilst 4d052c59d3 Merge pull request #7907 from VersatusHPC/test/r26-openbmc-retry-behavior
test(openbmc): exercise retries through the request handler
2026-10-12 10:25:14 -03:00
Daniel Hilst c3742d7623 Merge pull request #7910 from VersatusHPC/test/r26-grub-netboot-behavior
test(grub2): exercise netboot protocol configuration
2026-10-12 10:24:07 -03:00
Daniel Hilst ae9fd7912a Merge pull request #7932 from VersatusHPC/refactor/r26-string-trim
refactor(xcat): reuse whitespace trimming in blade and credential paths
2026-10-12 10:23:11 -03:00
Daniel Hilst 0f445e2596 Merge pull request #7931 from VersatusHPC/refactor/r26-omapi-twin-delete
refactor(dhcp): reuse the hardware-address delete formatter
2026-10-12 10:22:47 -03:00
Daniel Hilst 52cd6b26d1 Merge pull request #7919 from VersatusHPC/fix/blackbox-prov-missing-ptr-state
fix(xcat-test): missing-ptr still finds the node it withdrew
2026-10-12 10:05:56 -03:00
Daniel Hilst 0742711bc5 Merge pull request #7921 from VersatusHPC/test/r26-package-lifecycle
test(packaging): exercise service and configuration lifecycles
2026-10-11 06:52:35 -03:00
Vinícius Ferrão e7cbf8b460 test(dhcp): cover packet capture output and termination
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 02:07:56 -03:00
Vinícius Ferrão cce001abb8 refactor(dhcp): share the packet capture lifecycle
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 01:29:22 -03:00
Vinícius Ferrão 0349bb64d6 test(xcat): cover whitespace in blade and credential identities 2026-10-10 21:23:43 -03:00
Vinícius Ferrão 4879eef80b refactor(xcat): reuse whitespace trimming in blade and credential paths 2026-10-10 21:13:41 -03:00
Vinícius Ferrão 1882d2d0fe test(xcat): resolve trim callers from the checkout 2026-10-10 21:12:08 -03:00
Vinícius Ferrão f349adc20e test(dhcp): cover InfiniBand cleanup command ordering 2026-10-10 17:49:27 -03:00
Vinícius Ferrão 729b1b9aaa refactor(dhcp): reuse the hardware-address delete formatter 2026-10-10 17:41:20 -03:00
Vinícius Ferrão 5e13ec0a6d test(dhcp): isolate InfiniBand command fixtures 2026-10-10 17:40:28 -03:00
Vinícius Ferrão 1ec18e3682 docs(test): describe the postinstall native test boundary 2026-10-10 02:41:02 -03:00
Vinícius Ferrão f4f596537e test(postscripts): exercise rendered postinit service policy
Run complete rendered installers and their emitted postboot scripts in
private Linux filesystems. Cover service selection, flag aliases, defaults,
debug output, ordering and failures, and select the test in CI.
2026-10-10 02:41:02 -03:00
Vinícius Ferrão a987cfbd10 refactor(postscripts): share the early postinit disable policy
Embed one helper in the legacy and systemd postboot runners. Keep each
caller policy and disable the service before running postscripts.
2026-10-10 02:25:59 -03:00
Vinícius Ferrão c10cf9b924 docs(test): describe fixture file I/O contracts 2026-10-10 01:50:52 -03:00
Vinícius Ferrão b625732ef0 test(ubuntu): reuse binary file helpers in package-list fixtures 2026-10-10 01:34:45 -03:00
Vinícius Ferrão ea75eee21f test(scripts): reuse file helpers for package and postscript fixtures 2026-10-10 01:33:56 -03:00
Vinícius Ferrão fa7b255a82 test(boot): reuse binary file helpers in Genesis fixtures 2026-10-10 01:32:08 -03:00
Vinícius Ferrão caccfeb054 test(dhcp): reuse binary file helpers in OMAPI fixtures 2026-10-10 01:31:00 -03:00
Vinícius Ferrão fc231b7132 test(network): reuse binary file helpers in command fixtures 2026-10-10 01:29:49 -03:00
Vinícius Ferrão 7fdb437ea3 docs(test): describe the shared command runner 2026-10-09 22:43:07 -03:00
Vinícius Ferrão 0d2685a4c5 test(packages): reuse command capture in discovery checks 2026-10-09 22:43:07 -03:00
Vinícius Ferrão a79faa2d77 test(apache): reuse command capture in configuration checks 2026-10-09 22:43:07 -03:00
Vinícius Ferrão a3d4d5a77c test(postscripts): reuse command capture in loader checks 2026-10-09 22:43:06 -03:00
Vinícius Ferrão df1fe8c7c9 test(process): share command output and exit status capture 2026-10-09 22:43:06 -03:00
Vinícius Ferrão 507e5644ef docs(test): describe package-script test boundaries 2026-10-09 21:01:26 -03:00
Vinícius Ferrão 9ff054bb3b test(postscripts): run package callers in isolated filesystems
Exercise the complete ospkgs and otherpkgs scripts with recorded package
commands. Check unattended options, pkglist environment, failure status,
and CUDA architecture handling without extracting source fragments.
2026-10-09 21:01:26 -03:00
Vinícius Ferrão 9416074db7 test(go-xcat): load repository checks from the complete script
Use the production repository probes and package names. Check that
missing repositories and failed queries stop both installers before any
package transaction, and that similar package names do not satisfy EPEL.
2026-10-09 21:01:26 -03:00
Vinícius Ferrão 905510bca9 test(go-xcat): read release files through the complete script
Run OS detection in a private filesystem with the real release parser.
Remove the rewritten-source Perl harness and require GNU awk for the
legacy Red Hat fallback.
2026-10-09 21:01:25 -03:00
Daniel Hilst 9ed42c0b26 Merge pull request #7918 from VersatusHPC/fix/diskless-case-aarch64-machine-type
fix(xcat-test): the diskless case gives an aarch64 node no machine type
2026-10-09 11:44:18 -03:00
Timothy Middelkoop 439fbd5e6d postscripts/bmcsetup: sync with the genesis-scripts copy
xCAT/postscripts/bmcsetup had drifted behind
xCAT-genesis-scripts/usr/bin/bmcsetup: four recent BMC fixes were applied
to the genesis copy only. Bring them over, so the two copies differ only in
log_label:

- skip BMC LAN settings that already match (verify before set) - 8d7ccc2d8
- enable BMC setup for Lenovo SR635/SR655 - 6dbc16c21
- support Intel Walker Pass (S9200WK) BMC LAN - 49c3e94a0
- settle after an IBM BMC port change; support long BMC passwords - 563a08362

A mechanical sync of already-reviewed code, not new logic; not tested on
hardware.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 07:39:55 -05:00
Daniel Hilst eed072ce6b fix(xcat-core): the diskless case gives an aarch64 node no machine type
reg_linux_diskless_installation_flat fails on aarch64 at the check
"lsdef $$CN | grep vmothersetting" matched against "machine". The case
stops there, so the diskless provisioning it exists to measure is never
asserted.

The case sets vmothersetting to machine:invalid, confirms the node still
provisions, then replaces it with a valid machine type and confirms
again. The second step selects that type by architecture and knows only
ppc64, x86_64 and riscv64. On aarch64 the variable stays empty, chdef
clears vmothersetting, and the check that looks for the word "machine"
returns 1.

Give aarch64 the machine type QEMU uses for it, which is virt, the same
value riscv64 already gets. The other three architectures keep the value
they had.

Measured on xcat-ci/xcat-test-el10-aarch64 #9: the case reported Failed
at this check, 08:36:51Z, while genimage and packimage returned 0 and
the node reached status=booted with rootfs on / type tmpfs and
IMAGENAME alma10.2-aarch64-netboot-compute.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-09 06:17:48 -03:00
Vinícius Ferrão 0998363bff docs(test): describe package lifecycle checks 2026-10-09 03:22:47 -03:00
Vinícius Ferrão 39139f7101 test(packaging): exercise Apache setup and response headers 2026-10-09 03:22:47 -03:00
Vinícius Ferrão 1b69975d62 test(packaging): exercise daemon restart callers 2026-10-09 03:22:47 -03:00
Vinícius Ferrão c69f9fb2b4 test(packaging): exercise Apache configuration upgrades 2026-10-09 03:22:46 -03:00
Vinícius Ferrão 3abd11220a test(packaging): exercise RPM service lifecycle 2026-10-09 03:22:46 -03:00