Cover the shape of the data that makeconfluentcfg builds from the switch
table. A node has one row for each interface, so the merge must keep every
row. A row that names an interface gives the switch and the port of that
interface. A row that names no interface gives the plain names. An empty
switch table must not change the configuration.
Also pin the table that each branch reads. The switch columns come from the
switch table in both branches. The nodepos table does not have them.
With PDU2-MIB loaded, SNMP.pm returns an enumerated INTEGER as its label
rather than its number: a PX4 answers inletSensorUnits with "amp" rather
than "2". That failed the numeric test, fell back to none(-1) and
dropped the unit suffix from every rvitals reading.
Add pdu2_enum, which accepts the number, the label, or the label(value)
form Net-SNMP produces with quick printing off, and use it for the
sensor units and for outletSwitchingState.
Also stop requiring the switching probe to read on or off. An outlet can
be in any SensorStateEnumeration state, and pdu2_get has already ruled
out an absent instance, so any answer proves the outlet is switchable.
Signed-off-by: Kilian Cavalotti <kilian@stanford.edu>
Add a unit test for the entry decision of the blade preprocessor. The test
lifts the entry out of the plugin source and drives it, because the plugin
needs a management node to load in full.
The test gives the entry the request that a booting node sends, which names
no node, and shows that the entry hands it on and answers no error. It also
shows that a request for another command without a noderange is still
refused.
Extract per_bmc_argument and the set of settings that take a list from
ipmi.pm, and drive the real routine, because the plugin needs daemon
dependencies that the test host does not have.
Cover a single value serving every BMC, a list read in session order, a
list too short for the BMC being configured, empty entries, and the
defensive inputs. Assert that only ip, netmask and gateway read a list,
that the caller reports a short list rather than sending it, that the
session keeps the value of its own BMC for the follow-up, and that the
thermal profile keeps its own argument.
Add a unit test for the routine that selects the blades. The test lifts the
routine out of the plugin source, because the plugin needs a management node
to load.
The test gives the routine the row shapes that the writers of the mp table
make: a management module and its blades from xCAT::PPCdb::add_systemX and
the shipped mp template, a chassis that gives its hardware type, and one row
for each hardware type that lsslp writes. It also shows that the handler
reads the chassis attribute and that it stops before the arp table when the
mp table holds no blades.
A missing object is exception text under v2c/v3 and an error under v1,
and genpdu treated both the same. Add pdu2_get, returning a value and an
ok, absent or failed status. A failed signed minimum read now skips the
sensor, and rinv no longer prints "No Such Instance currently exists at
this OID" for a nameplate field the model does not populate.
Read the signed minimum per entity: the MIB indexes it that way, and it
decides which value column is read.
In the session probe, fall back to the PDU2 nameplate rather than
sysDescr, so a credential that cannot read PDU2 is rejected, return
early when the pduCount read fails at the transport level, and warn once
per PDU.
Signed-off-by: Kilian Cavalotti <kilian@stanford.edu>
genpdu read negative-capable sensors from the unsigned value column,
which the MIB leaves undefined for them: a PX4 answers it with 0 for
inlet reactive power and carries the reading in the signed column. Use
SensorSignedMinimum to pick the column, as the MIB specifies. The
unsigned column is still needed for active energy, whose range exceeds
Integer32 and reads 0 in the signed one.
An unreachable PDU or a wrong credential looked like a PDU without
switched outlets, since the switching probe was the first exchange with
the device. Probe pduCount first (implemented by every PDU2 agent,
verified on PX2, PX3 and PX4) and return no session when it fails, so
callers print "Couldn't connect to <pdu>". Warn when pduCount is not 1
rather than refusing: a linked primary still answers for its own
outlets.
Add unit tests for the genpdu sensor, session and inventory paths.
Signed-off-by: Kilian Cavalotti <kilian@stanford.edu>
Treating an empty noderes.installnic as "mac" skipped noderes.primarynic: a node
that configures only primarynic was installed with a netplan matching on mac.mac
that never renamed the interface, and a primarynic holding a MAC address was
ignored. The order xCAT uses everywhere else is installnic -> primarynic ->
mac.mac, with either attribute allowed to hold an interface name or a MAC
address, and xCAT::NetworkUtils::gen_net_boot_params already implements it for
the netboot kernel parameters.
Resolve it in Perl and hand the template the answer:
- xCAT::Template::subiquity_install_netcfg() delegates the order to
gen_net_boot_params and returns the netplan set-name (empty when the device is
matched by MAC alone) and the address to match on, with mac.mac parsed by
xCAT::Utils::parseMacTabEntry so |-separated, !hostname-suffixed entries
resolve to THIS node rather than to whichever entry came first.
- #SUBIQUITYINSTALLNIC# / #SUBIQUITYINSTALLMAC# render those two values.
installnic and primarynic are read blank-okay -- a node that sets neither is
normal, and is exactly what "match on mac.mac" means -- while mac.mac stays a
required lookup, as it was when the template read it directly.
- compute.subiquity.tmpl consumes the resolved values. No part of the fallback,
and no mac.mac parsing, is left in shell: it only chooses whether to emit
set-name, based on whether a name was resolved.
ubuntu_subiquity_installnic.t now passes: the six resolution cases, multi-entry
mac.mac, and the netplan the template's own late-command writes for a resolved
name and for none. ubuntu_subiquity_template.t asserts the template no longer
reads installnic/primarynic or parses MACs itself.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Two independent defects stop xCAT working on Ubuntu 26.04 (resolute).
bind9 is only a Recommends on the xcat and xcatsn metapackages. xCAT manages the
cluster DNS through makedns/named, so a DNS server is essential to a management or a
service node -- but a Recommends is installed only while the system's APT
recommendation policy asks for it, so nothing guarantees named is on the node. On an
Ubuntu 26.04 management node it was not there: no /usr/sbin/named, and makedns failed
with "failed to start named".
The Ubuntu netboot genimage reduces an osimage's osvers to a debootstrap suite with a
bare s/\.\d+$//. That also strips the minor from a two-part osvers -- an initial
release with no point-release ISO -- so ubuntu26.04 becomes "26" and debootstrap dies
with "E: No such script: /usr/share/debootstrap/scripts/26". It is not 26.04-specific:
an initial-release 18.04/20.04/22.04 ISO hits it too.
Assert bind9 is a hard Depends on both metapackages, and drive genimage's real
codename derivation over a table of osvers. Both fail today.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT resolves the provisioning interface as installnic -> primarynic -> mac.mac,
and either attribute may hold an interface NAME or a MAC address;
xCAT::NetworkUtils::gen_net_boot_params owns that order for the netboot kernel
parameters. The Subiquity template short-circuits it: an empty installnic is
treated as "mac" straight away, so a node that configures only primarynic is
installed with a netplan that matches on mac.mac and never renames the
interface, and a primarynic holding a MAC address is ignored entirely.
Assert the full order against a resolver in xCAT::Template -- installnic as a
name, installnic as a MAC, installnic empty with primarynic as a name, empty
with primarynic as a MAC, both empty, and the literal "mac" -- plus multi-entry
mac.mac resolution, and then run the template's own netplan late-command with
the resolved values and compare the file it writes. These fail on the current
template, which carries the resolution in shell and has no resolver to call.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Pin the configuration symbols that let the riscv64 Genesis kernel describe
its hardware on firmware that publishes ACPI tables and no device tree, and
the EFI stub grub2 boots it through. Without them the image dies before the
console exists and the node goes silent instead of discovering.
The Ubuntu diskful (Subiquity) install fails on any node that does not set
noderes.installnic. compute.subiquity.tmpl resolves #TABLE:noderes:$NODE:installnic#,
and Template.pm's tabdb raises "Unable to find requested field <installnic> from
table <noderes>" when the value is absent, aborting with "Failed to generate xnba
configurations" so the compute node never enters the installer. EL and SLES pass the
identical case because their statefull templates never reference installnic
(gen_net_boot_params defaults to the boot MAC).
Assert that the template uses the non-fatal #TABLEBLANKOKAY# token for installnic and
treats an empty installnic the same as "mac" (match by MAC, no NIC rename). These
assertions fail on the current template, capturing the defect.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>