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

6855 Commits

Author SHA1 Message Date
Markus Hilger a90ef274aa Merge pull request #7555 from VersatusHPC/fix/ipmi-rmcptag-and-cbcpad
fix: ipmi rmcptag and cbcpad
2026-05-07 00:00:15 +02:00
Markus Hilger aa180925e3 Merge pull request #7550 from VersatusHPC/fix/profile-asset-dotted-osvers
fix: handle dotted OS versions in profile asset lookup
2026-05-06 19:18:26 +02:00
Markus Hilger 2b1986d946 Merge pull request #7552 from VersatusHPC/fix/ubuntu-live-media-guardrails
fix: guardrails for Ubuntu genimage
2026-05-06 19:17:08 +02:00
Vinícius Ferrão c0e8b1730e fix: fall back from sha256 to sha1 on RAKP2 auth rejection
Extend the existing sha256-to-sha1 fallback (already present in
got_rmcp_response for Open Session errors) to also cover RAKP2
rejections with "Unauthorized name" (0x0d) or "Invalid role" (0x09).

Ref: #7511
2026-05-06 01:26:29 -03:00
Vinícius Ferrão 86f6a12264 fix: set IPMI name-only lookup bit in RAKP1 to match ipmitool
Set bit 4 (0x10) of the requested privilege byte in RAKP Message 1
for name-only user lookup, matching ipmitool behavior. Use the same
value consistently in all HMAC calculations (RAKP2 verification,
RAKP3 auth code, SIK derivation).

Without this, some BMCs fail user lookup with "Unauthorized name"
even though the credentials are correct.

Ref: #7511
2026-05-06 01:25:55 -03:00
Vinícius Ferrão 2bcdc52f92 fix: accept RMCP message tag 0 from OpenBMC with session ID correlation
OpenBMC-based BMCs return message tag 0 in RAKP2/RAKP4 instead of
echoing the tag from the request. xCAT rejected these as stale
responses and retried indefinitely until timeout.

Accept tag 0 but verify the remote console session ID in the response
matches our current sidm. This prevents stale retries from corrupting
session state while allowing OpenBMC responses through.

Applied to got_rmcp_response, got_rakp2, and got_rakp4.

Ref: #7511
2026-05-06 01:25:09 -03:00
Vinícius Ferrão cb2a6b3f3c fix: reject IPMI packets with invalid CBC padding instead of crashing
cbc_pad in decrypt mode reads the last byte as the pad count, then
calls splice(@block, 0 - $count). If decrypted data is corrupt, the
pad count can exceed the array size, crashing with "Modification of
non-creatable array value attempted, subscript -16".

Return empty string on invalid padding so the caller treats it as a
decryption failure rather than accepting corrupted data as a valid
IPMI response.

Ref: #7511
2026-05-06 01:23:10 -03:00
Vinícius Ferrão 7b20bbd187 Guard Ubuntu live media package sources 2026-05-05 21:40:04 -03:00
Vinícius Ferrão 9f33b19214 fix: restore legacy SLES provisioning paths 2026-05-05 17:09:37 -03:00
Vinícius Ferrão 119b19ce14 fix: handle dotted OS versions in profile asset lookup 2026-05-05 13:50:58 -03:00
Markus Hilger 2618b532c5 Merge pull request #7547 from VersatusHPC/fix/dhcp-dynamic-range-overlap
fix: errors out when node IP overlaps DHCP dynamic range
2026-05-05 09:28:23 +02:00
Markus Hilger 472529e046 Merge pull request #7546 from VersatusHPC/fix/remove-hardcoded-quiet
fix: move kernel quiet flag from hardcoded to osimage default
2026-05-05 09:26:26 +02:00
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
Vinícius Ferrão 03a16dd081 fix: move kernel quiet flag from hardcoded to osimage default
The quiet kernel parameter was hardcoded in anaconda.pm and sles.pm,
making it impossible for admins to get verbose boot output without
editing plugin source code. The existing addkcmdline mechanism
(bootparams and linuximage tables) only appends to the kernel command
line, so there was no way to remove quiet.

Move quiet out of the plugin kcmdline construction and into the
linuximage.addkcmdline default set during copycds osimage creation.
Admins who want verbose boot for debugging can now remove it per
osimage:

    chdef -t osimage <image> addkcmdline=""

New osimages get addkcmdline="quiet" by default. Existing osimages
with a custom addkcmdline are not overwritten on re-run of copycds.

Genesis/discovery boot (mknb.pm) is unchanged as it does not use
osimage definitions.

Addresses #6916
2026-05-04 22:58:52 -03: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
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 5aa1cda179 feat: add openSUSE Leap 15 provisioning support 2026-05-02 16:57:46 -03: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 6f3d9bb9d1 Add Kea DHCP backend 2026-04-23 02:01:33 -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 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 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 54742d7d57 fix: Fix makedns for Net::DNS >= 1.36 and bind >= 9.18 2025-11-27 12:12:03 -03:00
Daniel Hilst Selli 3cb359e711 feat: Add support for RHEL 10
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2025-11-26 16:07:19 -03:00
davidmonro 661b579927 mknb: look for newer types of ssh keys to insert into the authorized keys file in the image (#7502) 2025-08-23 15:30:13 +02:00
Markus Hilger 3930b55550 Merge pull request #7047 from Obihoernchen/vm-macvtap
Create macvtap VM nics
2024-08-28 02:23:21 +02:00