2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-05 04:27:55 +00:00
Commit Graph

3378 Commits

Author SHA1 Message Date
Vinícius Ferrão 9bec1bff0e refactor(netboot): centralize volatile kernel arguments 2026-09-01 16:15:41 -03:00
Daniel Hilst 0a93aba2b0 Merge pull request #7786 from VersatusHPC/feat/policy-user-groups
feat(policy): allow Unix group rules
2026-08-31 15:55:34 -03:00
Daniel Hilst e82e52f03f Merge pull request #7784 from VersatusHPC/fix/debian-html-form-dependency
fix(debian): declare HTML::Form runtime dependency
2026-08-31 11:42:04 -03:00
Vinícius Ferrão 7415163ce6 fix(rflash): show NeXtScale FPC URL syntax
Co-authored-by: Jarrod Johnson <jarrod.b.johnson@gmail.com>
2026-08-30 18:32:13 -03:00
Vinícius Ferrão e70cf8424a docs(policy): document Unix group rules 2026-08-30 17:23:40 -03:00
Vinícius Ferrão 2f798c20ea feat(policy): allow Unix group rules
Co-authored-by: Samveen <samveen@samveen.in>
2026-08-30 17:22:51 -03:00
Vinícius Ferrão 694931797a fix(debian): declare HTML::Form runtime dependency 2026-08-29 21:25:33 -03:00
Daniel Hilst 4625505b8e Merge pull request #7771 from VersatusHPC/refactor/string-utils
refactor(utils): centralize policy string trimming
2026-08-28 17:42:03 -03:00
Daniel Hilst a9a2c1f74e Merge pull request #7732 from VersatusHPC/fix/noderange-preauth
fix(xcatd): refuse the noderange ^file operator on unauthenticated requests
2026-08-28 17:32:33 -03:00
Daniel Hilst ff06b9f9ae Merge pull request #7731 from VersatusHPC/fix/xcatver-mismatch
fix(xcatd): only call a same-release build difference a build difference
2026-08-28 17:28:30 -03:00
Vinícius Ferrão 2dc4afd903 Merge pull request #7741 from stanford-rc/genpdu
feat: add `genpdu` pdutype for generic SNMP PDUs (PDU2-MIB)
2026-08-26 00:14:25 -03:00
Vinícius Ferrão b1ef0620de refactor(discovery): share blade findme decisions 2026-08-25 19:46:04 -03:00
Vinícius Ferrão 751d237c13 refactor: centralize policy string trimming 2026-08-25 13:00:46 -03:00
Daniel Hilst bcf6f9059a Merge pull request #7750 from VersatusHPC/fix/dbobjutils-exact-only-if-values
fix(dbobjutils): match exact only-if values
2026-08-24 12:39:34 -03:00
Daniel Hilst ca5d1cfa86 Merge pull request #7751 from VersatusHPC/refactor/dbobjutils-remove-legacy-group-matcher
refactor(dbobjutils): remove redundant group matcher
2026-08-24 12:29:02 -03:00
Daniel Hilst 8c3aaa4471 Merge pull request #7727 from VersatusHPC/refactor/kea-shared-service-mapping
refactor(kea): reuse shared service mapping
2026-08-24 12:27:38 -03:00
Vinícius Ferrão c42f42f194 refactor(dbobjutils): remove redundant group matcher 2026-08-23 13:13:16 -03:00
Vinícius Ferrão 3aa826df92 fix(dbobjutils): match exact only-if values 2026-08-23 11:38:55 -03:00
Vinícius Ferrão 6e43843712 refactor(utils): centralize comma-list membership 2026-08-23 11:08:24 -03:00
Kilian Cavalotti 657b17570a Add genpdu pdutype for generic SNMP PDUs (PDU2-MIB)
Add a new pdutype (genpdu) for PDUs implementing the Raritan PDU2-MIB.
A single MIB covers the Raritan PX2/PX3/PX4/PXC/SRC/PXO/BCM series, the
Server Technology PRO3X/PRO4X series, the Legrand intelligent PDUs, and
all PDUs following the PDU2-MIB.

Supports rpower (whole-PDU and per-outlet), rinv and rvitals over SNMP
v1, v2c or v3, with credentials read from the pdu table).

Unlike the existing types, sensor units and decimal precision are read
from the MIB per sensor rather than hardcoded, so readings are correct
across models that report differing precision for the same sensor.
Outlet switching capability is probed at connect time, so metered-only
models report a single "unsupported" message instead of a per-outlet error.

rspconfig is not supported for genpdu; PDU linking and BCM2/PMC power
meters are out of scope.

Tested on Raritan PX4-5851-E7V2 (fw 4.2.10.5-50400, switched),
PX3-1901U-N1 and PX3-1901U-N1A6 (fw 4.0.20.5-49038, metered), and
PX2-1901U-N1A6 (fw 4.0.20.5-49038, metered).

