Five cases in xcatroot_rootimg_checksum.bats run the Ubuntu xcatroot
as a systemd initial ramdisk runs it:
- with imgurl, XCAT and rootimgchecksum only on the kernel command
line, not in the environment;
- with the DNS servers and domain only in the systemd-networkd lease;
- with an image whose resolv.conf links to the systemd-resolved stub;
- with an image whose hostname file is empty.
Three of them fail on this tree. The other two check that a
resolv.conf and a hostname which are already set are kept.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit e221262d91de99299341d0ca35248c9360dab342)
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
ubuntu_netboot_initqueue.bats captures two defects in the Ubuntu dracut
module. The boot NIC gets no DHCPv4 lease, because nothing turns on
DHCP for the 70-BOOTIF.network file that systemd-network-generator
writes from BOOTIF=. And xcat-cmdline.sh writes its finished condition
outside $hookdir, so dracut-initqueue ends before the settled hook
that fetches the root runs. Both new cases fail on this tree.
imgutils_ubuntu_dracut_module.t now also checks the inst_simple
sources of the install script.
ubuntu_netboot_root_handler.bats sourced the online hook from sh. On
an Ubuntu host sh is dash, whose "." passes no arguments, so two cases
failed there. The initramfs sh is bash, so the cases now use bash.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 22cf6d78573f3df38c5d395dde4f50fc5c7a3640)
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
An IPv6 address can end in dotted decimal: 2001:db8:1::192.0.2.20 and
2001:db8:1::c000:214 are the same address. ipmitool and BMCUtils accept
the dotted form, but ipv6_expand in bmcsetup rejects the dots, so an
OpenBMC configured with that spelling reports installstatus failed.
The new cases check the final OpenBMC status for both spellings, in both
directions, and for a different address. The first case fails on the
current bmcsetup.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
An OpenBMC node can report "failed" after its IPv6 address is set
correctly, and "bmcready" when the BMC has a different address.
bmc_has_address in bmcsetup searches the lan6 print output for the
configured text, so a different spelling of the same address does not
match, and "2001:db8:1::2" matches "2001:db8:1::20".
The new tests give the BMC equivalent spellings (zero-padded and
compressed, upper and lower case, with and without a prefix length),
and different addresses that share a text prefix, for IPv6 and IPv4.
They fail on this commit.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
On an IPv6 cluster, bmcsetup in Genesis sends the bmcready status to
"[2001" instead of the management node. An OpenBMC node also reports
"failed" after its IPv6 address is set correctly.
The new tests run bmcsetup with xcatd=[2001:db8::1]:3001 on the kernel
command line and XCATMASTER in the environment, as doxcat starts it.
They record the host that updateflag.awk and allowcred.awk receive. The
OpenBMC tests supply the lan6 print output of the BMC. The IPv6 tests
fail on this commit. The IPv4 tests pass.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
On an IPv6 cluster, getcert and bmcsetup in Genesis start allowcred.awk
with the environment that doxcat exports. doxcat exports XCATMASTER.
allowcred.awk reads only MASTER_IP and MASTER, so it opens an IPv4
listener. xcatd calls back over IPv6, gets no answer and issues no
certificate.
The existing tests set MASTER_IP, so they do not see this failure.
The new tests start the Genesis allowcred.awk with only XCATMASTER,
XCATPORT and XCATDEST set, as doxcat does, and connect over the family
of that address. The IPv6 test fails on this commit.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
bmcconfig finds the netmask and gateway of a BMC with inet_aton and a
dotted-quad match, so a BMC with an IPv6 address gets no network and
Genesis does not configure it. bmcsetup only writes IPv4 LAN parameters.
Move the network lookup of net_parms into xCAT::BMCUtils::bmc_net_params,
with the IPv4 behaviour unchanged, so a unit test can call it. Add tests
for the IPv4 and IPv6 results of the lookup, and bats tests for the lan6
commands that bmcsetup must issue. The IPv6 tests fail on this commit.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
run_genesis stops the Genesis script after 20 s. On a riscv64 host,
tests 2 and 3 of genesis_secondary_dhcp6_order.bats take about 34 s
each, so they fail with exit 124 although the script is correct.
The cap is now 120 s, and GENESIS_SANDBOX_TIMEOUT overrides it. With
GENESIS_SANDBOX_TIMEOUT=10 on x86_64, tests 2 and 3 fail with exit
124, which is the failure seen on riscv64.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
makedhcp applies the firmware and canonical policies of mac.duid to
vpd.uuid. configdhcpv6duid applies them to product_uuid of the node. A
KVM domain that an earlier mkvm defined holds the byte swap of
vpd.uuid, so in that guest product_uuid is the swap. With duid=canonical
the installed DHCPv6 client then sends the firmware order, and matches
no reservation.
postscript_dhcpv6_duid.bats gives the script a vpd.uuid in VPDUUID and
a product_uuid that is its swap, and asserts the DUID that makedhcp
reserves for each policy. It also asserts that mypostscript exports
VPDUUID. The five tests fail on this tree.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
"the online hook calls the handler with dracut's three arguments" and
"a second interface does not fetch the image again" fail in the GitHub
CI with "called: No such file or directory". Both cases source
xcat-online.sh from sh. On Ubuntu sh is dash, and the dash "." builtin
passes no arguments, so the hook sees no interface and returns before
it calls the stub handler.
The initramfs links sh to bash, so the cases now source the hook from
bash. Run on an Ubuntu host, both cases fail before this change and
pass after it.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
genesis-bootnic writes ipv6.method into [connection-*] sections of a
NetworkManager conf.d file. NetworkManager.conf(5) does not list
ipv6.method among the properties such a section can default, so
NetworkManager ignores it. On xcat88-cn all three nics still sent a
SOLICIT under the same DUID, and the boot nic held a pool address
while a secondary nic held the reservation.
The test asserts that the boot nic gets a connection profile bound to
its BOOTIF address with ipv6.method=auto, that the other nics get a
link-local profile, and that no conf.d file carries ipv6.method. It
fails on the current script.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
dracut SOURCES a hook: source_all runs `. "$f" "$@"`. An `exit` in the hook
therefore ends networkd-run.sh, which is the script bringing the network up, so
the early return path would stop network setup on the second interface. A compute
node with three nics on the provisioning network reaches that path.
The hook leaves with `return` now. A case sources it with the marker already
present and asserts the caller still runs; putting `exit` back fails only that
case. Two cases drove the hook with `sh hook.sh` and now source it, which is both
what dracut does and what `return` requires.
dracut's own 98syslog/rsyslogd-start.sh uses `exit` in an online hook, so the
convention is not uniform. `return` is correct for a sourced script and says what
is meant: end this hook, not its caller.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
dracut dispatches a netroot= handler from network-legacy's ifup. Ubuntu 25.10 and
later ship no network-legacy, so network resolves through systemd-networkd and
nothing calls /sbin/netroot. install.netboot already says so in a comment, and
treats the dispatcher as optional.
Measured on xcat32-cn with the 26.04 netboot image: the initramfs does no DHCP of
its own, the management node logs no request for rootimg.cpio.gz, and dracut
enters emergency mode 3.3 seconds in. Under quiet that surfaces as "Failed to
isolate default target". The initrd is complete: modules.txt lists network,
systemd-networkd, net-lib, nfs and xcat, and both /sbin/netroot and
/sbin/xcatroot are present. Nothing calls them.
The cases run install.netboot the way dracut does, with its helpers stubbed, and
assert what it registers. They also drive the new hook with a stub handler.
Deleting the registration fails only "the root handler is registered on an
interface coming online".
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
genesis_nic_has_address ends the wait for the boot nic on an address of either
family. xcatd is on one family, so on a dual stack provisioning network the node
can go on to getcert and getdestiny holding only the family xcatd is not on, with
no route to the management node.
The cases drive the three address helpers out of doxcat with a stub ip and assert
what ends the wait for an IPv4 xcatd and for an IPv6 one. Two of the six fail
before the change: "an IPv6 xcatd is not reached by an IPv4 address alone" and
"an IPv4 xcatd is not reached by an IPv6 address alone". The other four pass
before and after, so the file is not vacuous.
No cell is in this state today, because an IPv6 cell serves no IPv4 pool and an
IPv4 cell sends no router advertisement, so the boot nic gets one family. The
form was still wrong.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
A DHCPv6 reservation is keyed on the DUID, and a DUID names the machine, not the
nic. 10-xcat-genesis.conf puts the DHCPv6 settings in [connection], which
NetworkManager applies to every nic, so each nic of a node asks for the same
reserved address and Kea gives it to the first REQUEST.
Measured on xcat88-cn, which carries three nics on the provisioning bridge
virbr-p88. Kea logged four solicits under one DUID in one boot, and granted
2001:db8:188::20 to whichever IA asked first; the others took pool addresses.
The node then reported to xcatd from an address xcatd could not match to a node,
so el10-x86_64-genesis-oe-ipv6 passed or failed by chance.
genesis-bootnic reads BOOTIF and writes 16-xcat-genesis-bootnic.conf, which
leaves DHCPv6 on the boot nic and puts every other nic on link-local. It follows
genesis-duid, which already writes 15-xcat-genesis-duid.conf from the SMBIOS UUID
before NetworkManager starts.
The six cases pass with the file as committed, so the evidence is a mutation:
writing ipv6.method=auto for the secondary nics, which is the behaviour before
this change, reds only "the boot nic keeps DHCPv6 and every other nic does not
ask for an address".
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT runs Kea as kea-dhcp4 on EL and as kea-dhcp4-server on Debian and Ubuntu.
Ten cmd lines across five case files probed the EL name alone and fell back to
isc-dhcp-server on Ubuntu, which is absent where Kea is the backend.
reg_linux_diskless_installation_hierarchy failed on it in
xcat-test-ubuntu-24-x86_64 #85: rc 5, "Unit isc-dhcp-server.service not found".
Measured on xcat24-mn, Ubuntu 24.04.4: kea-dhcp4 inactive, kea-dhcp4-server
active, isc-dhcp-server absent.
restart_dhcp.sh restarts whichever DHCPv4 unit is active, and --print-unit names
it for a caller that asks which backend the node runs. The bats cases drive it
with a stub systemctl that reports one unit active and records what was
restarted.
The eight cases pass with the file as committed, so the discriminating evidence is
a mutation: dropping kea-dhcp4-server from the candidate list reds exactly "the
Ubuntu Kea unit is restarted" and the message assertion, and leaves the EL, ISC
and dhcpd cases green.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
allowcred.awk and updateflag.awk both had to choose the gawk network family from
the management address. udpcat.awk, which sends the discovery packet, still names
/inet/ and no test covers it.
The two cases send a packet to a loopback listener of each family and pass with
the file unchanged, because a /inet/ socket that connects resolves an IPv6
literal. A /inet/ listener does not, which is the difference that made the other
two helpers fail. The cases are a guard on the third helper, not a captured
defect.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The provisioning network of an IPv6 cell declares an IPv4 subnet with no pool, so
Kea answers every DHCPv4 request with ALLOC_ENGINE_V4_ALLOC_FAIL_NO_POOLS and the
node holds no IPv4 address. doxcat waits for one with no bound, and Genesis never
reaches xcatd.
The bats case gives the boot nic an IPv6 address and no IPv4 address, and expects
doxcat to finish. Before the change doxcat does not return and the sandbox timeout
reports 124. The sandbox stub for "ip -4" now reads a per-nic file when the test
writes one, and answers as before when it does not.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
A node with several nics on the provisioning network booted Genesis and reported
to xcatd from a pool address, so the management node never saw it reach the
shell. The el10 x86_64 IPv6 cell passed or failed by chance: one run in three
served the reserved address to the boot nic.
doxcat started DHCPv4 and DHCPv6 on the boot nic and on every eligible secondary
nic at the same time. A DHCPv6 reservation is keyed on the DUID, which names the
machine and not the nic, so each nic asked for the same reserved address and Kea
gave it to the first REQUEST. DHCPv4 is unaffected: a DHCPv4 reservation is keyed
on the hardware address.
A secondary nic now waits for the boot nic to hold a routable IPv6 address before
it asks for one, in genesis_wait_nic_v6. On an IPv4-only network the wait ends
after the last try and the secondary nic asks for no IPv6 address, which it could
not have obtained there anyway. DHCPv4 on a secondary nic still does not wait.
genesis_secondary_dhcp.bats measures which nics are selected, so its boot nic now
starts with an address and its cases read as before.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
A DHCPv6 reservation is keyed on the DUID, and a DUID names the machine, not the
nic. Every nic of a node asks for the same reserved address, and Kea gives it to
the first REQUEST. The node then holds its own address on whichever nic won, and
xcatd cannot match a report that arrives from a pool address.
The bats case boots doxcat in the sandbox with a boot nic and one eligible
secondary nic, and reads the order the nics were served from the recorded
dhclient command lines. The sandbox gains an "ip -6 -o addr show dev" stub, which
reads the per-nic file the test writes.
Two of the three assertions hold before the change. Only "a secondary nic is not
served DHCPv6 while the boot nic has no address" fails, because doxcat starts
both families on every selected nic at once.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xcat2/xcat-core#7998. Three files carry a semantic conflict, and all three take
the master side.
perl-xCAT/xCAT/KVMUtils.pm and xCAT-server/lib/xcat/plugins/kvm.pm keep master's
firmware_features and add_firmware_features. The two firmware APIs are mutually
exclusive, and the branch's with_firmware_features and secure_boot_request were a
second solution to one defect: a node that asks for firmware:efi states nothing,
so libvirt selects a firmware in its own order, and that order puts a Secure Boot
descriptor with enrolled keys first. xcat2/xcat-core#7973 fixes the same defect on
master's API, is approved, and is in this candidate, so the branch side is dropped
rather than carried beside it.
xCAT-test/unit/kvm_firmware_secureboot.t is removed with them. It calls
with_firmware_features and secure_boot_request, which no longer exist.
xCAT-test/unit/kvm_secureboot_firmware.t covers the surviving API.
xCAT-test/xcattest keeps master's xCAT::Test::Conf path. The branch routed conf
parsing through xCAT::Test::OS to quote a value carrying shell syntax, which the
IPv6 cells need for vmothersetting, and master already does this:
chdef_command quotes what the parser returns. xCAT::Test::OS stays in the tree and
xCAT-test/unit/xcattest_object_quoting.t still exercises it directly.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
mypostscript assigned DHCP6DUID and did not export it, so configdhcpv6duid, which runs as a
child process, never saw mac.duid and wrote the firmware DUID-UUID. The script also rejected
ll, which makedhcp accepts and selects by default on ppc64le. It read the SMBIOS UUID before
the attribute, so a missing or nil UUID ended the script although a literal DUID needs none.
And it wrote no systemd-networkd configuration for a DUID that is not a DUID-UUID.
mypostscript now exports DHCP6DUID. The script reads the attribute first, builds the DUID-LL
from the first mac.mac address for ll and for an unset value on ppc64le, reads the UUID only
for firmware and canonical, and gives systemd-networkd the type of every DUID through
DUIDType and the rest through DUIDRawData.
postscript_dhcpv6_duid.bats fails without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
configdhcpv6duid writes a DHCPv6 client identifier that does not match the reservation in
four cases. mypostscript does not export DHCP6DUID, so the postscript, a child process,
never sees mac.duid and writes the firmware UUID. The postscript rejects ll, which makedhcp
accepts and which is the default on ppc64le. It exits on a missing or nil SMBIOS UUID before
it reads a literal DUID that needs none. And it writes no systemd-networkd configuration
for a DUID that is not a DUID-UUID, although DUIDType and DUIDRawData express every type.
These tests fail on the current tree for those four reasons. The test that held the old
NetworkManager-only behaviour for a DUID-LLT now expects the networkd file.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
An IPv6-only diskless node needs its address in a NetworkManager keyfile, because the
booted system does not repeat the DHCPv6 exchange of the initial ramdisk. This branch
writes that keyfile inside the dhclient and ifcfg handoff of
xCAT-server/share/xcat/netboot/rh/dracut_105/stateless/xcatroot, and upstream commit
1c42a2c72 deletes the whole handoff. So the branch does not merge, and the keyfile
depends on ETHX and MACX, which getdevfrommac() and the deleted derivation supplied.
The deletion is the base now. xcat_boot_netif() names the provisioning NIC from ifname=,
from netdev=, or by matching the BOOTIF MAC against /sys/class/net/<dev>/address.
xcat_persist_ipv6_boot() reads the MAC of that interface from sysfs and calls
persist_ipv6_nm_connection(). The removal of ifcfg-$ETHX is dropped: the script writes no
ifcfg file any more, so there is no competing profile to remove.
Eight checks in xCAT-test/bats/ipv6_xcatroot_el_stateless.bats run the two functions
against a scratch sysfs tree. Three mutations of the rework each turn one check red. The
checks cannot run against the unreworked file, which holds neither function, so the test
and the change are one commit.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
run_genesis in xCAT-test/bats/helpers/genesis_sandbox.bash compared the status of
"timeout 20 /bin/bash /run/script" with one exact number. GNU coreutils timeout reports
a child that a signal killed as 128+signal, so genesis_discovery_uuid.bats expects 143
for SIGTERM. The uutils coreutils of Ubuntu 26.04 reports the signal number alone, 15,
so the same outcome fails the assertion there.
run_genesis now accepts the expected status or, when that status is above 128, the
signal number alone. A caller that expects 0 keeps one accepted value, and an unrelated
failure is still a failure. The comment names the two conventions.
Evidence: a four-case bats file drives run_genesis with a controlled status. With the
change, 143 and 15 both pass against an expected 143, while status 1 against 143 and
status 15 against 0 still fail. Without the change only the 15 case flips to "Expected
exit 143, got 15"; the control and both discriminators are unchanged.
The five "= 143" comparisons in genesis_openembedded_runtime.bats stay as they are:
terminate_after reads its status from the bash wait builtin, which computes 128+signal
itself and does not call timeout.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The Subiquity autoinstall of an IPv6-only node asks netplan for DHCPv6, and
the installed system does too. A DHCPv6 client is identified by its DUID, so
the installer and systemd-networkd each send one that matches no Kea
reservation. Both take an address out of the dynamic range, which carries no
PTR record, and xcatd identifies a client over IPv6 only by the name its
address resolves to. The install reaches post.xcat, getpostscript cannot say
which node asked, and the node stops.
The autoinstall also matches the provisioning NIC by the glob name: "e*".
Three interfaces of one bridge match it.
The tests assert the rendered netplan of both stages, the match key, and the
file the late-command writes: one static address, from the node's own network
configuration, on the interface that carries the node's MAC.
xCAT-test/bats holds the late-command, because the template renders the keys
into a printf argument list and the shell decides which lines reach the file.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
An IPv6-only EL 8 or EL 9 node presents a different DHCPv6 DUID at each boot
stage: the UEFI firmware, then iPXE, then anaconda. makedhcp reserves the
first two, so the installer takes an address from the dynamic range and every
step that reads the reserved address or its PTR record fails.
xCAT::SvrUtils::uses_static_ipv6_boot accepted the rh family only at major 10,
so Template.pm rendered "dhcp --noipv4 --ipv6=dhcp" for EL 8 and EL 9. The
floor is now 8, by operator decision of 2026-11-05.
pre.rhels8 was IPv4 only in two places. The install monitor opened an AF_INET
socket, so the node reported no status. The install server was cut out of its
URL at the first colon, which splits an IPv6 literal. Both forms come from
pre.rhels10. pre.openeuler includes pre.rhels8 whole, so this also fixes the
reported openEuler defect.
ipv6_pre_rhels8.bats and the EL 8 and EL 9 cases of template_ipv6_rendering.t
capture it. With AF_UNSPEC back to AF_INET the three IPv6 monitor cases fail
and the IPv4 one passes. Without the bracket branch the three IPv6 URL cases
fail and the four IPv4 ones pass. With the floor back at 10 the EL 8 and EL 9
rendering cases fail and the EL 10 ones pass.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
An unknown client on an IPv6 provisioning network gets no network boot
script. mknb builds its list of networks from my_nets and my_hexnets, and
both skip inet6 on Linux, so nothing is written under xcat/ipxe/nets and
the client has nothing to fetch.
Where an address does reach a script it is written as
"xcatd=" . $address . ":$port". For 2001:db8:177::1 that is
xcatd=2001:db8:177::1:3001, which parses as an IPv6 literal with no port,
so Genesis contacts a different address and reports nothing. The same
concatenation builds the POWER HTTP URLs and the grub2 roots. xnba.pm and
destiny.pm already bracket an IPv6 address through
NetworkUtils::xcatd_cmdline_address and format_uri_host, so the node
files were correct and the net files were not.
NetworkUtils gains my_nets6, which returns the host's global IPv6
networks keyed the way my_nets keys its IPv4 ones, and
ipv6_network_address, which masks an address to its prefix. my_nets keeps
its IPv4-only behaviour: lsslp.pm and PPCdb.pm read its keys with
dotted-quad arithmetic, so an IPv6 key there would be a wrong answer
rather than a new one. my_hexnets keeps its own, because a hexnet is a
PXELINUX file name built from a hexadecimal IPv4 prefix and DHCPv6 has no
equivalent. mknb merges my_nets6 into the networks it writes nets/
scripts for, asks getipaddr for the IPv6 addresses of site.master as well,
and takes every xcatd= value and every HTTP authority from the two
formatting helpers.
mknb_xcatd_address.t and networkutils_my_nets6.t fail without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Two shell routines decide whether an installed or booted node keeps its IPv6
address, and neither was driven by a test.
xcat_is_ipv6_boot in the EL stateless xcatroot answers for ip=dhcp6 and, for
a node given a static address, from the live interface. A dual-stack
interface must answer no, or an IPv4 node is given an IPv6 profile.
persist_ipv6_nm_connection copies the profile the initrd holds, or writes one
from the live address, and must refuse to write a profile with no address:
NetworkManager rejects such a file and leaves the interface unmanaged.
configure_install_nic_ipv6_keyfile renders the install NIC profile with
"nmcli --offline" during Anaconda's chrooted %post. A profile that leaves
IPv4 enabled makes the node wait for a DHCPv4 lease that never arrives, and a
temporary file left in system-connections is read as a second profile for the
same interface.
Both files drive the real routines with ip and nmcli stubbed, inside the
test's own scratch tree.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The Genesis ramdisk carries its own copies of allowcred.awk and
updateflag.awk, because nothing of xCAT is installed in it. No test drove
those copies, and they had drifted from the copies under xCAT/postscripts
that the IPv6 work changed.
The new bats file runs both Genesis copies against a listener on the
loopback address of the family under test. Against the current copies four
of its six cases fail: the credential listener accepts no connection on the
port it was given, and the state report cannot resolve a bracketed IPv6
literal. The two that pass are the IPv4 and plain-IPv6 state reports, which
show the method reaches a working listener.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
A diskful Ubuntu 24.04 install reaches Subiquity, runs curtin, and dies in
exclusive_open on the root partition with curtin.util.NotExclusiveError. The
console names apt-get as a user of the partition.
pre.ubuntu.subiquity starts rsyslogd inside the live installer to forward the
install log to the management node. In the 24.04 installer that process holds
11.9G of a 16G node while its message queue is empty: impstats reports
"main Q: size=0 enqueued=7 maxqsize=6" beside "maxrss=11951868", so no rsyslog
setting bounds it. rsyslogd runs in the cgroup of
snap.subiquity.subiquity-server.service, so the kernel OOM killer stops the
installer. systemd starts a second subiquity-server, and that server runs
curtin partitioning while the first server's curtin is still installing the
kernel into the target, so clear_holders cannot open the root partition.
xcat_start_installer_rsyslog starts the forwarder with systemd-run, in a
transient unit with MemoryMax=128M and MemorySwapMax=0. The kernel then kills
the forwarder alone. Where systemd-run is absent the install forwards no
syslog, because the install is worth more than its remote log.
ubuntu_subiquity_installer_syslog.bats reads the command line the routine asks
for. Dropping the two memory properties fails the limit assertions and leaves
the launcher and the no-fallback assertions green.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 2db399cd6c07e98494353c292990c150a9adce15)
Integration test of the 51 commits that landed on upstream master after this
branch was built. Four conflicts, all from edits to the same lines:
perl-XCAT/xCAT/BootUtils.pm: both sides add a new sub at the end of the file.
Master adds expand_node_template, this branch adds grub2_kernel_commands and
grub2_image_provides. All three are kept.
xCAT/xCAT.spec and xCATsn/xCATsn.spec: master wraps the chrony and dhcpd
requirements in a suse_version test, and its %endif lands on the line this
branch uses for radvd. The requirement stays outside the test, because an
openSUSE management node writes radvd.conf too.
xCAT-server/xCAT-server.spec: master's openSUSE requirement list is a superset
of this branch's, so master's is taken whole.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Share the apt-cache double of the apt install tests. Check that
list_xcat_packages shows the apt candidates in the C locale and under a
translated apt.
The dracut_105 xcatroot must not copy dhclient leases or write an ifcfg
file. With the earlier script the case fails on the "cannot stat" and
ifcfg errors that an EL10 boot printed.
configdhcpv6duid always derived the DHCPv6 client identifier from the SMBIOS
UUID in firmware byte order. makedhcp does that only when mac.duid is unset or
holds 'firmware': 'canonical' reserves the order product_uuid prints, and a
literal DUID is reserved as it stands. A node with either setting wrote an
identifier that matched no reservation, so it took a pool address and had no
boot file URL.
mypostscript.tmpl now exports the attribute as DHCP6DUID, and the postscript
reads it. 'canonical' keeps the order product_uuid printed. A literal is
written as it stands for NetworkManager, which takes a whole DUID.
systemd-networkd composes one from a named type, and only the UUID type can be
expressed that way, so a literal of another type is written for
NetworkManager alone and the reason is logged. A value that is neither keyword
nor DUID writes nothing, which is what makedhcp refuses as well.
The derived values are byte-identical to kea_duid_from_uuid for both orders.
postscript_dhcpv6_duid.bats goes from 9 checks to 16; ignoring the attribute
fails the five that name a setting and leaves the firmware default passing.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
An unknown package and a package with no candidate are skipped with a warning
while the others install, and a translated apt still installs the packages
that have a candidate. A missing xcat metapackage or a failed apt-cache
policy query stops the install before apt-get runs.
The apt-cache double printed nothing, so a go-xcat that asks apt which
packages have a candidate would find none. Report a candidate for every
package. go-xcat today reads that answer only for its package listing.
The default xcat-core repository installs the decoded key blocks as one
binary keyring in trusted.gpg.d while apt-key fails as it does on apt 3.
An empty or HTML download, a block truncated after a valid base64 prefix,
a body that is not base64 and a block without a public key stop go-xcat
and keep the installed key. A complete uninstall removes that key and
keeps the other keys.
xcatroot writes the netplan of the booted system from the interface it found,
and it always wrote "dhcp4: true". An IPv6-only node has no DHCPv4 server, so it
reached its login prompt with no address: Ubuntu 24.04.5 reported
"[FAILED] Failed to start systemd-networkd-w... Wait for Network to be
Configured." and "[FAILED] Failed to start xcatpostinit.service", and the node
answered no ssh.
The address is already on the kernel command line, in the static form dracut
takes. xcat_static_ip6_fields reads it and the netplan carries the address, the
prefix and a default route through the gateway. A node whose command line holds
an IPv4 form keeps dhcp4, because the fields are read only from a bracketed
literal.
Captured by xCAT-test/bats/ipv6_xcatroot_netplan.bats. Reading the fields by
cutting on the first colon, which is what an IPv6 literal breaks, fails the
three parsing assertions and leaves the four refusals passing.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT-test/autotest/testcase/commoncmd/vm_machine_type.sh conflicted:
this branch picks q35 for an x86_64 node with firmware:efi, and master
asks the vmhost libvirt for the machine type. The vmhost probe from
master is kept. vm_machine_type_alias now takes the vmothersetting and
returns q35 for firmware:efi, and q35 does not fall back to the libvirt
default, because the x86_64 default is i440fx.
xCAT-test/bats/vm_machine_type.bats conflicted where both sides added
tests before assert_round_trip. Both sets are kept, with the
assert_round_trip of this branch, plus one test for the q35 rule.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>