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

34 Commits

Author SHA1 Message Date
Daniel Hilst dc8c5cefed fix(xcat-core): Genesis sends a DUID the reservation does not hold, and makedns aborts on a /62
Both Genesis images built a DUID-UUID from the nil SMBIOS UUID. makedhcp refuses that UUID,
because nodeimport writes it to every PowerKVM node, and reserves the hardware address instead,
so the client sent an identifier no reservation held and the node took a pool address with no
boot file. genesis-duid and doxcat now keep the DUID-LL for it, which is what Kea reads the
hardware address out of.

getzonesfornet died on an IPv6 prefix that is not a multiple of 4, which took makedns and
makedhcp with it for a /62 or a /126 network. A reverse zone is delegated on a nibble, so the
prefix is rounded down and the enclosing zone is returned. Both copies of the routine are fixed.

The test suite needs socat and jq, and five bats files skipped without them, so the workflow
installs both. Template.pm drops the unused _is_el10, credentials.pm drops a repeated import,
and two comments that recorded bug history are cut to the fact the code cannot show.

Reverting any one fix fails named assertions: 1 of 8 and 1 of 3 bats cases for the two Genesis
images, and 4 of 30 in ddns_ipv6.t, which traps the abort so the file still reports.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-27 10:20:52 -03:00
Vinícius Ferrão f05677d173 feat(ipv6): add EL10 IPv6-only provisioning support
An IPv6-only provisioning network cannot deploy a node. The discovery and
credential callbacks open IPv4 sockets, the kickstart and boot templates
render an IPv4 address into every endpoint, and makehosts drops an IPv6
value because hosts.pm gates on isIpv4addr.

NetworkUtils gains the address helpers the rest of the change uses:
format_host_port, parse_host_port and format_uri_host bracket an IPv6
literal, getNodeNetworkCfg6 reads the static IPv6 configuration of a node,
my_ip_facing_family selects the management-node address of one family,
getIPv6ReverseZone builds a nibble-aligned reverse zone, and
node_is_ipv6_only and ipv6_server_for_node answer the two questions the
plugins used to answer for themselves. credentials.pm opens the callback
socket through IO::Socket::INET6 when the modules are present and keeps the
IPv4 path when they are not. Template.pm and anaconda.pm render an IPv6
kickstart network line and bracketed endpoints. The postscripts and the
stateless xcatroot format every endpoint through the bracketing helpers.

xCAT-server requires perl-IO-Socket-INET6 and perl-Socket6 on EL, and
libio-socket-inet6-perl and libsocket6-perl on Debian.

(cherry picked from commits c0a69bb5a and caa8ca790)
Ported onto upstream master ee6b4f532. The two commits are folded because the
second refactors the first. Master is kept where it has a newer form of the
same thing: the getipaddr cache guard, the Kea control_socket_path helper, the
netboot method list, install_device_params, the modern_installer test and the
isValidIp validator, which replaces the isValidIPAddress this branch added.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 3928c04507)
2026-10-26 15:27:08 -03:00
Vinícius Ferrão 4879eef80b refactor(xcat): reuse whitespace trimming in blade and credential paths 2026-10-10 21:13:41 -03:00
Daniel Hilst 5a969c8eb7 fix(credentials): refuse a getcredentials request naming no credential
Which credential is wanted is named in <arg>. A request without one
reached a dereference of an undefined array ref, so xcatd died inside the
plugin and shipped the Perl error back to the client instead of ignoring
the request.

Check for the element before the callback is made, and log and drop the
request the same way a bad callback port is dropped. A client that sends
a malformed request now learns nothing about the server, which is the
point: this path hands out cluster certificates to anything whose address
resolves.
2026-09-11 09:00:35 -03:00
Vinícius Ferrão a712ec33d9 fix(credentials): serve the passwd hash of a node's configured sudoer
getcredentials answered xcat_secure_pw only for root, so a postscript
had no way to get the password of another node account from the passwd
table.

xcat_secure_pw:<user> now returns the password field of the passwd row
key=system,username=<user> when <user> is root or a sudoer named in the
postscripts or postbootscripts of the requesting node, its osimage, or
xcatdefaults. A sudoer without a row or without a password gets the
locked field "!", so the node applies the reply as is. Any other user,
an invalid user name, or a failed hash answers with an error instead of
an empty reply. The root request reads the same row as before and keeps
the error reply for a missing row.
2026-09-03 20:39:08 -03:00
Vinícius Ferrão bae92ffc47 fix(credentials): audit delegated certificate signing 2026-08-20 17:37:19 -03:00
Vinícius Ferrão 109f587a7f fix(credentials): delegate node certificates through service nodes 2026-08-20 16:50:27 -03: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
Jarrod Johnson 85149c37f4 Have server enforce SSH zone separation
When a client requests a zone's ssh credentials, make sure the
client is consistent with the specified zone.

