2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-10-20 22:55:40 +00:00

28974 Commits

Author SHA1 Message Date
Daniel Hilst 306723152f Merge pull request #7958 from VersatusHPC/fix/genesis-journal-selection
fix(genesis): retain the selected journal entry across history rollover
2026-10-19 16:14:11 -03:00
Vinícius Ferrão f9024b9fd2 docs(test): describe journal selection rollover coverage 2026-10-18 19:28:55 -03:00
Vinícius Ferrão 53a2b75d49 test(genesis): cover paused journal selection during rollover 2026-10-18 19:28:55 -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
Daniel Hilst b5f48f2089 Merge pull request #7956 from VersatusHPC/fix/genesis-first-journal-entry
fix(genesis): retain the first entry in the journal view
2026-10-17 18:55:12 -03:00
Daniel Hilst 44386f7a47 Merge pull request #7960 from VersatusHPC/fix/imgimport-restore-boot-files
fix(imgport): put back the image when its definition cannot be written
2026-10-17 18:53:05 -03:00
Vinícius Ferrão 431bd0c23f test(imgport): cover the boot files after a failed definition write
Each failure of the definition write runs over a published image, an
image without a checksum, a new image, or a statelite image. The
previous root image, checksum, metainfo, kernel and ramdisk must be
back, and the files of a new image must be gone. When a row does not go
back, also after a changed rootimgdir, the new files must stay. The
publication lock must be held during the writes and released after
them. A row written before its call failed must keep the new files.
2026-10-17 00:16:05 -03:00
Vinícius Ferrão c0f1bef473 fix(imgport): put back the boot files when the definition is not written
imgimport publishes the root image, kernel and ramdisk before it writes
the image definition. When the database refused or failed a write, the
new boot files stayed with the previous definition.

The import now holds the publication lock of the image from before it
places the files until the outcome of the definition is known. When the
definition is not written and its rows went back, it puts back the
previous files, with the checksum and metainfo of the root image. It
removes the files that had no previous version. While a row did not go
back, the new files stay, as that row can refer to them.
2026-10-17 00:16:05 -03:00
Vinícius Ferrão 161a876f36 test(svrutils): cover a caller that holds the publication lock
A caller takes the publication lock, then publishes or removes a root
image under it. Another host must not get the lock meanwhile, the lock
must stay held until the caller releases it, and a lock that another
host left must be reported.
2026-10-17 00:16:05 -03:00
Vinícius Ferrão 06311b04bb feat(svrutils): let a caller hold the publication lock of a root image
The image lock is per host, so another host can publish a root image
between two steps of a caller. lock_rootimg_publication and
unlock_rootimg_publication let a caller hold the publication lock across
such steps. publish_rootimg takes the held lock, and the new
unpublish_rootimg removes an archive with its checksum and metainfo
under it.
2026-10-17 00:16:05 -03:00
Vinícius Ferrão 82f03324b3 test(imgport): cover the image rows after a failed definition write
The database refuses the linuximage, kit or kitrepo write, the
linuximage commit dies, or a kitrepo section of an unexpected shape
dies, after earlier rows are written. The osimage row, also a disabled
one, one with a quote in a value, or one whose disable column was NULL,
and a previous linuximage row with its rootimgdir must be back, and a
new linuximage row must be gone. A kit that another import uses and a
row that another writer changed or filled must stay. A restore that
fails, or a row that cannot be read back, must be reported.
2026-10-17 00:16:05 -03:00
Vinícius Ferrão 89a8fc78f4 fix(imgport): put back the image rows when a later definition write fails
set_config writes the osimage, linuximage and kit rows one by one. When
a later write failed, the rows written before it stayed. An image could
keep a new linuximage row, with a new rootimgdir, beside its previous
osimage row.

set_config now keeps the osimage and linuximage rows that it replaces,
disabled rows included. When a write or its commit fails, or bundle
data of an unexpected shape dies between the writes, it checks each row
that it tried to write. It writes changed rows back and removes the rows
that it added, with NULL values as NULL. It skips a row that another
writer changed or filled, so that change stays. set_config reports the
rows that did not go back, also to a caller that asks for their number.
Kit rows stay as written, because other images can use them.
2026-10-17 00:16:04 -03:00
Vinícius Ferrão a72899b5a1 test(imgport): cover a definition write that the database refuses
A database trigger refuses the write to the osimage or the linuximage
table after the import opened it. The write also dies, gets no reply,
dies after its row is written, or its commit dies. The import must fail
and name the table, unless the row is written. It must leave no
transaction open and keep the pending write of another request.
2026-10-17 00:16:04 -03:00
Vinícius Ferrão 20bc593b61 fix(imgport): fail an import when the database refuses its definition
imgimport ignored the result of each write of the image definition. A
write that the database refused left the previous rows, and the import
still reported success. The import now fails and names the table when a
write returns an error, returns no reply or dies, or its commit fails.
A row that holds the new values despite the failure counts as written,
with a warning.

