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

28904 Commits

Author SHA1 Message Date
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
Daniel Hilst d5da7b0b5c Merge pull request #7937 from VersatusHPC/refactor/r26-bmc-reuse
refactor(genesis): share BMC field readers
2026-10-16 18:19:18 -03:00
Daniel Hilst cf170b36c4 Merge pull request #7942 from VersatusHPC/feat/rootimg-sha256
feat(netboot): check the root image against its SHA-256 checksum
2026-10-16 18:18:10 -03:00
Daniel Hilst fb9541ffde Merge pull request #7949 from VersatusHPC/fix/table-commands
fix(table): refuse extra tabrestore fields and unknown chtab -d tables
2026-10-16 18:17:31 -03:00
Daniel Hilst b17d37380a Merge pull request #7912 from VersatusHPC/fix/kvm-aarch64-guest-arch
fix(kvm): mkvm builds an aarch64 node as an x86_64 domain
2026-10-16 11:03:20 -03:00
Daniel Hilst d8c38ec6d2 Merge pull request #7906 from VersatusHPC/fix/openeuler-core-mock-resultdir-owner
fix(xcat-core): the openEuler ppc64le core build runs rpmbuild as root
2026-10-15 18:15:42 -03:00
Vinícius Ferrão e9dcd9f631 docs(test): describe BMC sandbox coverage 2026-10-15 15:09:51 -03:00
Vinícius Ferrão b784c95e06 test(genesis): cover BMC configuration field behavior 2026-10-15 15:09:10 -03:00
Vinícius Ferrão f7621a6cae refactor(genesis): share BMC configuration field reads 2026-10-15 15:09:10 -03:00
Vinícius Ferrão dcf68e8afb test(genesis): cover BMC LAN query and retry behavior 2026-10-15 15:09:10 -03:00
Vinícius Ferrão e70cd9a961 refactor(genesis): share BMC LAN field queries 2026-10-15 15:09:09 -03:00
Daniel Hilst 39c12e119b fix(xcat-core): give the release repository test a stand-in for mock's loader
buildall now calls prepare_mock_resultdirs before the cache checks, so a
cached build also loads the mock configuration through mockbuild.config.
release_repository.t builds xCAT-release in a user namespace on a host
without mock, and the build stopped with "mock is not installed: cannot
import mockbuild.config".

The namespace fixture already stands in for /etc/mock. It now also puts a
stand-in mockbuild package on PYTHONPATH. Its load_config fails when the
chroot configuration is missing, and reports the caller as chrootuid, as
mock does when no chrootuid is set. buildrpms.pl is unchanged.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-15 14:42:47 -03:00
Daniel Hilst 7c011fc9e5 Merge pull request #7916 from VersatusHPC/fix/probe-debian-directory-permissions
fix(probe): preserve Debian library directory permissions
2026-10-15 13:53:54 -03:00
Daniel Hilst c9e36a9c49 Merge pull request #7914 from VersatusHPC/refactor/r26-boot-artifacts
refactor(boot): reuse Genesis and HTTP helpers
2026-10-15 13:51:40 -03:00
Daniel Hilst 5c6347d930 Merge master into fix/openeuler-core-mock-resultdir-owner
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-15 13:42:27 -03:00
Vinícius Ferrão ea9d474303 docs(test): describe boot artifact sandbox requirements 2026-10-14 13:30:01 -03:00
Vinícius Ferrão e426804450 test(mknb): separate selector and compression checks 2026-10-14 13:30:01 -03:00
Vinícius Ferrão 3856dbeee8 refactor(boot): remove the private Genesis selector name 2026-10-14 13:30:00 -03:00
Vinícius Ferrão 8787b8484d test(boot): use the public Genesis file selector 2026-10-14 13:30:00 -03:00
Vinícius Ferrão 3b50ed9036 refactor(boot): expose the Genesis file selector 2026-10-14 13:30:00 -03:00
Vinícius Ferrão 90d0cf2779 test(mknb): exercise Genesis publication and rollback failures 2026-10-14 13:30:00 -03:00
Vinícius Ferrão a4066f75e3 refactor(mknb): stage Genesis artifacts with File::Temp 2026-10-14 13:29:22 -03:00
Vinícius Ferrão 68568ae3bc test(mknb): detect staging leftovers without fixed random names 2026-10-14 13:29:22 -03:00
Vinícius Ferrão 93b87ba063 test(http): characterize port defaults at boot URL callers 2026-10-14 13:29:22 -03:00
Vinícius Ferrão 937f6895f0 refactor(http): share port suffix formatting across boot callers 2026-10-14 13:29:22 -03:00
Vinícius Ferrão a6bf1a8695 test(boot): load source-tree dependencies in plugin fixtures 2026-10-14 13:29:22 -03:00
Vinícius Ferrão 9d3b78ca08 test(boot): cover Genesis selection across installer consumers 2026-10-14 13:29:22 -03:00
Vinícius Ferrão 6713d01af3 refactor(boot): share Genesis artifact selection 2026-10-14 13:29:22 -03:00
Vinícius Ferrão eb76a33652 test(genesis): load production architecture and repository owners 2026-10-14 13:29:21 -03:00
Vinícius Ferrão 35d01515eb test(mknb): exercise compression and archive publication 2026-10-14 13:29:21 -03:00
Vinícius Ferrão d59a683570 docs(test): describe the liteimg archive test 2026-10-14 13:14:50 -03:00
Vinícius Ferrão 0cca31bd2b test(statelite): run the liteimg archive test with the native tests
The liteimg archive test runs real cpio and gzip, and puts compressor
and ctorrent fixtures in PATH. That is a native test, so it moves out
of the unit suite. The pull-request workflow runs it explicitly.

