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

10414 Commits

Author SHA1 Message Date
Vinícius Ferrão
bb8dd525da Error when node IP overlaps DHCP dynamic range
Previously, makedhcp warned but still created host entries without
a static IP reservation when a node's address fell inside the
dynamic range. The node would silently get a random IP from the
pool instead of its configured address.

Now errors and skips the node on all four DHCP paths (ISC v4/v6,
Kea v4/v6) with a clear message telling the admin to move the IP
outside the range or adjust the dynamic range.

This makes ISC DHCP and Kea behavior consistent and aligns with
xCAT's design: the dynamic range is for hardware discovery,
known nodes should have static IPs outside it.

Closes #6539
2026-05-05 00:48:30 -03:00
Markus Hilger
a51a4d7710 Merge pull request #7543 from VersatusHPC/fix/systemd-xcatd
feat: Use systemd instead of legacy initscripts
2026-05-05 01:38:37 +02:00
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
Vinícius Ferrão
7897f30bfe Modernize xcatd service packaging 2026-05-04 18:13:23 -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
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
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
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
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
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
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
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
0f606615b3 Fix Kea UEFI reservation boot policy 2026-04-28 03:35:53 -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
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
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
Vinícius Ferrão
e0e04f017d Render Kea additional classes by version 2026-04-23 19:39:25 -03:00
Vinícius Ferrão
714c0785b6 Preserve OPAL conf-file handling for Kea 2026-04-23 19:19:29 -03:00
Vinícius Ferrão
fcd22757d2 Refine Kea xNBA handling and validation notes 2026-04-23 11:14:01 -03:00
Vinícius Ferrão
8399d88509 Address Perl quality findings 2026-04-23 03:04:37 -03:00
Vinícius Ferrão
6f3d9bb9d1 Add Kea DHCP backend 2026-04-23 02:01:33 -03:00
Daniel Hilst Selli
baa2380cd2 fix: Move dracut call to the .spec
This fixes a problem where the dracut image was pulling artifacts from
the build host and not the mock image, e.g. building for EL9 in EL10.

Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-04-14 11:15:56 -03:00
Daniel Hilst Selli
1b0deaf9af fix: Fix dhcp-client dependency failure during genimage
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-04-01 13:02:35 -03:00
Daniel Hilst Selli
fccdc3ec64 fix: Fix genesis-base package build
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-03-30 20:46:42 -03:00
Daniel Hilst Selli
3569fbe77e Revert "fix: Replace yaboot with grub2 for PPC nodediscovery"
This reverts commit 90a84dc375.

Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-03-27 11:14:47 -03:00
Daniel Hilst Selli
42d23c7d92 fix: Fix regresion in makedns in update mode
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-03-20 13:26:46 -03:00
Daniel Hilst Selli
90a84dc375 fix: Replace yaboot with grub2 for PPC nodediscovery
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-03-18 18:20:10 -03:00
Daniel Hilst Selli
d309601a30 fix: Fix templates for EL10 in ppc64le enviroment
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-03-12 11:27:37 -03:00
Daniel Hilst Selli
4780ba9400 fix: Fix genesis loop where osimage value grows at each boot
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-02-26 13:54:56 -03:00
Daniel Hilst Selli
0e0ead786f fix: Fix genesis & sequential node discovery in x86_64
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-02-25 14:08:40 -03:00
Daniel Hilst Selli
048d82768e doc: Add comments to /etc/init.d/xcatd changes
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-01-26 13:51:07 -03:00
Daniel Hilst Selli
3a1d458df7 fix: Remove -extension from openssl req call in setup-server-cert.sh
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>

See: https://github.com/openssl/openssl/issues/22966#issuecomment-1858396738
2026-01-22 11:30:37 -03:00
Daniel Hilst Selli
83f6b74302 fix!: Skip settunnables if running inside a container
This commit adds an early return to xcatconfig settunnables function.
This function set parameters at

    /proc/sys/net/ipv4/neigh/default/gc_thresh1
    /proc/sys/net/ipv4/neigh/default/gc_thresh2
    /proc/sys/net/ipv4/neigh/default/gc_thresh3

And set sysctl attributes by writing to /etc/sysctl.d/ and
/etc/sysctl.conf

These are tunning network parameters for running on production
and should not affect the overall function for testing purposes.

Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2025-12-05 13:33:57 -03:00
Daniel Hilst Selli
bfe52d03a7 fix: Fix build with mock
Add buildrpms.pl to build RPMs in parallel using mock
Add xCAT-buildkit to the build list
Fix build dependency in xCAT-buildkit.spec
Add fallback in /etc/init.d/xcatd for /etc/rc.d/init.d/functions

Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2025-12-05 00:33:47 -03:00