After a failed write the import commits, as before. A rollback would
drop the pending writes of other requests, which share the transaction
of the table in the database worker.
2026-10-17 00:16:04 -03:00
Daniel Hilst 9b2c5569fd Merge pull request #7941 from VersatusHPC/refactor/r26-credential-reuse
refactor(postscripts): share credential reply filtering and decoding
2026-10-16 21:25:48 -03:00
Vinícius Ferrão 0dfc1014da docs(genesis): describe journal test prerequisites 2026-10-16 21:04:44 -03:00
Vinícius Ferrão 90237b951e test(genesis): cover journal cursor boundaries 2026-10-16 20:53:19 -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
Daniel Hilst 43dee182ef Merge pull request #7909 from VersatusHPC/feat/secureboot-ipxe
fix(ipxe): a node with Secure Boot on cannot load the kernel
2026-10-16 20:44:36 -03:00
Vinícius Ferrão 97fce5a590 docs(test): list credential fixture prerequisites 2026-10-16 20:21:57 -03:00
Vinícius Ferrão b315ceaee0 test(postscripts): exercise credential replies and retries
Run the complete postscripts with controlled credential replies and native
SSH key generation. Check successful and empty replies, server errors,
retry limits, flow-control differences and password logging.
2026-10-16 20:21:42 -03:00
Vinícius Ferrão 4a525a77f4 refactor(postscripts): share credential reply filtering and decoding
Move the common credential response filters into xcatlib.sh. Keep the
requests, key retry filters and caller-specific retry, flow-control and
listener handling in place.
2026-10-16 20:21:18 -03:00
Daniel Hilst 558bf24138 Merge pull request #7923 from VersatusHPC/test/r26-profile-rendering
test(provisioning): exercise rendered profiles and installer commands
2026-10-16 20:19:26 -03:00
Daniel Hilst 1bde265fc4 Merge pull request #7924 from VersatusHPC/test/r26-isolated-scripts
test(provisioning): isolate disk, kdump and sudoer checks
2026-10-16 20:16:49 -03:00
Daniel Hilst 2e3ba914cd Merge pull request #7948 from VersatusHPC/fix/imgimport-checks
fix(imgport): check an imgimport before it writes anything
2026-10-16 20:05:38 -03:00
Daniel Hilst 7f2d271eb0 Merge pull request #7953 from VersatusHPC/fix/genimage-run-mountpoint
fix(genimage): create the /run mount point before mounting it
2026-10-16 20:00:57 -03:00
Daniel Hilst 2fb100009d Merge pull request #7952 from VersatusHPC/test/r26-networkmanager-file-io
test(network): reuse binary I/O for NetworkManager fixtures
2026-10-16 19:15:49 -03:00
Vinícius Ferrão c30447e94f docs(test): describe the disk selection test boundary 2026-10-16 19:07:03 -03:00
Vinícius Ferrão 28b22d7825 test(provisioning): exercise disk selection with BATS
Source the unchanged selector with explicit partition and udev fixtures.
Bound awk discovery to the fixture so runner filesystem size cannot delay
selection. Keep rendered-installer coverage and independent CI failures.
2026-10-16 19:06:47 -03:00
Vinícius Ferrão ab034a6d58 test(provisioning): avoid aborting the isolated script suite 2026-10-16 19:06:47 -03:00
Vinícius Ferrão 5426b3fba0 docs(test): describe isolated script prerequisites 2026-10-16 19:06:46 -03:00
Vinícius Ferrão 7557d00481 test(sudoer): isolate account and privilege configuration 2026-10-16 19:06:26 -03:00
Vinícius Ferrão 599cd3f32f test(kdump): execute per-node configuration in isolation 2026-10-16 19:06:26 -03:00
Vinícius Ferrão 509a60def2 test(provisioning): isolate install disk selection checks 2026-10-16 19:06:25 -03:00
Vinícius Ferrão 0b70a389a3 test(genimage): check the chroot mounts of a new RPM image
The image caller tests create the run directory in their fixture
image, so they did not see a bind mount to a missing mount point.

Run rh/genimage on a new and on an existing image directory. The mount
fixture fails like mount(8) when the mount point is missing, and the
package manager fixture records the mounts in place when the packages
install. Cover EL9 through the rh and rocky entry points, and EL6,
which does not mount /proc and /sys. The pull-request workflow runs
the test.
2026-10-16 18:45:27 -03:00
Vinícius Ferrão 042804fe5e fix(genimage): create the /run mount point before mounting it
mount_chroot bind-mounts the host /run into the image root before the
run directory exists there. On the first build of a new image, mount
fails with "mount point does not exist". genimage does not check the
result, so the packages install without the host /run.

