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

26985 Commits

Author SHA1 Message Date
Vinícius Ferrão
bfbc48c698 fix: fail nodeset when MASTER_IP cannot be resolved
Template.pm silently continued rendering kickstart templates when
getipaddr() failed to resolve the master hostname, producing
kickstarts with an empty MASTER_IP. Nodes would install successfully
but fail on first reboot when post.xcat and xcatinstallpost tried
to contact the master, timing out after 90 retries with:

    the network between the node and  is not ready

Postage.pm (mypostscript generation) already checks for this and
returns a clear error. Apply the same pattern in Template.pm so
nodeset fails immediately with a descriptive message instead of
producing a broken kickstart.

Fixes #7544
2026-05-04 18:52:13 -03:00
Markus Hilger
d5831828d6 Merge pull request #7533 from VersatusHPC/fix/opensuse-leap-support
feat: add openSUSE Leap 15 and SLES 15 provisioning support
2026-05-04 17:20:59 +02:00
Vinícius Ferrão
88da644249 Merge pull request #7532 from VersatusHPC/fix/el10-netboot-dhcp-client
fix: use NetworkManager for EL10 netboot DHCP instead of dhclient
2026-05-04 17:20:11 +02:00
Markus Hilger
c7915645b3 Merge pull request #7541 from VersatusHPC/fix/ipmi-rspconfig-set-readback
Improve rspconfig SET readback and fix backupgateway SET target
2026-05-04 17:19:38 +02:00
Markus Hilger
679bed8926 Merge pull request #7542 from VersatusHPC/fix/apache-disable-directory-indexing
fix: disable Apache directory indexing on /install and /tftpboot
2026-05-04 17:18:39 +02:00
Markus Hilger
2bdb0d4d02 Merge pull request #7540 from VersatusHPC/fix/remove-docker-lifecycle
fix: remove Docker container lifecycle management (dead code since 2016)
2026-05-04 17:15:58 +02:00
Vinícius Ferrão
5035697e9b fix: disable Apache directory indexing on /install and /tftpboot
The default xCAT Apache configuration shipped with Options Indexes
enabled for the /install and /tftpboot directories. This allowed
unauthenticated users to browse directory listings, disclosing the
full tree of postscripts, boot files, and (in production deployments)
potentially kickstart files with password hashes, custom scripts with
embedded credentials, and cluster topology details.

Replace Options Indexes with -Indexes in all four shipped Apache config
files (MN and SN, Apache 2.2 and 2.4 variants). Direct file access
by known path continues to work, so all provisioning workflows are
unaffected. Directory browsing for /xcat-doc is preserved as it
contains only public documentation.

Additionally, add an Apache hardening guide documenting recommended
permissions for sensitive directories under /install, network binding
best practices, and IP-based access control options.

Addresses #7450
2026-05-03 23:01:01 -03:00
Vinícius Ferrão
d71c7f7ac6 Improve rspconfig SET readback and fix backupgateway SET target
On some BMCs (notably Supermicro), a GET immediately after SET
returns the old value until the BMC applies the change. This made
rspconfig output misleading for network setting operations.

- Store the canonical SET value after normalization and compare
  with the GET readback for ip, netmask, gateway, and backupgateway.
  When they differ, annotate the output:
  "BMC Gateway: 10.20.0.1 (requested 10.20.0.254, not yet reflected)"
- Consolidate ip/netmask/gateway/backupgateway display into one block
- Fix backupgateway SET: was routed through the gateway branch
  writing parameter 0x0C instead of 0x0E. Now has its own branch
  writing the correct IPMI parameter.
- ip=dhcp is unaffected (separate code path, never stores a value)

Tested on Supermicro IPMI BMC (10.20.0.51).

