2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-08-03 16:06:59 +00:00
Commit Graph

27165 Commits

Author SHA1 Message Date
xcat2-backport-automation[bot] 233344ad7b Merge pull request #7688 from xcat2/backport-7630-to-2.18
[Backport 2.18] fix(networks): make IPv6 route filtering in donets() robust
2026-07-24 22:02:10 +00:00
xcat2-backport-automation[bot] 4ae707724e Merge pull request #7687 from xcat2/backport-7632-to-2.18
[Backport 2.18] fix(nodech): support comma-delimited values in the ,= and ^= operators
2026-07-24 21:54:59 +00:00
Vinícius Ferrão 83c8a56855 fix(test): load the installed networks plugin
(cherry picked from commit 3aff408657)
2026-07-24 21:44:32 +00:00
Vinícius Ferrão 2097bec822 fix(networks): validate IPv6 route filtering
(cherry picked from commit f8548ceeb9)
2026-07-24 21:44:32 +00:00
Vinícius Ferrão 39b78db3e8 fix(networks): skip nexthop and default lines when parsing IPv6 routes
`ip -6 route` output for ECMP/multipath routes carries `nexthop` continuation
lines, and a `default` route has no network prefix. donets() treated both as
networks and added bogus entries to the networks table. Skip them alongside
the existing link-local/unreachable/via/lo filtering.

Recovered from the unmerged lenovobuild branch (original 7094ba0c).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
(cherry picked from commit c97e973f36)
2026-07-24 21:44:32 +00:00
Vinícius Ferrão 96484651b9 fix(networks): exclude every link-local address from the networks table
donets() only skips the exact address 'fe80::/64' when scanning routes, so a
link-local route with any other prefix (e.g. a longer fe80:: subnet) is added
to the networks table as a bogus network. Match any fe80:: prefix instead of
the single literal value.

Recovered from the unmerged lenovobuild branch (original 8b79cf85).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
(cherry picked from commit d2be0c3865)
2026-07-24 21:44:32 +00:00
Vinícius Ferrão eed45bee6b test(nodech): cover comma-delimited group updates
(cherry picked from commit 25c9fb3836)
2026-07-24 21:42:07 +00:00
Vinícius Ferrão 967560180c fix(nodech): support multiple groups in the ^= operator
nodech's ^= operator removed only a single literal value, so
"nodech n1 groups^=a,b" tried to strip the combined string "a,b" and left the
individual groups in place. Split the value on commas and remove each piece.

Recovered from the unmerged lenovobuild branch (original 95c78b33).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
(cherry picked from commit f71ddef6ba)
2026-07-24 21:42:07 +00:00
Vinícius Ferrão 24f95a98b2 fix(nodech): handle comma-delimited values in the ,= operator
nodech's ,= operator appended the whole right-hand side as one value, so
"nodech n1 groups,=a,b" added the literal "a,b" and its duplicate check only
compared against that combined string. Split the value on commas and add each
piece individually, skipping any already present.

