2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-24 11:22:18 +00:00
Commit Graph

15 Commits

Author SHA1 Message Date
Daniel Hilst f2688f9d5a fix(xcat-core): Genesis hands an unbracketed IPv6 address to openssl
Parsing the xcatd= argument was only half of it. doxcat re-joined XCATMASTER and
XCATPORT at twenty call sites, and /bin/getcert and /bin/getdestiny pass that string
to openssl s_client -connect, which rejects an unbracketed IPv6 address:

  openssl s_client -connect 2001:db8:190::1:3001
    s_client: -connect argument or target parameter malformed or ambiguous
  openssl s_client -connect [2001:db8:190::1]:3001
    depth=1 CN=xCAT CA

Measured on an IPv6-only node whose cmdline parsed correctly: /etc/xcat held
certkey.pem and privkey.pem but no cert.pem, and nodelist.status stayed empty.

doxcat now derives XCATDEST once, bracketing an address that holds a colon, and every
call site uses it. getcert already honoured XCATDEST as an environment variable.
dodiscovery falls back to the old form when doxcat did not export it.

The mutation keeps the variable and changes only its value: 4 of the 7 bats cases go
red, the IPv6 ones, and the 3 IPv4 and default-port cases pass.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 19:02:41 -03:00
Vinícius Ferrão dda0435e12 fix(genesis): report the system UUID that the kernel prints
Genesis discovery swapped the first three fields of product_uuid before
it sent the UUID. When that was written, the kernel printed the SMBIOS
bytes in their stored order, and the swap gave the UUID that dmidecode
prints. Since Linux 3.8 product_uuid is that UUID already, so the swap
stores vpd.uuid in SMBIOS byte order. makedhcp then reverses it again,
and the DHCPv6 reservation does not match the DUID that UEFI firmware
sends.

Discovery now reports product_uuid as it is, as the OpenEmbedded
Genesis does. doxcat keeps the swap in the DUID that it writes for
dhclient, because the swap gives the DUID that the firmware sends.
Windows provisioning links the node file under both UUID orders and
does not change.

(cherry picked from commit 1a6cd4259ca8b71fc12aa03e61b88b60705d7889)
(cherry picked from commit dfdc48b96d)
2026-10-26 15:27:22 -03:00
Vinícius Ferrão 3908b13960 fix(discovery): use FIPS-compatible bootstrap keys 2026-10-05 22:55:27 -03:00
Vinícius Ferrão e239e04843 genesis-scripts: improve shell quoting and syntax hygiene
Replace backtick command substitutions with $(), quote variable
expansions to prevent word splitting, replace useless cat pipes with
redirections, use grep -q instead of redirecting to /dev/null, and use
bash parameter expansion for case conversion.

Based on the work from PR #6366, rebased and adapted to current master.
Shebangs already merged separately via df64bf8fe are excluded.

Co-Authored-By: Samveen <samveen@yahoo.com>
2026-05-07 18:17:00 -03:00
davidmonro 6c2480fb5e dodiscovery: when parsing DMI FRU data, only ignore the product name if it is entirely whitespace, rather than just containing some (#7500) 2025-05-31 01:33:20 +02:00
Kilian Cavalotti 7f7d7db591 use \s to handle all types of whitespace 2023-12-11 14:50:10 -08:00
Kilian Cavalotti 7e4f11119d fix FRU parsing when empty values are provided 2023-07-27 14:12:13 -07:00
Kilian Cavalotti 6bbabb551e retab 2023-07-27 14:12:03 -07:00
GONG Jie a1a9d1b460 Remove trailing spaces in file xCAT-genesis-scripts/usr/bin/dodiscovery 2017-12-31 23:59:59 +00:00
ertaozh 7c1ef91cb5 Fix issue 5360: dodiscovery does not handle lldp failures in some cases 2018-07-24 03:19:51 -04:00
Bin Xu b962479353 Fix the issue: Failed to discover nodes as the discovery method is set to udef by wrong (#4860)
- zvmdiscovery plugin will not handle findme
 - not change request if no temp discovered bmc nodes, to avoid the confusing error message
 - add more logs, and ignore the `ipmitool sol info` error output
2018-03-01 15:20:25 +08:00
zet809 4af7ba619b Merge pull request #4781 from stanford-rc/dodiscovery_syntax
dodiscovery: fix syntax error in case flag_serial is not defined
2018-02-02 14:05:37 +08:00
Kilian Cavalotti ea9b20e1fe dodiscovery: fix syntax error in case flag_serial is not defined 2018-02-01 17:34:29 -08:00
Kilian Cavalotti 49b8f0cf44 dodiscovery: FRU info may be present may incomplete. Check the contents
of MTM obtained from FRU and fallback to DMI if it's empty.
2018-01-31 16:47:28 -08:00
Samveen Gulati 63a3efe8bb move /*bin to /usr/ to fix path conflict of genesis base and scripts
RH7/Centos7 and recent versions of fedora relocate `/*bin/*` into `/usr/*bin/`. This causes
conflicts for upgrades against xCAT-genesis-scripts-* packages which expect the `/bin` a to be
a directory while `xCAT-genesis-base-*` packages provide a link. Relocating all files into `/usr`
fixes that conflict and allows a clean upgrade from all old versions.
2018-01-12 06:06:25 +00:00