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.
The reboot postscript backgrounds "(sleep 75; reboot) &". On SUSE that can
fire while the installer is still finishing, rebooting the node mid-install.
Use a systemd timer (systemd-run --on-active=90 /sbin/reboot) on SUSE, which
the installer teardown does not race; EL and Ubuntu keep the existing
backgrounded sleep.
Gated on SUSE and the presence of systemd-run, so no other platform changes.
Recovered from the unmerged lenovobuild branch (6785eb3a, 4fe2a72c, ac04f5ad;
net effect, consolidated).
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).