2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-24 03:12:18 +00:00
Files
xcat-core/xCAT-genesis-scripts
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
..