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

28693 Commits

Author SHA1 Message Date
Vinícius Ferrão b2a73685fb docs(test): document Ubuntu image fixture boundaries
Describe the native test prerequisites, external command doubles and the image-building behavior these fixtures do not qualify.
2026-10-12 13:58:45 -03:00
Vinícius Ferrão 320a1a1299 test(ubuntu): inspect resolver files in generated initrds
Run the unchanged initrd builder with fixture binaries and inspect both generated archives. Replace source extraction with checks for selected libraries and their contents.
2026-10-12 13:58:45 -03:00
Vinícius Ferrão a4e14299ee test(ubuntu): exercise genimage mirror selection
Read site settings from an isolated database and inspect the sources.list written into the image. Stop at an injected package-metadata failure without downloading packages.
2026-10-12 13:58:45 -03:00
Vinícius Ferrão 5013f85774 test(ubuntu): check debootstrap architecture arguments
Run genimage and inspect the arguments passed to debootstrap instead of evaluating an extracted assignment. Keep the existing ppc64le pass-through explicit.
2026-10-12 13:58:45 -03:00
Vinícius Ferrão 114efc35e1 test(ubuntu): exercise live-media imports and warnings
Replace source-text assertions with real media imports in an isolated filesystem and database. Run the native fixture before the package build in CI.
2026-10-12 13:58:32 -03:00
Daniel Hilst 495bb36db9 Merge pull request #7930 from VersatusHPC/fix/packimage-atomic-archive
fix(packimage): replace the root image archive only after a complete pack
2026-10-12 13:36:30 -03:00
Vinícius Ferrão e7b91df46f docs(packimage): describe how packimage replaces the root image archive
The man page said that packimage overwrites the root image and that nodes
cannot use it while packimage runs. Describe the replacement instead, and
the disk space that it needs.
2026-10-12 12:15:52 -03:00
Vinícius Ferrão 8816ea47f1 test(packimage): cover the replacement of the root image archive
The test packs cpio and tar archives with gzip, xz and pigz, and squashfs
images, on the Red Hat path. A wrapper around the compressor, mksquashfs,
cpio or find records the file under the final name while the pack runs,
and then runs the real tool or fails.

It checks that nodes get the previous archive during the pack, that a
pack whose compressor, cpio or file listing fails keeps the previous
archive, metainfo and other formats, that a successful pack replaces
them, and that no temporary file is left. The next pack removes a
temporary file or directory that an interrupted pack on the same host
left, and keeps one that another host is writing.

For a StateLite tree, it checks that a pack that fails while listing the
files, compressing them or creating the temporary directory restores the
files that packimage switched, and that a retry keeps them. When a file
cannot be moved back, the original and the previous archive must stay,
and the next pack must refuse to run.

A pack must wait while another host holds .packimage-publish. When a
pack that did not finish left the lock, the next pack must fail, name the
holder, and keep the previous archive and the lock. With --tracker,
ctorrent must build the metainfo from the new archive under its final
name before the archive is replaced. A ctorrent failure must keep the
previous archive and metainfo, and so must a previous metainfo that
cannot be removed.
2026-10-12 12:15:52 -03:00
Vinícius Ferrão 49ffae9862 fix(packimage): replace the root image archive only after a complete pack
packimage deleted every rootimg.* file before it packed, and wrote the new
cpio or tar archive under its final name with mode 0600. Until the pack
finished, a node that booted got HTTP 403 for its image. When the pack
failed, the image was gone or left truncated, and no node could boot until
a later pack succeeded.

Build every archive in a temporary directory inside the image directory,
and rename the archive over the final name only after the pack succeeds,
as the openEuler path already did with a temporary file. With --tracker,
ctorrent builds the metainfo in the same directory, from the new archive
under its final name. The previous metainfo is removed before the archive
is renamed, and the new metainfo is renamed after it, so no failure
leaves a metainfo that describes another archive. The other rootimg.*
files are removed after the rename. The next pack on the same host
removes a temporary directory that an interrupted pack left. Image locks
are per host, so temporary directories of other hosts that share the
directory stay.

A pack now also fails when find cannot list the image or cpio cannot read
a file, as on the openEuler path. Before, only the compressor status
counted, and such a pack published an incomplete archive.

Every failure after packimage switches a StateLite tree to stateless files
now switches it back. That includes a failure to create the temporary
directory or the squashfs staging directory, which File::Temp reports
with die. packimage records each file that it moves and checks each move. When
a file cannot be moved back, the original stays in .statebackup,
packimage reports it, and the next pack refuses to run until the files
are restored. The new archive replaces the previous one only after the
StateLite files are back. Before, a failed pack left the tree switched,
and a retry overwrote the saved StateLite files.

The image lock is per host, and service nodes mount a shared image
directory without NFS locks. So a pack also holds the directory
.packimage-publish while it replaces the archive and removes the other
formats. mkdir is atomic for every host, also on NFS without locks. When
the lock is older than 60 seconds, or stays held for 60 seconds, the pack
fails, names the holder, and keeps the previous archive. packimage does
not take the lock over, because its holder can still be running.

A ctorrent failure now fails the pack, and the previous archive and
metainfo stay. Before, a failed ctorrent left a partial metainfo, and
nodeset pointed nodes at it.
2026-10-12 12:15:51 -03:00
Vinícius Ferrão 7dea5f68b2 ci(test): install squashfs-tools and pigz for the packimage tests
The packimage tests skip their squashfs and pigz cases unless mksquashfs,
unsquashfs and pigz are installed. Install them in the unit test job so
that CI runs those cases.
2026-10-12 12:15:51 -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