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>
Promote bind9 from Recommends to Depends on the xcat and xcatsn metapackages. bind9 is
required by makedns, so it must be a hard dependency regardless of the system's APT
recommendation policy -- xCAT manages the cluster DNS through makedns/named, which
makes a DNS server as essential to a management or a service node as the DHCP backend
already declared beside it ("isc-dhcp-server | kea"). As a Recommends it was installed
only while that policy asked for it: an Ubuntu 26.04 management node came up with no
/usr/sbin/named and makedns failing with "failed to start named".
Strip only a trailing third component when deriving the debootstrap suite in the
Ubuntu netboot genimage. The previous s/\.\d+$// also removed the minor from a
two-part osvers, so an initial release with no point-release ISO -- ubuntu26.04, but
equally an initial-release 18.04/20.04/22.04 -- reached debootstrap as a bare major.
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 riscv64 kernel was built without ACPI. Firmware that publishes ACPI
tables and no device tree - server-class RISC-V boards, and edk2 with
acpi=on - therefore left the kernel with no hardware description: it died
before console initialisation, so a node handed the image by grub2 went
silent at ExitBootServices and never reached the discovery action.
Enable ACPI, its error interfaces and the EFI stub the image is already
booted through. Rebuilt with these options, the same image on the same
firmware parses the RSDP, XSDT, FACP, DSDT, APIC, RHCT and SPCR tables,
reaches multi-user and starts discovering, and the kernel now also sees
the SMBIOS entry point the firmware exports.
Resolve installnic with the non-fatal #TABLEBLANKOKAY# token so an absent
noderes.installnic renders blank instead of aborting xnba generation, and treat an
empty installnic exactly like "mac": match the interface by its boot MAC address and
do not rename it. That is the same default EL and SLES already get, since their
statefull templates never reference installnic at all.
Nodes that do set noderes.installnic are unaffected -- the set-name branch is
unchanged. The diskless/netboot path never referenced installnic and is untouched.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
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>
Add a unit test for the option that selects fping instead of nmap.
The test takes the specification out of the plugin source and gives it to
Getopt::Long with the settings that the daemon uses, so it drives the
specification that the plugin ships.
It shows that -f, --usefping and the older --useping each select fping, that
--use and --us still select usemon and do not select fping, that the bundles
-mf and -fm select both options, and that both places parse through the one
specification.
Add a unit test for the routine that chooses the compression program. The
test lifts the routine out of the plugin source, because the plugin needs a
management node to load.
The test shows that lzma is used when it is there, that xz stands in when it
is not, and that xz is asked for the lzma container rather than its own. It
also shows that the caller takes the command from the routine, that the file
keeps its name and its suffix, and that the gzip fallback and the rename into
place both remain.