Create the directory first, as mount_chroot already does for /proc,
/sys and /dev. The mount also uses the subroutine argument instead of
the global image path. Both have the same value at every call site.
2026-10-16 18:45:07 -03:00
Vinícius Ferrão 7c930bee9d test(imgport): cover the image lock of a statelite import
A statelite import must ask for the lock of its image directory. While
another command holds the lock, the import must fail, report the lock,
leave the tree in the bundle, and keep the image definition.
2026-10-16 18:38:06 -03:00
Vinícius Ferrão 9ecde2b838 fix(imgport): take the image lock for a statelite import
imgimport took the image lock only when the bundle had a rootimg. A
statelite bundle has a rootimgtree instead, so its import extracted the
tree while genimage, packimage, liteimg or rmimage could change the same
image. imgimport now locks the directory of the first of the rootimg,
rootimgtree, kernel and ramdisk that the bundle has.
2026-10-16 18:38:00 -03:00
Vinícius Ferrão 0437ddd44d test(imgport): cover the image definition after a failed import
Check that the image definition stays when another host holds the
publication lock, or when the file system refuses the publication.
Check the same when a table of the definition opens only with
autocommit. Check that the definition matches the published image when
an extra file fails to copy after the publication.
2026-10-16 18:37:59 -03:00
Vinícius Ferrão c6ff6f6b77 fix(imgport): place the boot files of an image before its definition
imgimport wrote the image definition before it published the root
image. When the publication failed, as when another host held the
publication lock, the import failed with the new definition and the
previous files.

imgimport now places the root image, kernel and ramdisk first, then
writes the image definition, then places the other files. A later
failure leaves the definition that matches the published boot files,
as before. Before it writes anything, imgimport also opens the tables
of the image definition without autocommit, as it writes them. A table
that it cannot open then leaves the files as they were.
2026-10-16 18:37:59 -03:00
Vinícius Ferrão dd15396eef test(imgport): run the litefile lookup through place_image
The litefile lookup test called make_files, which places the litefile
of the bundle before it reads it. The test now calls place_image, the
entry point of imgimport, so it does not depend on the step that places
the litefile.
2026-10-16 18:37:59 -03:00
Vinícius Ferrão 73b0f8fc0a test(imgport): cover the bundle file check of an import
Import bundles that lack the kernel, an extra file or a kit, and check
that each is reported and changes nothing.
2026-10-16 18:35:25 -03:00
Vinícius Ferrão de36cffe8e fix(imgport): check the files of a bundle before the import writes
imgimport moved the boot files and kits of a bundle without a check,
and copied the extra files after it had already written the image. A
bundle without its kernel or a kit then gave a broken image without
an error. A missing extra file failed the import after it published
the root image and wrote the image definition.

imgimport now checks the boot files, kits, extra files and raw image
files that the manifest names. It does this before it writes anything,
and reports each missing file.
2026-10-16 18:35:25 -03:00
Vinícius Ferrão ad528dfee6 test(imgport): cover the node check of an import
Import for a defined node and for an undefined one, and check that an
undefined node changes nothing.
2026-10-16 18:35:25 -03:00
Vinícius Ferrão 7838c3240a fix(imgport): check the nodes of an import before it writes anything
imgimport -n checked its nodes when it set their postscripts. By then
it had published the root image, placed the other files and written the
image definition. An undefined node then left a half-imported image.

imgimport now checks the nodes before it writes anything, and fails
with the same error.
2026-10-16 18:35:25 -03:00
Vinícius Ferrão c2d64d4e58 docs(test): describe profile artifact test prerequisites
List the native cases selected by CI, their dependencies and their isolation requirements. Distinguish rendered-artifact execution from operating-system and firmware boot qualification.
2026-10-16 18:33:42 -03:00
Vinícius Ferrão 1d362211e7 test(ubuntu): execute rendered Subiquity command sequences
Render Subiquity configuration with real database rows and execute the emitted commands in private namespaces. Check resulting files, failure ordering and the install-monitor handshake without rewriting shell fragments.
2026-10-16 18:33:42 -03:00
Vinícius Ferrão fdf18e24c3 test(packaging): run the generated Debian repository helper
Build a real package and repository, then execute the generated helper with representative host architectures and releases. Check its apt configuration and preserve unrelated sources.
2026-10-16 18:33:41 -03:00
Vinícius Ferrão 4c47d8b3ec test(netboot): execute selected RISC-V postinstall scripts
Run each selected postinstall script in an isolated filesystem. Check SELinux settings and fstab after repeated execution instead of comparing shell source.
2026-10-16 18:33:41 -03:00
Vinícius Ferrão 7af7b97a78 test(provisioning): execute rendered RISC-V install checks
Render the selected profiles with an isolated database. Check the installer data and run the emitted post-install blocks against a private filesystem, including the EFI fallback and missing-loader paths.

Run the native case from the source snapshot preserved before CI package builds.
2026-10-16 18:33:41 -03:00