2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-04 12:07:56 +00:00
Commit Graph

783 Commits

Author SHA1 Message Date
Daniel Hilst 03e1559989 fix(xcat-server): default the Ubuntu apt mirror for netboot and Subiquity
The Ubuntu live-server ISO copycds imports is not a complete apt pool, so
both Ubuntu install paths fail without an external mirror: the netboot
genimage's debootstrap from the ISO-only pkgdir cannot resolve packages,
and the Subiquity diskful install (Template.pm) fell back to the airgapped
file:///cdrom config. Default site.ubuntu_apt_mirror to
http://archive.ubuntu.com/ubuntu when unset (overridable for local/geo/
ports mirrors). In the Ubuntu genimage, when pkgdir has no http mirror,
build the debootstrap source and chroot sources.list from that mirror with
the codename derived from osvers and the release/-updates/-security pockets
(main + universe) -- the compute pkglist needs universe (busybox-static,
dracut*) and the security-updated openssh. Ubuntu-only; EL netboot
(netboot/rh) and copycds/packimage are untouched.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-24 14:20:27 -03:00
Daniel Hilst 846e611772 fix(xcat-server): allow an online apt mirror for Ubuntu Subiquity installs
The Ubuntu live-server install media is not a complete apt package mirror.
With the generated apt configuration pinned to the media only, an install that
needs a package absent from the media stalls instead of fetching it. Emit an
online-mirror apt configuration when one is configured (site.ubuntu_apt_mirror)
so missing packages are retrieved from the archive; offline behaviour is
unchanged when it is unset.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-24 14:20:26 -03:00
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
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 119b19ce14 fix: handle dotted OS versions in profile asset lookup 2026-05-05 13:50:58 -03: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 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
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
Vinícius Ferrão 1babd7b0e4 fix: improve Ubuntu LTS provisioning support 2026-04-29 18:19:12 -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
Markus Hilger dc13997f14 Remove even more useless executable permissions 2024-05-07 16:34:59 +02:00
Jarrod Johnson b4bda3e80f Add support for non-zero LUN
Systems are now more likely to do non-zero LUN
2024-02-28 12:34:27 +01:00
Obihörnchen fdb4c9d46e Merge pull request #6391 from jjohnson42/addsha256hmac
Implement HMAC-SHA256 in xCAT IPMI
2024-02-19 19:30:36 +01:00
besawn 0cde47aa8a Merge pull request #7295 from Obihoernchen/cbc_3
Remove deprecated blocksize argument
2023-02-17 13:44:48 -05:00
Mark Gurevich 9fbd58bfc3 Initial Alma8 support 2023-01-18 11:00:59 -05:00
Markus Hilger d44c86fadf Remove deprecated blocksize argument
Fixes the following error with perl-Crypt-CBC >= 3.0+ (default on EL9+)
'blocksize' is not a recognized argument at /usr/share/perl5/vendor_perl/Crypt/CBC.pm line 312.
at /opt/xcat/lib/perl/xCAT/IPMI.pm line 724.
2022-12-05 11:42:34 +01:00
Mark Gurevich 471fd4d7c0 Support for Ubuntu20.04 legacy OS image 2022-09-14 14:47:04 -04:00
Mark Gurevich 88b9e828ed Improve readability of generated AutoYaST for SLES15 2022-02-22 13:52:55 -05:00
Mark Gurevich 89a0869250 Update SLES15 compute template 2022-01-27 15:18:46 -05:00
Simon Fowler 55c521a405 Add initial support for deploying Ubuntu 20.04 nodes.
This configures automated installation using the subiquity installer, as
documented at
https://ubuntu.com/server/docs/install/autoinstall-quickstart and other
locations on the Internet.

Installation uses the NFS export of /install, and configures the
installer to use the nocloud-net datasource, creating a per-node
directory containing the processed template file as the user-data file,
and an empty meta-data file.

Kernel and initrd files are pulled from the casper/ directory under the
package dir.

Unnecessary elements of the kernel command line have been removed in the
subiquity installer path.

