2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-10-22 15:48:14 +00:00
Commit Graph

28654 Commits

Author SHA1 Message Date
Vinícius Ferrão 90d7813d7d test(packaging): cover upgrades without the postscript payload
Exclude node postscripts through the native RPM and dpkg options. Verify
that upgrade configuration, captured output and cleanup still complete.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-12 12:35:35 -03:00
Vinícius Ferrão ca9a5301df fix(packaging): embed upgrade functions in package scripts
Generate self-contained RPM and Debian upgrade scripts from the shared
source. Package transactions no longer load functions from the node-facing
postscript payload. Keep the existing command, logging and failure policies.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-12 12:33:26 -03:00
Vinícius Ferrão eb2df9cb70 test(packaging): stage shared shell scriptlet sources
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-12 12:31:56 -03:00
Vinícius Ferrão 88b2df8ec5 docs(test): describe package upgrade logging cases
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 11:50:49 -03:00
Vinícius Ferrão 41839052cc test(packaging): exercise upgrade logging and failure policy
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 11:50:49 -03:00
Vinícius Ferrão 13d106f3db refactor(packaging): share upgrade output handling
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 11:50:49 -03:00
Vinícius Ferrão b75a959915 test(init): exercise packaged release classification
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 11:49:59 -03:00
Vinícius Ferrão cd90878516 refactor(init): share target detection and pending-state cleanup
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 11:46:10 -03:00
Vinícius Ferrão 26f261b3e1 test(init): stage the complete compatibility helper bundle
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 11:41:46 -03:00
Vinícius Ferrão e41710a675 test(packaging): cover saved Apache defaults and config roots
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 11:41:45 -03:00
Vinícius Ferrão ee6859d903 refactor(packaging): share the Apache configuration migration
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 11:34:34 -03:00
Vinícius Ferrão f11b740b56 test(packaging): stage shared Lua scriptlet sources
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 11:32:21 -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
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
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
Vinícius Ferrão e83ddfe0d9 test(packaging): exercise Debian service lifecycle 2026-10-09 03:22:46 -03:00
Daniel Hilst 2840a965a6 Merge pull request #7903 from middelkoopt/tm-aarch64-mn
aarch64: management-node support (EL10 netboot pkglist + spec Requires)
2026-10-08 15:34:50 -03:00
Daniel Hilst 5952dc04a2 Merge pull request #7594 from VersatusHPC/feat/fips-support
feat(fips): support installation on FIPS-enabled systems
2026-10-07 10:34:18 -03:00
Daniel Hilst e469015227 Merge pull request #7902 from VersatusHPC/test/r26-routeop-behavior
test(routeop): exercise the complete postscript
2026-10-07 10:33:41 -03:00
Daniel Hilst 332e054516 Merge pull request #7897 from VersatusHPC/fix/openeuler-ppc64le-core-mock-resultdir
fix(xcat-core): the openEuler ppc64le core build cannot write its own resultdir
2026-10-07 10:31:05 -03:00
Daniel Hilst 644dd3d4d1 Merge pull request #7901 from VersatusHPC/fix/openeuler-encrypted-passwd-openssl
fix(xcat-core): encrypted_passwd_openssl_diskfull reports no password on openEuler
2026-10-07 10:30:30 -03:00
Daniel Hilst 1a0cebb7df Merge pull request #7904 from middelkoopt/tm-genimage-gpgcheck-v3
feat(genimage): opt-in package signature checks for EL images
2026-10-07 10:24:26 -03:00
Daniel Hilst 324507651c fix(xcat-core): the chrootuid comment and its assertion describe mock wrongly
build-utils/lib/XCAT/BuildUtils.pm said the inherited chrootuid 1000 stays in
effect for the chroot. A mock configuration is Python, so the later assignment
replaces the value and nothing reads 1000 afterwards. The in-chroot build user
becomes uid 0.

buildrpms_mock_resultdir_uid.t asserted that the inherited line is still
present. The pattern is a line of the test's own fixture and mock_config_text
only appends, so the assertion passes even when the function returns the base
text unchanged. It is removed.