Recovered from the unmerged lenovobuild branch (original 086b0c0d).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
(cherry picked from commit 6e33661fc0)
2026-07-24 21:42:07 +00:00
xcat2-backport-automation[bot] 36823339b3 Merge pull request #7685 from xcat2/backport-7614-to-2.18
[Backport 2.18] fix(packaging): preserve xcatd init state across RPM transactions
2026-07-24 15:43:33 +00:00
xcat2-backport-automation[bot] bc04302b21 Merge pull request #7684 from xcat2/backport-7606-to-2.18
[Backport 2.18] refactor(dbobjutils): reuse only-if matcher for table routing
2026-07-24 15:42:32 +00:00
xcat2-backport-automation[bot] 8bcc00024a Merge pull request #7683 from xcat2/backport-7617-to-2.18
[Backport 2.18] fix(dhcp): avoid infinite loop building IPv6 reverse zones
2026-07-24 15:26:29 +00:00
Vinícius Ferrão 0c5cad78cf test(packaging): cover shared systemctl guard
(cherry picked from commit 6c26a10863)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão 12755bcac0 refactor(packaging): share systemctl readiness guard
(cherry picked from commit ef6e037366)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão f644b39581 test(packaging): cover fresh legacy defaults
(cherry picked from commit 3505c24040)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão a5315d5f78 fix(packaging): preserve fresh legacy defaults
(cherry picked from commit 09d1befb62)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão d19bd15beb test(packaging): prepare fresh legacy defaults
(cherry picked from commit 0826a6b1ad)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão 18f32cf648 test(packaging): cover custom SysV runlevels
(cherry picked from commit 9091b3f598)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão acd29fd40f fix(packaging): preserve custom SysV runlevels
(cherry picked from commit bdbf7b894a)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão a6873779ee test(packaging): cover legacy upgrade edge cases
(cherry picked from commit 7f44bd51bf)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão 2d4b691b05 fix(packaging): preserve unregistered legacy state
(cherry picked from commit 7df7da59b3)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão 4ae36a4d5c test(packaging): prepare legacy state resolution
(cherry picked from commit 9bff441795)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão 3f45307350 test(packaging): cover managed xcatd init scripts
(cherry picked from commit 4efcd5132b)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão db4c51dfed fix(packaging): preserve unmanaged xcatd init scripts
(cherry picked from commit 115c9cda7e)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão 096d9284c3 test(packaging): prepare managed init ownership
(cherry picked from commit 11709a2221)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão 5a4826ecc0 test(packaging): cover RPM init transitions
(cherry picked from commit 11f9cada05)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão ba8cdc6871 fix(packaging): converge xcatd init transitions
(cherry picked from commit a47e73dc46)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão 6e4f920b30 test(packaging): cover shared init management
(cherry picked from commit 5a9c32e885)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão e12f41aa9c refactor(packaging): centralize xcatd init management
(cherry picked from commit 5495f133e8)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão 1198dec568 test(packaging): allow shared init state detection
(cherry picked from commit 6d7de3a927)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão c21b860059 test(packaging): cover hybrid init targets
(cherry picked from commit 002634ef6b)
2026-07-24 15:25:45 +00:00
Vinícius Ferrão 557913693c fix(packaging): expose explicit init target detection
(cherry picked from commit 8489e15969)
2026-07-24 15:25:45 +00:00
xcat2-backport-automation[bot] ce8a11eb6d Merge pull request #7682 from xcat2/backport-7618-to-2.18
[Backport 2.18] fix(NetworkUtils): guard formatNetmask against an undefined mask
2026-07-24 15:24:50 +00:00
Vinícius Ferrão c876bbf790 test(dbobjutils): cover literal only-if routing
(cherry picked from commit 8a4fe18cbf)
2026-07-24 15:24:33 +00:00
Vinícius Ferrão c77e30fe52 refactor(dbobjutils): reuse only-if matcher for table routing
(cherry picked from commit fd32ae6860)
2026-07-24 15:24:33 +00:00
xcat2-backport-automation[bot] 08a31957ab Merge pull request #7680 from xcat2/backport-7634-to-2.18
[Backport 2.18] fix(rcons): resolve a conserver hostname before the local-address check
2026-07-24 15:22:53 +00:00
xcat2-backport-automation[bot] 8679320453 Merge pull request #7681 from xcat2/backport-7619-to-2.18
[Backport 2.18] fix(mknb): build the genesis image atomically to survive concurrent runs
2026-07-24 15:20:31 +00:00
Vinícius Ferrão 02557a42b3 fix(dhcp): avoid infinite loop building IPv6 reverse zones
getzonesfornet() derives the number of reverse-zone nibbles as
$nibbs = $maskbits / 4, then decrements it once per hex nibble of the network
prefix. For a sub-nibble (not 4-bit-aligned) IPv6 mask $nibbs can go negative
before the padding loop, and `while ($nibbs)` then never terminates: it keeps
decrementing past zero while appending "0." to $rev, spinning forever and
growing the string until the process is killed.

Make the padding loop `while ($nibbs > 0)` so it can never run away, and
return early only when $nibbs is genuinely negative. $nibbs == 0 is the normal
nibble-aligned case (e.g. a /64) and must still emit its reverse zone.

Recovered from the unmerged lenovobuild branch (original 0e070cd2). The
original guarded with `$nibbs < 1`, which also dropped the valid $nibbs == 0
case and left standard /64 subnets with no reverse zone; corrected to
`$nibbs < 0` after lab validation on a real provisioning cluster.

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
(cherry picked from commit f0a879491d)
2026-07-24 15:08:36 +00:00
Vinícius Ferrão 5cfd7b3428 fix(NetworkUtils): guard formatNetmask against an undefined mask
formatNetmask() uses its first argument immediately (inet_aton($mask),
2**$mask, hex $mask) with no check that it is defined. Callers that pass an
undefined mask trigger "Use of uninitialized value" warnings and a
meaningless result instead of a clean failure.

Return undef up front when $mask is not defined.

Recovered from the unmerged lenovobuild branch (original acbbeb86).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
(cherry picked from commit 2d294ae8f7)
2026-07-24 15:07:15 +00:00
Vinícius Ferrão 9821ade141 fix(mknb): build the genesis image atomically to survive concurrent runs
mknb writes the compressed genesis filesystem by streaming cpio output
straight onto the final path in $tftpdir/xcat (genesis.fs.$arch.lzma or .gz).
When two mknb/nodeset runs target a shared $tftpdir at once, one run reads or
overwrites the other's half-written image, producing a corrupt genesis.fs and
failed netboots.