Fixes #3445
2026-05-03 21:01:42 -03:00
Markus Hilger
ddd7f8da3f Merge pull request #7539 from VersatusHPC/fix/ipmi-vlan-disable
fix: IPMI VLAN disable
2026-05-03 20:10:47 +02:00
Markus Hilger
1c132aab49 Merge pull request #7538 from VersatusHPC/feat/openbmc-rspconfig-user-snmp
feat: add OpenBMC rspconfig user and alert support
2026-05-03 20:09:35 +02:00
Vinícius Ferrão
4165b26a04 fix: remove Docker container lifecycle management (dead code since 2016)
Docker container lifecycle management (mgt=docker, mkdocker, rmdocker,
lsdocker) was added in 2015-2016 as an experiment targeting Docker API
v1.22 on Ubuntu only. Documentation and man pages were deliberately
removed in 2019 (PRs #6222 and #6324) with the original developer's
approval, noting that "the interface of Docker has become very simple
right now, so there is no value for xCAT to offer such functions."

The plugin was still being shipped but has had no functional code changes
since April 2016, was never listed as a valid mgt value in Schema.pm,
and no user ever filed an issue about it.

Removed:
- xCAT-server/lib/xcat/plugins/docker.pm (1,142 lines)
- xCAT/postscripts/setupdockerhost
- xCAT-server/share/xcat/scripts/setup-dockerhost-cert.sh
- xCAT-test/autotest/testcase/dockercommand/ (test cases)
- Docker attribute definitions in Schema.pm
- Client symlinks (mkdocker, rmdocker, lsdocker)
- Usage entries and dockerhost cert handling in credentials.pm
- Docker attribute documentation in man7 pages

The "Running xCAT in Docker" documentation (dockerized_xcat/) is
retained as it documents containerizing xCAT itself, not the removed
mgt=docker feature.

Closes #7518
2026-05-03 12:11:33 -03:00
Vinícius Ferrão
2fa7fca1ad Allow rspconfig to disable VLAN on IPMI BMCs
rspconfig vlan= only accepted values 1-4096 with no way to disable
VLAN tagging. Users had to resort to raw IPMI commands to clear a
stale VLAN after ip=dhcp.

- Accept vlan=off/disable/disabled to clear VLAN tagging via
  standard IPMI parameter 0x14 with the enable bit unset
- Fix valid range from 1-4096 to 1-4094 (IEEE 802.1Q)
- Use strict digit matching to reject malformed inputs

To clear VLAN after a DHCP reset: rspconfig <node> vlan=off

Tested on Supermicro IPMI BMC (10.20.0.51).

Partially addresses #3725
2026-05-03 12:04:21 -03:00
Vinícius Ferrão
40977b717f Fix alert handler precedence and tighten input matching in setnetinfo
Two pre-existing bugs in the alert on/off conditions:

1. Operator precedence: 'and' with 'or' without parens caused any
   subcommand with argument matching /^en/ or /^dis/ to silently
   trigger the alert handler.

2. Loose prefix matching: /^en/ and /^dis/ accepted typos like
   "enterprise" or "discover". Replace with exact token matching
   while preserving the "en"/"dis" abbreviations used by snmpmon.pm.
2026-05-03 12:04:07 -03:00
Vinícius Ferrão
260ce4420d Add OpenBMC rspconfig user and alert support 2026-05-03 01:34:56 -03:00
Markus Hilger
0d4182c7d9 Merge pull request #7536 from VersatusHPC/fix/noderange-fork-stale-cache
fix: invalidate NodeRange caches inherited across fork
2026-05-03 02:41:55 +02:00
Vinícius Ferrão
d455b82b1a fix: silent failure with no site master attribute (#7537)
* Fix silent failure when site.master is not set (#6157)

Hardware control commands (rpower, rinv, etc.) silently return no output
and exit 0 when site.master is empty. The original fix (#6074) was
reverted (#6158) because it warned per-node with the wrong hostname.

Check once in plugin_command before dispatching to plugins, so the error
appears exactly once with the correct command name.

* Also reject empty site.master, not only undef
2026-05-03 02:39:04 +02:00
Vinícius Ferrão
a6145b402b Merge pull request #7534 from VersatusHPC/fix/el10-bios-stateful-biosboot
fix: add EL10 BIOS boot partition
2026-05-03 02:36:39 +02:00
Markus Hilger
b1b0ca0396 Merge pull request #7535 from VersatusHPC/fix/plugin-error-message
fix: misleading plugin error message
2026-05-03 02:35:33 +02:00
Vinícius Ferrão
f139904c3e fix: invalidate NodeRange caches inherited across fork
xcatd forks child processes to handle plugin requests. The child
inherits NodeRange.pm's module-level caches (@allnodeset, %allgrphash,
@grplist) with their timestamps from the parent. If the parent had
populated these caches within the past 5 seconds, the child reuses
stale data that does not reflect database changes committed by other
requests that completed between cache population and the fork.

This causes non-deterministic failures in group-definition regression
tests (chdef_group, mkdef_group, rmdef_group) where lsdef -s runs
noderange expansion inside the forked plugin process and hits the
inherited stale cache that predates the mkdef -t group commit.

Track the PID at cache-build time and treat any cache built by a
different PID as expired, forcing a fresh database read in children.
2026-05-02 19:27:10 -03:00
Vinícius Ferrão
b10865c5d4 Keep plugin bug label for XS crashes without $@
The else branch handles a rare case where XS libraries (Sys::Virt,
Net::SNMP) crash without setting $@. This IS a plugin bug, so keep
that label and the debug hint. Only the common case (die with $@)
gets the clean passthrough.
2026-05-02 17:09:54 -03:00
Vinícius Ferrão
34406828b9 Pass through actual error instead of generic "plugin bug" message
When a plugin dies during request processing, xcatd wrapped the error
in a misleading "plugin bug" message that hid the real cause (e.g.
"No space left on device"). Now passes through the actual error from
the eval, making the output useful for any failure, not just disk full.

Fixes #2719
2026-05-02 17:06:18 -03:00
Vinícius Ferrão
5aa1cda179 feat: add openSUSE Leap 15 provisioning support 2026-05-02 16:57:46 -03:00
Vinícius Ferrão
1f9173f07a Fix some EL9 and EL10 provisioning gaps (#7530)
* Fix EL9 and EL10 provisioning gaps
2026-05-02 04:27:54 +02:00
Markus Hilger
d168dcad30 Merge pull request #7529 from VersatusHPC/fix/ubuntu-2604-support
Add Ubuntu 26.04 provisioning support
2026-05-01 23:25:09 +02:00
Vinícius Ferrão
023beff053 Add Ubuntu 26.04 provisioning support 2026-05-01 11:13:45 -03:00
Markus Hilger
10c13a3635 Merge pull request #7528 from VersatusHPC/fix/ubuntu-lts-provisioning-clean
fix: improve Ubuntu LTS provisioning support
2026-05-01 01:39:11 +02:00
Markus Hilger
568f1b8a44 Merge pull request #7523 from VersatusHPC/fix/makentp-insecure-config
fix: harden makentp generated ntp.conf
2026-04-30 10:22:50 +02:00
Vinícius Ferrão
1babd7b0e4 fix: improve Ubuntu LTS provisioning support 2026-04-29 18:19:12 -03:00
Markus Hilger
d7748b6e3a Merge pull request #7525 from VersatusHPC/kea-uefi-reservation-policy
Fix Kea UEFI reservation boot policy
2026-04-29 11:30:11 +02:00
Markus Hilger
733d076127 Merge pull request #7527 from VersatusHPC/fix/copycds-strip-alternate-suffix
fix: strip redundant alternate suffix from RHEL distnames in copycds
2026-04-29 11:29:26 +02:00
Markus Hilger
40de13dab8 Merge pull request #7526 from VersatusHPC/bump-actions-checkout-v6
Bump actions/checkout v4 to v6 for Node.js 24 compatibility
2026-04-29 11:28:07 +02:00
Vinícius Ferrão
ee26cf3f8f fix: strip redundant alternate suffix from RHEL distnames in copycds
RHEL 7 shipped ppc64le ISOs under the "alternate" label, causing
copycds to create distro paths like rhels7.6-alternate/ppc64le.
This mismatched osver() which returns rhels7.6 since /etc/os-release
has no knowledge of the alternate designation.

The architecture (ppc64le vs ppc64) already differentiates the
builds, making the alternate suffix redundant. Strip it during
auto-detection so copycds paths match osver() output.

Fixes #5593
2026-04-28 17:06:32 -03:00
Vinícius Ferrão
8d6eb04daf Bump actions/checkout v4 to v6 for Node.js 24 compatibility 2026-04-28 16:02:41 -03:00
Vinícius Ferrão
a716e8ff90 Fix DHCP CI package layout 2026-04-28 15:47:42 -03:00
Vinícius Ferrão
2c7fa228e7 retrigger CI 2026-04-28 11:37:03 -03:00
Vinícius Ferrão
0f606615b3 Fix Kea UEFI reservation boot policy 2026-04-28 03:35:53 -03:00
Markus Hilger
dd7efe5d93 Merge pull request #7524 from VersatusHPC/fix/mkdef-empty-attrs-error
fix: show useful error when mkdef is called without attributes
2026-04-27 13:35:36 +02:00
Vinícius Ferrão
57aa99e64e retrigger CI 2026-04-26 21:18:19 -03:00
Vinícius Ferrão
ec097e9d69 fix: show useful error when mkdef is called without attributes
When mkdef is called with an object name but no attributes (e.g.
mkdef -t node -o mynode), setFINALattrs produces an empty hash
and the OBJ loop has nothing to iterate. The code falls through to
"0 object definitions have been created or modified" with no
explanation of what went wrong.

Add a check after setFINALattrs: if FINALATTRS is empty, tell the
user what's missing. For nodes, mention that 'groups' is required.

Fixes #2765
2026-04-26 20:48:09 -03:00
Vinícius Ferrão
bd260c9feb fix: harden makentp generated ntp.conf
The ntpd config generated by makentp had no access restrictions,
explicitly disabled authentication, and was vulnerable to CVE-2013-5211
amplification attacks.

Add restrict lines to block unauthorized access, add iburst for faster
initial sync, replace "disable auth" with "disable monitor". Security
hardening applies to all platforms including AIX (xntpd supports the
same restrict directives).

The chrony path (EL8+) is unaffected — it delegates to setupntp.

Fixes #2435
2026-04-26 16:19:32 -03:00
Markus Hilger
4bed32987e Merge pull request #7522 from VersatusHPC/fix/xcattest-newcmdstart-upstream
fix: reset newcmdstart between files in xcattest load_case
2026-04-26 20:52:09 +02:00
Vinícius Ferrão
01150ac34b fix: reset newcmdstart between files in xcattest load_case
When a test case file is missing the end marker and the last line is a
cmd: directive, $newcmdstart stays set. The parser then appends lines
from the next file into the current command. If that next file is a
shell script (like simulatorctl.sh in the testcase tree), thousands of
lines of Perl/bash get concatenated and executed.

Reset $newcmdstart after closing each file to prevent state leaking
between files.

Fixes #5255
2026-04-26 15:28:11 -03:00
Markus Hilger
d017a941ca Merge pull request #7521 from VersatusHPC/fix/rspconfig-same-ip-verification
Fix/rspconfig same ip verification
2026-04-26 20:18:50 +02:00
Vinícius Ferrão
05a23be37a retrigger CI 2026-04-26 14:35:45 -03:00
Vinícius Ferrão
dd53d1bff7 fix: rspconfig verification fails when setting BMC IP to current value
The verification logic in rspconfig_response uses a mutually exclusive
if/else to check for the old IP (origin_type) and new IP (check_result).
When setting the same IP, both match the same entry but only origin_type
gets set — check_result stays 0 and the command reports "Config IP failed".

Make the two checks independent so both can match the same IP object.

Fixes #5121
2026-04-26 04:36:07 -03:00
Vinícius Ferrão
ca8baff388 Merge branch 'xcat2:master' into master 2026-04-26 04:35:05 -03:00
Markus Hilger
a0117699f4 Merge pull request #7519 from VersatusHPC/fix/vm-only-if-guard
fix: remove only_if mgt=kvm guard from vm table attributes
2026-04-26 03:08:50 +02:00
Markus Hilger
e448d0ac70 Merge pull request #7520 from VersatusHPC/fix/nodeset-empty-repo-template
fix: skip empty local-repository.tmpl in nodeset
2026-04-26 03:06:31 +02:00
Vinícius Ferrão
893769e7e8 Merge pull request #2 from VersatusHPC/fix/nodeset-empty-repo-template
fix: skip empty local-repository.tmpl in nodeset
2026-04-25 19:10:57 -03:00
Vinícius Ferrão
2d07295d8c fix: skip empty local-repository.tmpl in nodeset
When a pkgdir has no valid repodata, Yum.pm creates an empty
local-repository.tmpl file. Template.pm then reads it and generates
an empty yum repo config block in the kickstart. Adding a -s check
skips empty template files instead of silently including them.

Revives the fix from PR #4769 which was closed without merging.

Fixes #3572
2026-04-25 19:04:20 -03:00