The comment now states the replacement and its consequence, and records why
chrootgid is left unset. Without the chrootuid assignment the file fails 2 of
10.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-06 22:05:25 -03:00
Timothy Middelkoop d1faba077c feat(genimage): opt-in package signature checks for EL images
Add the linuximage gpgcheck attribute. When it is set to 1 or yes,
genimage passes --gpgcheck to the shared RPM image builder, which
exports the builder's trusted RPM keys exactly as it does for openEuler
and writes gpgcheck=1 with that gpgkey for the pkgdir, kerneldir and
otherpkgdir repositories. Unset keeps the existing unverified
configuration, openEuler stays always verified, and builders without
the option reject the attribute instead of ignoring it.

Collect the otherpkgs repositories in imgutils so that an otherpkgdir
holding only URLs no longer adds a file:/// repository that fails to
download metadata on EL.

Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 11:24:33 -05:00
Timothy Middelkoop d95b190461 aarch64: management-node support (EL10 netboot pkglist + spec Requires)
xCAT builds and runs on aarch64, but two pieces were missing for an EL10
aarch64 management node:

- No compute.rhels10.aarch64.{pkglist,exlist,postinstall}, so genimage
  fell back to the generic EL8/9-shaped compute.pkglist (dhclient,
  busybox-anaconda), which does not resolve on EL10 aarch64. Add the rh
  files (same content as the other EL10 architectures) with alma/rocky
  aliases, following the x86_64/ppc64le layout.
- xCAT.spec had Requires blocks for x86, ppc and riscv64 but none for
  aarch64, so an aarch64 install pulled no ipmitool-xcat. Add the block,
  mirroring riscv64: ipmitool-xcat plus ipxe-xcat (an aarch64 management
  node can serve x86 nodes); the x86-only PXE stack stays excluded.

Tests: extend el10_netboot_dhcp_client.t to the aarch64 lists and add
aarch64_packaging.t for the spec block and the netboot file layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2026-10-06 10:51:37 -05:00
Vinícius Ferrão 6fc1f332cb docs(test): document routeop sandbox prerequisites 2026-10-06 12:21:47 -03:00
Vinícius Ferrão ca33542789 test(routeop): exercise the complete postscript
Replace the extracted-function Perl runner with BATS tests that invoke
routeop in isolated Linux namespaces. Check route commands, persistent
entries, matching routes, and replacement failures.
2026-10-06 12:21:47 -03:00
Daniel Hilst edb7d3217a fix(xcat-core): encrypted_passwd_openssl_diskfull reports no password on openEuler
The case failed on openeuler20.03sp4, openeuler22.03sp4 and openeuler24.03sp4, 3 occurrences
in xcat-ci build 89. The diff check failed, not the extraction.

