Boot URLs handed to nodes always carried an explicit :80 even when the HTTP
server listens on the default port. grub2.pm already omits the port when it is
80; make the xNBA, genesis and DHCP boot URLs consistent with it.
$portsuffix is empty when site.httpport is unset or 80 and ":<port>" otherwise,
so a non-default port is unchanged. Covers the ISC and Kea paths in dhcp.pm,
xnba.pm, mknb.pm, and the Kea xNBA client classes in BootPolicy.pm.
dhcp_boot_policy.t and mknb_xcatd_address.t follow the new URLs and gain cases
for a non-default and an unset port. The floating-address guard in
mknb_xcatd_address.t also drops :80 so that it keeps matching.
Recovered from the unmerged lenovobuild branch (cd61fd9d, a2f77ea9, 1035841b,
b7db0e2, 792fe6d).
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
Cumulus switch MAC discovery matched the fdb port with a regex that only
accepted a plain numeric swp name (dev swp([0-9]+)), then guessed among
swp5/05/swp05 formats. A node on a breakout port (swp1s0, swp1s1, ...) never
matched, so it was silently not discovered. Match any swp name (dev (swp[^ ]+))
and use it directly, dropping the format-guessing.
Gated: this whole block runs only for switchtype eq 'onie' (Cumulus/ONIE
switches); SNMP switches use a separate path and are unaffected.
Validated against real 'bridge fdb show' output (the stock iproute2 command
Cumulus runs over SSH): the old regex parses only 'dev swp1' and drops
'dev swp1s0'; the new regex parses both. Confirmed the environment on a booted
NVIDIA Cumulus VX 5.10.
Recovered from the unmerged lenovobuild branch (72d68bc7).
Recover several man-page clarifications that never merged from the lenovobuild
branch. All are documentation-only -- the man .pod sources with their
generated .rst, plus the networks-table description in Schema.pm:
* makedhcp / nodeset: note that UEFI boot directives are intentionally
omitted when nodetype.os names an OS without UEFI support, even for
'nodeset shell'.
* networks table dhcpserver: warn that it should be set only for service
node operation and that <xcatmaster> is not a valid value.
* noderange: clarify that the syntax is for xCAT.
* reventlog: note that unimplemented sensor types yield 'No Mappings Found'
and point to confluent's nodeeventlog facility.
* rcons: document confluent console auto-reconnect (a randomized 2-4 minute
retry, or 'ctrl-e o a' to force one); the original's stray backtick markup
is corrected.
Recovered from the unmerged lenovobuild branch (originals 2d4f12f4, 760f2f8b,
23d63d59, 44b47c44, c63d780f, db4dc42b).
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
formatNetmask() uses its first argument immediately (inet_aton($mask),
2**$mask, hex $mask) with no check that it is defined. Callers that pass an
undefined mask trigger "Use of uninitialized value" warnings and a
meaningless result instead of a clean failure.
Return undef up front when $mask is not defined.
Recovered from the unmerged lenovobuild branch (original acbbeb86).
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
Add a shared OMAPI policy helper for ISC DHCP and DDNS so administrators can select the key name, signing algorithm, and omshell path from the site table while preserving the existing xcat_key hmac-md5 default.
Keep local ISC updates from hanging indefinitely when omshell does not exit, and use a static host-declaration fallback for local Ubuntu ISC releases where omshell is unstable for xCAT host updates.
Co-authored-by: gskouson <1507929+gskouson@users.noreply.github.com>
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
xcatd forks child processes to handle plugin requests. The child
inherits NodeRange.pm's module-level caches (@allnodeset, %allgrphash,
@grplist) with their timestamps from the parent. If the parent had
populated these caches within the past 5 seconds, the child reuses
stale data that does not reflect database changes committed by other
requests that completed between cache population and the fork.
This causes non-deterministic failures in group-definition regression
tests (chdef_group, mkdef_group, rmdef_group) where lsdef -s runs
noderange expansion inside the forked plugin process and hits the
inherited stale cache that predates the mkdef -t group commit.
Track the PID at cache-build time and treat any cache built by a
different PID as expired, forcing a fresh database read in children.
Five vm attributes (vmhost, vmothersetting, vmmemory, vmcpus, vmnics)
had an only_if => 'mgt=kvm' guard in Schema.pm that silently hid them
from lsdef output unless mgt=kvm was set. The other 16 vm attributes
had no such guard. This inconsistency caused the documented regex
example in "Groups and Regular Expressions in Tables" to produce
incomplete output.
Fixes: xcat2/xcat-core#3006