A missing Linux tool now fails the test instead of skipping it. An
ilitefile fixture replaces the runcmd override, so liteimg runs its
commands through the real runcmd.
2026-10-14 13:14:50 -03:00
Vinícius Ferrão 67ada58599 test(tableutils): cover the delete of rows from several tables
delete_rows must delete the rows of the keys from every table that
opens. When a named table does not open, first, last or between two
tables, it must return that table and delete no row.
2026-10-14 13:14:42 -03:00
Vinícius Ferrão 06a3f486c7 fix(chtab): report a table that chtab -d cannot open
chtab -d called delEntries on each table that it named without a check
that the table opened. A table name that xCAT does not know made chtab
die after it had deleted the rows of the tables named before it. The
error was "Can't call method delEntries on an undefined value".

The delete moves to xCAT::TableUtils->delete_rows, which opens every
named table first. When a table does not open, it deletes no row and
returns the table name. chtab -d reports that table with the error of
the update form.
2026-10-14 13:14:42 -03:00
Vinícius Ferrão 1d7374c0e4 test(tabutils): cover the field count of a tabrestore row
tabrestore must restore a row with one field for each column, fewer
fields, or a quoted field that holds a comma. It must refuse a row with
an empty, 0 or text field after the last column, and roll back the
restore.
2026-10-14 13:14:41 -03:00
Vinícius Ferrão b7adfccad3 docs(test): describe the Debian probe permission check 2026-10-14 12:56:24 -03:00
Vinícius Ferrão 957c52fe53 test(probe): exercise Debian package permissions 2026-10-14 12:38:00 -03:00
Vinícius Ferrão be8ce8b975 fix(probe): preserve Debian library directory permissions
The Debian package set the xCAT helper directory to 0644, preventing
unprivileged users from loading the probe modules.

Set library directories to 0755 and regular files to 0644. Repair the old
helper-directory mode during configuration because dpkg preserves existing
modes. Leave administrator overrides, other modes, and symlinks unchanged.
2026-10-14 12:37:33 -03:00
Vinícius Ferrão 952787108e test(xnba): exercise generated boot scripts through nodeset 2026-10-14 12:37:32 -03:00
Daniel Hilst ba4824ef62 Merge pull request #7940 from VersatusHPC/fix/imgexport-destination
fix(imgport): write the imgexport bundle to its destination
2026-10-14 12:05:47 -03:00
Daniel Hilst bdd2a51efc Merge pull request #7945 from VersatusHPC/fix/imgimport-litefile-lookup
fix(imgport): quote the image column of the litefile lookup
2026-10-14 12:04:38 -03:00
Daniel Hilst 19d4b661af Merge pull request #7939 from middelkoopt/tm-configib-autoconnect
fix(postscripts/configib): turn autoconnect on when reusing a connection
2026-10-14 11:55:24 -03:00
Daniel Hilst c8a20a1ea2 Merge pull request #7950 from VersatusHPC/fix/kit-rhel-release
fix(kit): compare the RHEL release as a number
2026-10-14 11:53:59 -03:00