Write each image to a uniquely-suffixed temporary file
(xCAT::Utils::genpassword(24)) and File::Copy::move() it into place. move()
within the same directory is a rename, so the final path only ever appears
complete. Both modules are already imported by mknb.pm.

Recovered from the unmerged lenovobuild branch (originals c651e7b8 and its
fix da0723f2, which switched the suffix to genpassword after the first
attempt only produced a single character). master lacks the branch's xz
path, so only the lzma and gzip paths are adjusted here.

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
(cherry picked from commit 6da5efd29a)
2026-07-24 15:05:52 +00:00
Vinícius Ferrão 6d6ace51b4 fix(rcons): resolve a conserver hostname before the local-address check
When nodehm.conserver is a hostname, rcons compared that name directly against
the management node's local IP addresses, so the "conserver is this host"
check never matched and rcons connected via `-s` (a remote confluent session)
even when the conserver was the local host. Resolve the name to an address
with getent first so the comparison works.

Recovered from the unmerged lenovobuild branch (original faa767e5).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
(cherry picked from commit bdf8ec36db)
2026-07-24 15:04:28 +00:00
xcat2-backport-automation[bot] 3023a4b14d Merge pull request #7679 from xcat2/backport-7604-to-2.18
[Backport 2.18] refactor(dhcp): reuse Kea MAC normalization
2026-07-24 14:52:36 +00:00
Vinícius Ferrão da2824f842 test(dhcp): cover Kea MAC normalization
(cherry picked from commit 138f3327b2)
2026-07-24 14:24:23 +00:00
Vinícius Ferrão 1c617922c5 refactor(dhcp): reuse Kea MAC normalization
(cherry picked from commit 3fc9f038b6)
2026-07-24 14:24:23 +00:00
xcat2-backport-automation[bot] 95a9e27f8a Merge pull request #7669 from xcat2/backport-7639-to-2.18
[Backport 2.18] fix(tcons): make tcons work with modern tmux
2026-07-23 23:48:44 +00:00
Vinícius Ferrão 4f9c4e4495 fix(tcons): make tcons work with modern tmux
tcons opens an rcons console per node in a tiled tmux session. On tmux 3.x
(shipped by all currently supported platforms) it no longer works:

  * The session was named "tcons.$$".  Modern tmux treats "." as the
    session:window.pane target separator, so "tmux attach -t tcons.$$" is
    parsed as session "tcons", pane "$$" and fails with "can't find
    session"/"can't find pane" -- tcons cannot attach to the session it
    just created.  Rename it to "tcons_$$".

  * The per-node "tmux select-pane", "tmux split" and "tmux select-layout"
    commands had no target.  When tcons is run from inside an existing tmux
    session (the common case) they act on the caller's current session
    instead of the detached tcons session, splitting the operator's own
    window.  Target every command explicitly at the tcons session.

  * Move the pane-border-status option inside the loop so the console title
    is set on each pane as it is created.

Validated on tmux next-3.4: the reworked script builds a 3-pane tiled
session with no errors, whereas the previous version's dotted session name
is unaddressable ("can't find pane").

Recovered from the unmerged lenovobuild branch (originals 5107b6ba1,
cefefa7d1, 6c72a2707, e040d24bb).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
(cherry picked from commit dda7605028)
2026-07-23 23:32:49 +00:00
xcat2-backport-automation[bot] 2d68f4e977 Merge pull request #7668 from xcat2/backport-7641-to-2.18
[Backport 2.18] fix(replaycons): detect confluent by console service, not binary presence
2026-07-23 23:29:27 +00:00
Vinícius Ferrão 8ece83ab36 fix(replaycons): detect confluent by console service, not binary presence
replaycons chose the confluent console log directory
(/var/log/confluent/consoles) whenever the confetty binary happened to be
present.  On a host that has confluent installed but runs conserver as the
active console service, that directory is empty and replaycons could not find
the log.  Gate on the site table's consoleservice attribute instead -- the
same setting rcons uses -- so replaycons reads /var/log/confluent/consoles
only when confluent is actually the configured console service.

Recovered from the unmerged lenovobuild branch (originals 3ce4d81b3, 57f6ddd38).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
(cherry picked from commit 21da014ed7)
2026-07-23 23:11:39 +00:00
Vinícius Ferrão d657b4f023 Merge pull request #7659 from xcat2/backport-7645-to-2.18
[Backport 2.18] fix(dhcp): serve the UEFI boot loader for client architecture 00:07
2026-07-23 18:16:58 -03:00
Vinícius Ferrão 387687d8c4 Merge pull request #7657 from xcat2/backport-7620-to-2.18
[Backport 2.18] fix(genesis): stop ethtool link-wait loops from spinning forever
2026-07-23 17:52:17 -03:00