Signed-off-by: Kilian Cavalotti <kilian@stanford.edu>
2026-08-20 18:51:02 -07:00
Vinícius Ferrão 73a2e73c44 fix(NodeRange): add a nofile option that rejects the ^ file operator
The ^ operator in a noderange names a file, and noderange() reads it.

Add a nofile option. When nofile is set, noderange() does not open the file. It
records that a ^file atom was present, so a caller can fail closed even when the
range also holds plain nodes. file_operator_rejected() reports this.

noderange() also expands site.excludenodes through a nested call. That range is
trusted site data. Expand it without nofile and keep the request's rejection
state across the call. A configured exclusion cannot clear the flag, and a
^file in site.excludenodes cannot set it.

The default behavior does not change. Forward the option through extnoderange().
2026-08-18 14:12:12 -03:00
Vinícius Ferrão 7ad7293b71 fix(xcatd): only call a same-release build difference a build difference
xcatd warns "xCAT Version mismatch!" when a node's xCAT version differs
from the server's. It compared the full version strings, which include a
build-specific suffix such as " (git commit <hash>)". Two nodes at the
same release built from different snapshots then reported a version
mismatch on every request, even though the same release is ABI
compatible.

Keep warning when the versions differ, but tell the two cases apart. A
different release is still "xCAT Version mismatch!". The same release
built from a different commit now reports "xCAT build level differs (same
release):" instead, so the build difference is still visible without
being called a mismatch. Both messages show the full version strings.

Add xCAT::Version->Release, which returns the version without the
build-specific suffix, to make that distinction.

This was recovered from the lenovobuild branch, which stripped the older
"built <date>" suffix and dropped the same-release warning entirely; this
reimplements it for the current version format and keeps the build
difference visible.
2026-08-17 16:30:31 -03:00
Vinícius Ferrão e3e132967c fix(xcatd): stop a noderange from running a command through the ^ operator
The ^ noderange operator reads node names from a file. NodeRange opened
that file with a two-argument open. A two-argument open reads shell
metacharacters in the path, so a noderange such as ^"id|" ran a command.
xcatd expands a noderange while it processes a request, so the command
ran on the management node.

Use a three-argument open with an explicit read mode. The value is then
only ever a file name. The ^ operator keeps working: ^/tmp/nodes still
reads the file.

This fix was recovered from the lenovobuild branch. The original there
(commit for "Remove load from file in noderange support") removed the ^
operator. This keeps the documented operator and closes the command path
instead.
2026-08-17 12:24:20 -03:00
Vinícius Ferrão 4314c72cd3 refactor(kea): reuse shared service mapping 2026-08-16 00:22:54 -03:00
Vinícius Ferrão caa4e838eb fix(dhcp): boot unknown xNBA clients with Kea 2026-08-10 17:12:17 -03:00
Vinícius Ferrão 6d26cf7fff fix(dhcp): correct inconsistent Kea reservation updates 2026-07-31 22:29:58 -03:00
Vinícius Ferrão 781d5e4163 fix(dhcp): preserve Kea reservations on makedhcp -n 2026-07-31 15:22:19 -03:00
Daniel Hilst eb76ddfbb6 Merge pull request #7673 from VersatusHPC/refactor/network-address-accumulation
refactor(network): centralize address accumulation
2026-07-27 15:32:09 -03:00
Daniel Hilst d4d9d5c859 Merge pull request #7690 from VersatusHPC/harvest/port80
fix(netboot): omit the default HTTP port from generated boot URLs
2026-07-27 15:15:18 -03:00
Daniel Hilst 8fc3a309a0 Merge pull request #7670 from VersatusHPC/harvest/macmap-cumulus-breakout
fix(MacMap): discover nodes on Cumulus breakout ports (swpNsM)
2026-07-27 11:09:39 -03:00
Daniel Hilst d28e7b39e2 Merge pull request #7643 from VersatusHPC/harvest/docs-manpage-clarifications
docs: port man-page clarifications from lenovobuild
2026-07-27 07:52:47 -03:00
Vinícius Ferrão 39f721713e fix(netboot): omit the default HTTP port from generated boot URLs
Boot URLs handed to nodes always carried an explicit :80 even when the HTTP
server listens on the default port. grub2.pm already omits the port when it is
80; make the xNBA, genesis and DHCP boot URLs consistent with it.

$portsuffix is empty when site.httpport is unset or 80 and ":<port>" otherwise,
so a non-default port is unchanged. Covers the ISC and Kea paths in dhcp.pm,
xnba.pm, mknb.pm, and the Kea xNBA client classes in BootPolicy.pm.

dhcp_boot_policy.t and mknb_xcatd_address.t follow the new URLs and gain cases
for a non-default and an unset port. The floating-address guard in
mknb_xcatd_address.t also drops :80 so that it keeps matching.