encrypted_passwd_openssl_diskfull is the only case in passwd/case0 that selects the extraction
by distribution. It greps /etc/*release for SUSE, then for "Red Hat|CentOS|Rocky|Alma", then for
Ubuntu. On an openEuler management node all three miss and openEuler matches, so the case takes
the final arm, prints "Sorry,this is not supported os", writes nothing to
/tmp/instcryptedpasswd, and the diff against the password table reports rc=2.

openEuler now takes the Red Hat arm. compute.openeuler.tmpl writes
"rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password#", which is byte-identical
to every EL template, so field 3 holds the hash and the EL cells already pass with that arm.

The diff check is unchanged, so the case still fails when the extraction reads the wrong field:
field 3 of the expanded line gives diff rc=0 and field 4 gives rc=1.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit a1b9372c413f54d18ba6a60d3839e9f75d7b8261)
2026-10-06 10:32:33 -03:00
Daniel Hilst 93322cd0f4 Merge pull request #7899 from VersatusHPC/fix/xcat-ws-conf-module-path
fix(xCAT-server): xcat-ws.conf names a SUSE module path and never matches its package
2026-10-06 10:21:57 -03:00
Daniel Hilst 74f0267ca1 Merge pull request #7898 from VersatusHPC/fix/openeuler-nicextraparams-ifcfg-persist
fix(configeth): a nicextraparams key never reaches an ifcfg NIC profile
2026-10-06 10:21:31 -03:00
Vinícius Ferrão 3976dd96b3 docs(fips): describe installation and validation boundaries 2026-10-05 22:56:35 -03:00
Vinícius Ferrão cb70af1e16 test(discovery): exercise bootstrap signing and reused keys 2026-10-05 22:56:00 -03:00
Vinícius Ferrão 3908b13960 fix(discovery): use FIPS-compatible bootstrap keys 2026-10-05 22:55:27 -03:00
Vinícius Ferrão 923fe01d2d test(dhcp): cover conditional SHA client requirements 2026-10-05 22:54:53 -03:00
Vinícius Ferrão b633f669c4 fix(dhcp): check SHA support only when OMAPI requires it 2026-10-05 22:54:27 -03:00
Vinícius Ferrão 6cd25ac453 test(kea): cover FIPS key errors and legacy compatibility 2026-10-05 22:53:43 -03:00
Vinícius Ferrão 45d773d5cd fix(kea): propagate invalid FIPS key policy 2026-10-05 22:53:29 -03:00
Vinícius Ferrão f095e5da81 test(dhcp): cover shared FIPS defaults and BIND signing 2026-10-05 22:52:49 -03:00
Vinícius Ferrão d01cb679eb fix(dhcp): share SHA-256 key policy in FIPS mode 2026-10-05 22:52:34 -03:00
Vinícius Ferrão dc2f83a2de test(ssh): exercise FIPS policy and optional host keys 2026-10-05 18:14:20 -03:00
Vinícius Ferrão 750ed7e5a5 fix(ssh): skip optional DSA host keys in FIPS mode 2026-10-05 18:14:20 -03:00
Vinícius Ferrão 449c52acfe test(dhcp): isolate compatibility fixtures from host FIPS mode 2026-10-05 18:14:20 -03:00
Daniel Hilst 86aaceb714 fix(xcat-core): read the NIC configuration from the file NetworkManager reports
confignetwork_secondarynic_nicextraparams_updatenode fails on EL8 because the dump
nic_cfg.sh prints carries no extra params, although configeth wrote CONNECTED_MODE and the
node has it.

nm_show resolves the connection's backend file by globbing
/etc/NetworkManager/system-connections for the UUID. The keyfile plugin keeps a connection
there, and on EL9 and EL10 it is the only plugin. On EL8 the ifcfg-rh plugin owns the
connection and keeps it under /etc/sysconfig/network-scripts, so the glob matches nothing and
no file is dumped. Every check that greps the dump for a value nm_show does not normalize
then sees nothing.

Ask NetworkManager for the path through the UUID,FILENAME fields and keep the glob as a
fallback. Read the MTU from either spelling, because a keyfile writes "mtu=" and an ifcfg
file "MTU=".

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-05 14:07:47 -03:00
Daniel Hilst b1d3190298 fix(xcat-core): the nicextraparams repair keeps a stale value and joins lines
xcat_persist_nic_extra_param only appended a key that was absent. When the profile already held
CONNECTED_MODE=no, a request for yes left no. It appended after the last line, so a profile with
no final newline got NAME=xcat-ens4CONNECTED_MODE=yes. In a keyfile it appended at the end of the
file, which is not the [user] section when another section follows it.

The function now rewrites the profile with awk. It replaces the line of the exact key, or inserts
the key at the end of [user] for a keyfile and at the end of an ifcfg file. It adds [user] when the
keyfile has none.

The repair block of configeth moves into xcat_nm_persist_nic_extra_params, so a test can reach the
store decision. configeth calls it after the last nmcli con up. xcat_uses_nm_keyfile now calls
xcat_nm_conn_file instead of repeating its two nmcli calls.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-05 14:07:47 -03:00
Daniel Hilst 2228479cac test(xcat-core): capture the nicextraparams repair on an ifcfg profile
The persist test sourced only xcatlib.sh and never reached the gate in configeth that skipped an
ifcfg profile, so putting that gate back left every test green. Its refusal test also passed on a
127 from a missing function.

The test now calls the repair through xcat_nm_persist_nic_extra_params with nmcli stubbed to
report an ifcfg file and a keyfile. It also captures three faults of xcat_persist_nic_extra_param:
it keeps an old value, it joins the key to a last line with no newline, and it appends a keyfile
key after a section that follows [user].

nic_cfg.bats captures that nm_show prints no profile when NM reports an ifcfg file, so the xcattest
case cannot match CONNECTED_MODE=yes there. nic_cfg.sh returns before its dispatch when sourced.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-05 14:07:36 -03:00