Support has been added for selecting a subiquity specific default
template, as well as an updated pre-install script and some minor POSIX
shell compliance fixes for the getinstdisk script.
2021-12-13 11:54:49 +11:00
Mark Gurevich 890aa93bd1 Support Rocky Linux on service nodes 2021-07-27 10:07:01 -04:00
fangjzh b9585a78e1 add Rocky Linux 8.4 support 2021-07-13 07:52:55 +08:00
Mark Gurevich c230b098b4 Use a fixed redact string 2021-06-30 14:31:37 -04:00
Mark Gurevich 041e847279 Update comment 2021-06-29 14:19:41 -04:00
Mark Gurevich 85951981bb Redact passwords in log files 2021-06-29 13:48:33 -04:00
Mark Gurevich 3651690830 Merge pull request #6919 from viniciusferrao/oraclelinux
Support for Oracle Linux 7 and Oracle Linux 8
2021-04-20 16:52:34 -04:00
Vinícius Ferrão 75a6cd03fe Fixes statefull installation with Oracle Linux 2021-04-16 17:18:21 -03:00
Mark Gurevich 42ffdddf9b For x86 also need to exclude Product-SLED 2021-03-16 17:33:13 -04:00
Mark Gurevich d464c4fc6c Add support for SLES15 SP2 2021-03-16 16:08:35 -04:00
Mark Gurevich 3b65b2d89e Extend XML Simple to pass parser options 2021-03-11 09:26:18 -05:00
Wai Yee Wong 0e4ce55881 Remove experimental warnings of using given-when and smartmatch. 2020-09-28 21:50:17 -04:00
Mark Gurevich 5dbe9f2026 Openbmc hardware control with OP940 2019-09-12 14:38:21 -04:00
Jarrod Johnson 38194af791 Implement HMAC-SHA256 in xCAT IPMI
This will be compatible with some current implementations
that do not have SHA-1.  HMAC-SHA1 may be still secure, but
SHA1 in any context *looks* bad even if it isn't.
2019-07-26 15:33:47 -04:00
Pythagoras Watson bd0ad1ba43 Reduce maximum socket buffer size so select works
The maximum socket receive buffer size (SO_RCVBUF) is set from the value
in /proc/sys/net/core/rmem_max.  When this value is close to INT_MAX,
the select() system call used by IO::Select->can_read() never returns
true.  This causes packets to never be read.  Therefore, reduce the
maximum socket receive buffer size to a value which works.
2019-07-16 10:06:58 -07:00
cxhong 3ec008db60 Pick correct pkglist/tmpl files based on the osvers 2019-06-10 16:53:05 -04:00
GONG Jie 9b845d1b11 Remove the configuration part 2019-04-30 15:25:03 +08:00
GONG Jie c02eaba033 Fix the processing of prefix zero 2019-04-30 13:24:47 +08:00
GONG Jie 480fbe177c Reconstruction of the osimage resources search policy 2019-04-30 13:24:47 +08:00
bxuxa 26fb874a84 Fix a code error 2019-03-21 17:09:29 +08:00
zet809 d4d4a0c1b5 Merge pull request #6150 from robin2008/6145
Avoid noisy warning message on rh8 for makegocons
2019-03-21 16:59:53 +08:00
bxuxa 0ff9bc0be5 Ignore the disable when not installed, not using package checking as we use a fake package there 2019-03-21 16:46:20 +08:00
GONG Jie d4715d2745 Fix #UNCOMMENTOENABLEDEBUGPORT# replacement 2019-03-21 16:25:10 +08:00
Gᴏɴɢ Jie 14f993bc14 Merge master branch to RHEL 8 branch (#5953)
* rpower for redfish support

* rsetboot for redfish support

* recover

* modify depending on discussion and comments

* refine test case xcatd_start (#5932)

* Update small text in the diskful support example for cuda_power9_setup

Fix small issue mentioned in 5852

* rsetboot for redfish support

* Fix issue 5933: xCAT-openbmc-py build failed

* Fix remoteshell compatibility with custom Match (#5936)

If a user has a custom Match directive, remoteshell would
create an invalid configuration.  Fix by ensuring we are
outside of a match context by doing Match all explicitly.

* fix issue PR #5936 resulted in remoteshell failed in rhels6.10 #5944

* refine xcat-inventory backend testcase (#5946)

* add test case for issue 3602: confignetwork cannot work when regular expression is used in nics table

* add lsdef to get more debug info

* Revert "fix issue PR #5936 resulted in remoteshell failed in rhels6.10 #5944"

* revert PR Fix remoteshell compatibility with custom Match #5936
2019-01-15 17:33:59 +08:00
GONG Jie 18b416dc06 Use shell function base64decode() instead of python 2019-01-08 13:42:49 +08:00