Recovered from the unmerged lenovobuild branch (cd61fd9d, a2f77ea9, 1035841b,
b7db0e2, 792fe6d).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-26 03:14:50 -03:00
Vinícius Ferrão a44e9fd819 refactor(kea): centralize service account lookup 2026-07-25 01:26:45 -03:00
Vinícius Ferrão 543eab3bdc fix(dhcp): reuse Kea control socket paths 2026-07-25 01:26:45 -03:00
Daniel Hilst 4652a023c1 Merge pull request #7606 from VersatusHPC/refactor/dbobjutils-only-if-matcher
refactor(dbobjutils): reuse only-if matcher for table routing
2026-07-24 12:24:19 -03:00
Daniel Hilst 0d97006e1d Merge pull request #7618 from VersatusHPC/harvest/formatnetmask-undef-guard
fix(NetworkUtils): guard formatNetmask against an undefined mask
2026-07-24 12:06:58 -03:00
Daniel Hilst bee8c529ea Merge pull request #7602 from VersatusHPC/fix/dhcp-ubuntu-backend-release
fix(dhcp): use complete Ubuntu release for backend selection
2026-07-24 11:24:18 -03:00
Vinícius Ferrão 53c755fb28 refactor(network): centralize address accumulation 2026-07-23 21:13:26 -03:00
Vinícius Ferrão 93c5f3f04a fix(MacMap): discover nodes on Cumulus breakout ports (swpNsM)
Cumulus switch MAC discovery matched the fdb port with a regex that only
accepted a plain numeric swp name (dev swp([0-9]+)), then guessed among
swp5/05/swp05 formats. A node on a breakout port (swp1s0, swp1s1, ...) never
matched, so it was silently not discovered. Match any swp name (dev (swp[^ ]+))
and use it directly, dropping the format-guessing.

Gated: this whole block runs only for switchtype eq 'onie' (Cumulus/ONIE
switches); SNMP switches use a separate path and are unaffected.

Validated against real 'bridge fdb show' output (the stock iproute2 command
Cumulus runs over SSH): the old regex parses only 'dev swp1' and drops
'dev swp1s0'; the new regex parses both. Confirmed the environment on a booted
NVIDIA Cumulus VX 5.10.

Recovered from the unmerged lenovobuild branch (72d68bc7).
2026-07-23 20:39:52 -03:00
Vinícius Ferrão de3d68dd1d docs: port man-page clarifications from lenovobuild
Recover several man-page clarifications that never merged from the lenovobuild
branch.  All are documentation-only -- the man .pod sources with their
generated .rst, plus the networks-table description in Schema.pm:

  * makedhcp / nodeset: note that UEFI boot directives are intentionally
    omitted when nodetype.os names an OS without UEFI support, even for
    'nodeset shell'.
  * networks table dhcpserver: warn that it should be set only for service
    node operation and that <xcatmaster> is not a valid value.
  * noderange: clarify that the syntax is for xCAT.
  * reventlog: note that unimplemented sensor types yield 'No Mappings Found'
    and point to confluent's nodeeventlog facility.
  * rcons: document confluent console auto-reconnect (a randomized 2-4 minute
    retry, or 'ctrl-e o a' to force one); the original's stray backtick markup
    is corrected.

Recovered from the unmerged lenovobuild branch (originals 2d4f12f4, 760f2f8b,
23d63d59, 44b47c44, c63d780f, db4dc42b).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-22 22:00:51 -03:00
Vinícius Ferrão 2d294ae8f7 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>
2026-07-21 14:59:01 -03:00
Vinícius Ferrão 9b2c3e88ce Merge pull request #6793 from gurevichmark/secure_of
feat: Secured OF prompt
2026-07-20 12:09:35 -03:00
Vinícius Ferrão fd32ae6860 refactor(dbobjutils): reuse only-if matcher for table routing 2026-07-18 16:46:49 -03:00
Vinícius Ferrão c340abd543 fix(dhcp): use complete Ubuntu release for backend selection 2026-07-18 16:05:34 -03:00
Vinícius Ferrão 5467c1aef9 refactor(dhcp): reuse shared version comparison 2026-07-18 01:46:55 -03:00
Daniel Hilst ec2bbb9a6a Merge pull request #7588 from VersatusHPC/fix/issue-6495-nfs-root-options
feat: add configurable NFS root options for statelite images
2026-07-17 23:46:14 -03:00
Daniel Hilst 419d6c262c Merge pull request #7596 from VersatusHPC/fix/issue-7593-systemd-packaging
fix: avoid sysvinit paths on systemd enabled systems
2026-07-17 21:35:45 -03:00
Daniel Hilst 428c63cdb1 Merge pull request #7598 from VersatusHPC/fix/issue-6498-mknb-xcatd-address
fix(mknb): avoid transient discovery addresses
2026-07-17 19:02:50 -03:00
Vinícius Ferrão c362904e0d docs(dhcp): clarify legacy OMAPI FIPS limits
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-17 16:09:05 -03:00
Vinícius Ferrão 52e2f2b332 refactor(dhcp): reuse shared version comparison
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-17 16:07:58 -03:00