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>
pasu strips OneCLI's banner and status lines so only the requested settings are
shown, but OneCLI has grown several status lines over the years that were not
filtered and leaked into the output. Add the missing patterns.
Recovered from the unmerged lenovobuild branch (229533cb, a6932bb4), which added
"Connected to BMC at IP address" (master only matched "by"), "Succeed in running
the command:" and "start to convert cmd.". Extended after testing a current
OneCLI 5.3.0 on a Lenovo ThinkSystem SR635, which also emits "Start to connect
...", "Connected to the node(N) by KCS" and a trailing "Succeed." -- now
filtered too.
Validated by running a real OneCLI 5.3.0 "config show" through the filter:
every banner/footer line is removed and all 756 setting lines pass unchanged.
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
When invoked with no node name, replaycons printed a terse "Please specify a
node name." Print the full usage statement instead, consistent with -h.
Also document, in the man page, that confluent log rotation renames older logs
and how to replay one by appending the date suffix seen in
/var/log/confluent/consoles/.
Recovered from the unmerged lenovobuild branch (originals 1c1b23fac, 48a92b7d4).
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
Running rspconfig against an mgt=ipmi node with no option fell through to the
generic "Unsupported command: rspconfig " message (with an empty option),
which does not tell the user what is wrong. Detect the empty option in
preprocess_request and report that options are required.
Recovered from the unmerged lenovobuild branch (original 08ae94bd).
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
nodestat -f runs fping to reach the nodes; if the fping package is not
installed the pipe yielded no output and nodestat silently returned an empty
result. Check that an fping binary exists before running it and emit an
explicit "must install fping" error otherwise.
Recovered from the unmerged lenovobuild branch (original f0c88182), reworked
to test for the binary directly: the original inferred fping's presence from
whether the pipe produced output, which false-positived (reporting fping
missing) when fping was present but every node was unresolvable -- caught in
lab validation.
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
The FRU key sort used only `$a <=> $b`, a numeric comparison that returns 0
for the non-numeric FRU field names, leaving them in hash-iteration order.
That order is randomized per process, so `rinv <node> all` printed its fields
in a different order on each run. Add `$a cmp $b` as a tiebreaker so the
output is stable.
Recovered from the unmerged lenovobuild branch (original 9cd3fac6).
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
The postscript rewrites host= in the freshly fetched /etc/xcat/cfgloc to point
at MASTER, discarding the database location the credentials came with. That is
the only record of it when the database does not live on the management node.
Keep it as cfgloc.orig; the existing chmod 600 /etc/xcat/cfgloc* covers it.
Recovered from the unmerged lenovobuild branch (10090a9d). The original also
replaced the atomic write with mv-then-sed, which leaves cfgloc truncated if
sed fails, so the write itself is left alone.
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
systemd tooling run inside the image chroot has no bus to talk to and prints
"Failed to connect to bus: No such file or directory". The image builds
correctly, so say so at the end of the run instead of leaving it to be guessed.
Recovered from the unmerged lenovobuild branch (e372fb5b).
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
noderes.netboot is parsed as grub2-<protocol> and validated with
/^http|tftp$/, which reads as (^http)|(tftp$) and so also accepts values
such as https, httpx and xtftp.
A value that passes but is not exactly "http" then falls through to
set root=$grub2protocol,$serverip, which drops site.httpport, so the mistake
surfaces as a confusing grub2 failure at boot instead of the "Invalid netboot
method" error this check exists to give. grub2-https cannot work in any case,
since only "insmod http" is emitted.
Supported values are unchanged: grub2, grub2-http and grub2-tftp.