Per github user salben21
2022-09-09 12:59:37 -04:00
Kurt H Maier 0ed366820c plugins/credentials.pm: add ed25519 host key support 2022-03-25 10:24:23 -07:00
GONG Jie 9aaf518c2b Remove trailing spaces in file xCAT-server/lib/xcat/plugins/credentials.pm 2017-12-31 23:59:59 +00:00
Bin Xu 18c5afc0f4 support secure root method (#5286)
- support xcat_secure_pw:<user> API in credential plugin
 - for diskless, if enabled secure root, packimage will not write root password into image
 - for stateful, if enabled secure root, nodeset will not write root password into config file
 - and 'remoteshell' will update shadow file accordingly
2018-06-15 10:28:51 +08:00
Bin Xu cb25622331 It is for provision log enhancement and partial address #4582 (#4648)
- clear logs in the key components during provisioning (not only debug mode, but debug mode will have more logs)
 - now only cover rhel7 stateful and stateless
 - make more syslogs into cluster.log (tag = xcat or xcat.*)
 - the changes will not impact other distro
2018-01-23 03:20:42 -06:00
Matt Ezell 5def082bfb Make sure credential files have a trailing newline (#4442) 2017-12-05 20:52:39 -06:00
Mark Gurevich 0a3fbd8d51 perltidy all perl files 2016-07-20 11:40:27 -04:00
zhaoertao f320262f7c enhance the xcatdockerhost certification transmitting process 2015-07-06 02:34:43 -04:00
GONG Jie ca4437270a Fix sourceforge bug #4691 Use a consistent log tag for xCAT log 2015-07-01 18:03:36 +08:00
lissav 946664e1a1 defect 4231 2014-07-21 12:44:57 -04:00
lissav 971808efbd support zone root ssh keys 2014-03-03 13:18:53 -05:00
lissav 6d00593449 enhance error reporting 2013-10-17 11:04:01 -04:00
lissav 57f924c50d defect 3811 2013-10-01 08:25:09 -04:00
jbjohnso cab8191379 Support per-node ssh host keys if detected - Thanks to Frank Schwichtenberg
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15577 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-03-19 13:22:33 +00:00
jbjohnso 6ad28fa9ae Add ability for xCAT to sign client certificates
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10414 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-31 13:33:38 +00:00
jbjohnso 18aadce8ee -Fix credentials plugin
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7180 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-20 18:14:20 +00:00
jbjohnso d2e7821be3 -Be more picky about the nature of the https server when thinking about credential authorization
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7111 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-17 14:01:14 +00:00
jbjohnso cb0fefce56 -Add capability to check by https server on a callback_https_port
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7110 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-17 13:57:56 +00:00
mxi1 251f40143e #bug 2788254 for Linux is fixed, and with more comments, hope it helps.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3358 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-05-12 12:18:12 +00:00
mxi1 f164c76ca1 Undoing change commited in r3331
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3342 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-05-11 15:47:34 +00:00
mxi1 79abdf152c -bug 2788254 is fixed; comitted the code change into trunk
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3331 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-05-11 02:39:34 +00:00
zhanx 4a72a291ea fix defect 'if no file under /etc/xcat/hostkeys, installation hangs': bug id:2788254
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3301 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-05-07 08:07:24 +00:00
jbjohnso 9664ad0072 -Have xCATd provide what may likely be FQDN as a value in the request
-Implement 'getcredentials' for a krb5 keytab, requires documentation
-Have getcredentials.awk fundamentally capable of requesting multiple credentials in a single request (theoretical scaling)


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2908 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-03-15 20:23:48 +00:00
nott 0f50081b3a Set root directory correctly for AIX
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2852 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-03-07 18:22:31 +00:00
lissav 2ded87c984 These updates move the /install/postscripts/hostkeys private and public keys to reside in /etc/xcat/hostkeys directory. It will leave a copy of the public hostkeys in /install/postscripts/hostkeys
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2714 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-02-10 19:48:29 +00:00
jbjohnso e68fe9d2db -Move xCAT-server and client to not have 2.0 in name for trunk
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1561 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2008-06-03 14:56:33 +00:00