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.
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.
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.
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.
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.
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.
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>
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.
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.
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.
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.
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.