The assertions added with this test required Socket6 and IO::Socket::INET6 on every
RPM family, which contradicts xcat_server_inet6_optional_dependency.t and the reason
it records: every call site loads the modules with an eval and keeps working on IPv4,
so a hard dependency states a dependency the code does not have.
The measurement that prompted the test still holds, and it is narrower than it looked.
Both modules are absent on a Leap 15.6 management node because the openSUSE Minimal-VM
image sets solver.onlyRequires = true in /etc/zypp/zypp.conf, so zypper installs no
recommended package. dnf installs one, so EL and openEuler need no hard dependency.
The test now reads requires and recommends separately per family: openSUSE requires
both and recommends neither, EL and openEuler recommend both and require neither. The
deb control files are read per package, since perl-xCAT has carried a hard dependency
since before this rule. xcat_server_inet6_optional_dependency.t gains a pointer to the
openSUSE exception so the two files do not disagree in prose.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The nextserver derivation in pre.sle and pre.sles split the URL authority at the
first colon, which splits an IPv6 literal. YaST then had no usable install source
on a SLE15 or SLES12 node installed over IPv6.
Both scripts now read the authority with the bracket-aware form pre.rhels10 already
uses, and put the brackets back when the host is an IPv6 address, because the value
goes into a media_url. A portless IPv4 URL no longer keeps its path.
Captured by xCAT-test/bats/ipv6_pre_sle_nextserver.bats, which fails 5 of its 8
assertions without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
pre.sle and pre.sles read the install server out of the kernel command line and put
it back into a URL. pre.sle substitutes it for XCATNEXTSERVERHOOK in the media_url of
every install source, and pre.sles substitutes it into #INSTALL_SOURCES_IN_PRE#.
The derivation cut the authority at the first colon. An IPv6 install server written
"autoyast=http://[2001:db8::1]:80/install/autoinst/node01" yielded "[2001", so the
media_url read "http://[2001:80/install/..." and YaST had no install source. A
portless IPv4 URL kept its path as well, and worked only because xCAT always writes
a port.
The test runs the derivation taken from each script against a command line of its
own, so a change to the derivation is measured here.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Socket6 and IO::Socket::INET6 are absent on a Leap 15.6 management node that carries
every other xCAT dependency, so $ip6support in xCAT::SLP and $doipv6 in xCAT::IPMI
evaluate to 0. SLP discovery and IPMI over IPv6 then do nothing and report no error.
Both packages exist: perl-Socket6 and perl-IO-Socket-INET6 are in the openSUSE main
repository and in the EL appstream repository. Nothing asked for them. perl-generators
reads a use statement, and every caller uses eval { require ... }, so the EL build
derives no perl(Socket6) either. xCAT-server named the deb packages as Recommends,
which apt 3.0 solver3 drops when it cannot place them.
perl-xCAT and xCAT-server now require both modules on every RPM family, and the
xCAT-server deb moves them from Recommends to Depends.
Captured by xCAT-test/unit/ipv6_socket_modules_declared.t, which fails 16 of its 20
assertions without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT::SLP, xCAT::IPMI, xCAT::Client, xCAT::NetworkUtils and the dhcp, nodestat and
credentials plugins reach IPv6 only through Socket6 and IO::Socket::INET6. Each one
loads them with eval { require ... }, so a missing module is not an error. The guard
variable stays false and the IPv6 branch is never taken.
No family declares the dependency. perl-generators reads a use statement, not a
require inside an eval, so the EL build derives no perl(Socket6) either, and
xCAT-server lists the two deb packages as Recommends, which apt 3.0 solver3 can drop.
The test asserts both specs require both modules on openSUSE, EL and openEuler, and
that both deb control files name them in Depends.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
_autoyast_network6 builds a networking section with a static interface, but did
not set keep_install_network. AutoYaST then keeps the network the installer
used and ignores the interface in the profile.
The node installed over IPv6 and booted with ifcfg-eth0 BOOTPROTO=dhcp and no
address but a link-local one. xcat.sh could not reach the management node:
"logger: failed to connect to 2001:db8:156::1 port syslog-conn" and
"connect: Network is unreachable", so no postscript ran and the node never
registered.
The section now sets keep_install_network to false, which is what makes AutoYaST
write the static interface.
Measured on the installed node: /etc/sysconfig/network/ifcfg-eth0 carried
BOOTPROTO=dhcp and the only address was fe80::4078:c0ff:fea8:9c0a.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
AutoYaST keeps the network the installer used unless keep_install_network says
otherwise, and the sections _autoyast_network6 replaces set it true. The static
interface in the generated section was therefore ignored.
The test asserts the section sets keep_install_network to false.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
_autoyast_network6 emitted dhcp_resolv in the dns block of the networking
section. The AutoYaST schema of Leap 15.6 does not accept that element, and one
element it refuses invalidates the whole profile: YaST reported "Extra element
networking in interleave", then "A profile for this machine could not be found
or retrieved", and the installation stopped.
dhcp_resolv says whether DHCP may overwrite resolv.conf. The section configures
the node statically, so there is no DHCP to keep away from resolv.conf.
Measured with the schema the installer ships, /usr/share/YaST2/schema/autoyast/
rng/profile.rng: the profile failed to validate at the networking element, and
removing dhcp_resolv alone made it validate.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
AutoYaST validated the generated profile and reported "Extra element networking
in interleave", then told the operator no profile could be retrieved. The
element is dhcp_resolv, which the schema of Leap 15.6 does not accept.
The test asserts the section has no dhcp_resolv and keeps dhcp_hostname, which
the schema does accept.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
sles.pm gave linuxrc no network arguments beyond the net device. linuxrc
configures IPv4 by default, so an IPv6-only node sent an IPv4 DHCPDISCOVER,
received "no/incomplete answer", and reported "Failed to download AutoYaST
file" without ever contacting the install source.
static_ipv6_boot_args() adds ipv6only=1 with the address, prefix, gateway and
IPv6 nameserver of the node. The node is configured statically for the reason
anaconda.pm configures EL statically: the firmware answers DHCPv6 with the
RFC 6355 DUID-UUID that the reservation is keyed on, while the installer builds
a DUID of its own that matches no reservation.
Measured on a Leap 15.6 node: with these arguments the installer fetched
control.xml from http://[2001:db8:156::1]:80/install/leap15.6/x86_64/1 from its
own address 2001:db8:156::10. Without ipv6only=1 linuxrc ignores the rest and
stays on IPv4.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
sles.pm put only the net device on the command line, so linuxrc configured IPv4
by default. An IPv6-only node sent an IPv4 DHCPDISCOVER, which the management
node answered "no free leases".
The test covers the arguments for a node with a gateway and an IPv6 nameserver,
for one with neither, that an IPv4 nameserver is left out, and that a node with
no IPv6 configuration gets no arguments.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
addnet6 read the dynamic range from $netcfgs{$net}, where $net is the subnet it
writes, "2001:db8:156::/64". addrangedetection stores the range under
networks.net, "2001:db8:156::", so the lookup always missed and makedhcp warned
"No dynamic range specified" for a network whose row declares one.
The subnet then carried no range6, and a DHCPv6 client whose DUID matches no
reservation received no address. The SUSE installer is such a client: linuxrc
builds its own DUID rather than the DUID-UUID the firmware sends, so it could
not get an address even though the node has a reservation for the same MAC.
dynamic_range_for() looks the range up under the subnet as written and then
under the network address alone.
xCAT-test/unit/dhcp_dhcpv6_conf_file.t fails its prefix-form assertion when the
second lookup is removed.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
addrangedetection keys the dynamic ranges on networks.net, which carries no
prefix length. addnet6 names a subnet "<net>/<prefix>" and looked the range up
under that, so the lookup missed every IPv6 subnet.
The test drives the lookup with both forms of the subnet and holds down that an
IPv4 subnet is unchanged.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
setup_env_by_configure_file built "chdef -t $type -o $name $attr=$value" and
runcmd passes that to bash. A value containing shell syntax was read as syntax.
vmothersetting separates its settings with a semicolon, so
"vmothersetting=cpumode:host-passthrough;firmware:efi-insecure" ended the chdef
at the semicolon. The node kept cpumode alone, mkvm defined the compute node
with no firmware, and it came up as a BIOS guest. A BIOS guest cannot network
boot over IPv6 and cannot load an EFI grub2, so the node took its DHCPv6 address
and never fetched a loader.
object_definition_command() and shell_quote() build the command with every value
quoted, and the chtab path for [Table_*] quotes its values the same way.
xCAT-test/unit/xcattest_object_quoting.t fails when the quoting is removed.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xcattest applies the [Object_*] sections of a conf by joining each attribute to
a chdef command and running it through bash. Nothing quoted the values, and a
conf carries values a shell reads as syntax.
The test builds the command for a vmothersetting that holds two settings and
asserts the semicolon stays inside one command, that every value is quoted, and
that bash passes the whole value through as one argument.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
dhcp6_bootfile_url_for_node builds the RFC 5970 option 59 URL for both DHCP
backends, and each backend already had its own assertions on it. Neither
compared them, so the two could drift apart and both files would stay green.
The new block renders the same node through kea_build_node_reservations6 and
through the ISC omshell session and asserts the URL is the same string, that Kea
marks it always-send, and that a node asking for xnba gets none from either
backend.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT.spec asked for the file /usr/sbin/in.tftpd. openSUSE has two providers and
the solver installed atftp, whose server has no IPv6 option: it binds
0.0.0.0:69 only, and --bind-address :: does not change that. A node that boots
over DHCPv6 therefore received its address and its RFC 5970 bootfile-url, asked
the server for the loader, timed out, released the address and started again.
xCAT.spec now requires the tftp package where suse_version is set. That is the
hpa server, and it listens on 0.0.0.0:69 and [::]:69 at once. EL keeps the file
dependency, which has one provider there, tftp-server.
Measured on a Leap 15.6 management node: with atftp the loader could not be
fetched over IPv6 and could over IPv4; after the swap both families served the
same 1372160 byte loader, and a missing file still answered File Not Found.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT.spec requires the file /usr/sbin/in.tftpd. Two openSUSE packages provide
it, and atftp has no IPv6 option at all.
The test asserts openSUSE asks for the tftp package by name and no longer leaves
a file dependency atftp can satisfy, and that EL keeps the file dependency it
resolves to tftp-server.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The media_url of an autoyast add-on product came from
"#TABLE:noderes:$NODE:nfsserver#", which substitutes the address of the
management node without brackets. An IPv6-only node therefore received
<media_url>http://2001:db8::1//install/leap15.6/x86_64</media_url>, and YaST
cannot read that as a URL, so the installer reached no repository.
_sles_media_url() uses the bracketed master host for a node with no IPv4 address
and keeps the substitution for every other node, which service nodes rely on.
xCAT-test/unit/template_ipv6_rendering.t fails its two IPv6 assertions when the
bracketed host is dropped.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Template.pm built the media_url of each add-on product from the noderes
substitution, which writes the address of the management node as it stands. An
IPv6-only node was told to install from "http://2001:db8::1//install/...".
The test covers the IPv6-only URL on the default port and on a custom port, and
holds down that a node with IPv4 keeps the substitution.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
grub2.pm replaced !myipfn! with the facing address as it stands. sles.pm and
anaconda.pm put that placeholder where a URI authority expects a host, with the
port already appended, so an IPv6-only node was told to install from
"http://2001:db8:156::1:80/install/...". Nothing can split that into an address
and a port, so the installer could not reach the repository.
substitute_facing_address() brackets a placeholder that a port follows and
leaves every other one bare, because xcatd=!myipfn! names a host with no port
and the postscripts read that value as it stands.
The other five plugins that substitute the placeholder serve BIOS PXE, ppc64le
and yaboot, none of which network boots over IPv6, so they keep the bare
replacement.
grub2_ipv6.t and sles_install_url_ipv6.t fail their bracketing assertions when
the port-aware branch is removed, and their bare-address assertions still pass.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
grub2.pm replaces !myipfn! with the facing address of the management node. The
placeholder stands in front of ":$httpport" in the install URLs, so an IPv6
address was substituted bare and the authority could not be read.
grub2_ipv6.t now exercises setstate with a kcmdline that carries the placeholder
inside an install URL. sles_install_url_ipv6.t asserts the substitution itself
against the real module, in both contexts: bracketed where a port follows, bare
where none does.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
sles.pm built its install URLs as "$server:$port". An IPv6 address contains
colons, so a node was told to install from
"http://2001:db8:156::1:80/install/leap15.6/x86_64/1" and could not reach the
repository. The same join was in the statelite and stateless imgurl=. The XCAT=
argument beside them was already bracketed.
rootimg_url() and autoyast_boot_args() now build those URLs through
xCAT::NetworkUtils::uri_authority(), which brackets an IPv6 address and passes a
name or a !myipfn! placeholder through unchanged. uri_authority is the former
xcatd_cmdline_address, renamed because three URL sites now share it;
xcatd_cmdline_address stays as a wrapper for its own callers.
xCAT-test/unit/sles_install_url_ipv6.t fails its four IPv6 assertions when the
colon join is restored.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
sles.pm joined the install server and the port with a colon, so an IPv6
management node produced "install=http://2001:db8:156::1:80/install/...". That
authority cannot be split into an address and a port.
The test covers the diskful autoyast= and install= arguments, the statelite and
stateless imgurl=, and the authority helper the three share.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
ISC serves DHCPv4 and DHCPv6 from two files in the same directory. dhcp.pm set
the v6 file inside the branch that switches the v4 file to /etc/dhcp/dhcpd.conf.
openSUSE already has /etc/dhcpd.conf, so the branch never ran, $dhcp6conffile
stayed undef, and makedhcp wrote no IPv6 configuration. dhcpd6 then exited with
"No subnet6 declaration for eth1" and no node could get an IPv6 lease.
dhcp6_conf_file_for() now returns the v6 file that belongs beside a given v4
file, and the module derives it after every branch that chooses the v4 file.
xCAT-test/unit/dhcp_dhcpv6_conf_file.t fails on the openSUSE and /etc/dhcp3
layouts when the derivation is restricted to /etc/dhcp again.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
dhcp.pm derived the DHCPv6 configuration file only inside the branch that
switches the DHCPv4 file to /etc/dhcp/dhcpd.conf. openSUSE ships /etc/dhcpd.conf,
so that branch never ran and the v6 file stayed undef.
The test asserts the v6 file for each layout ISC uses, that an AIX file yields
none, and that the module derives the v6 file from the v4 file it chose.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xcatd.pm uses Date::Parse. xCAT-server relies on the automatic dependency
generator for it, and EL does emit perl(Date::Parse). openSUSE has no
perl-generators, so nothing installs perl-TimeDate and every start of xcatd ends
with "Can't locate Date/Parse.pm in @INC at xCAT/xcatd.pm line 10". systemd
retries and the service never comes up.
xCAT-server.spec now requires the perl(Date::Parse) capability where
suse_version is set.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xcatd also fails to start on openSUSE, on Date::Parse, which xCAT-server ships in
xcatd.pm. The test named perl-xCAT alone, so that gap was not captured.
The expected capabilities are now a table keyed by spec, and xCAT-server is in
it. The set comes from comparing every perl() capability the EL build generates
against what a Leap 15.6 management node can resolve: of 88, only these five are
required and absent.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
perl-xCAT relies on the automatic Perl dependency generator for its module
requirements. openSUSE has no perl-generators, so the built rpm requires nothing
but /bin/sh and four modules xCAT loads are never installed: JSON, Expect, SNMP
and HTML::Form. Installing xCAT on an openSUSE management node then ends with
"Can't locate JSON.pm in @INC" from xCAT::Table, xcatconfig aborts, and xcatd
never starts.
perl-xCAT.spec now requires those four capabilities where suse_version is set.
EL is unchanged and keeps deriving them from the sources.
The four modules are the ones measured absent on a Leap 15.6 management node
that has every other xCAT dependency installed.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
perl-xCAT.spec carries no Requires and relies on the automatic Perl dependency
generator. EL has perl-generators and derives 99 perl() requires from the module
sources. openSUSE has none, so the built rpm requires only /bin/sh.
The test reads the Requires of perl-xCAT with rpmspec for openSUSE and for EL10.
On openSUSE it expects the four modules a Leap node does not otherwise carry. On
EL it expects none of them, because perl-generators derives them there.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
opensuse_pod2man_buildrequires.t called BAIL_OUT when rpmspec exited non-zero.
prove stops every remaining file on a bail-out, not only the one that called it,
so one unreadable spec would hide the result of the rest of the suite.
The close failure now dies, which fails that file alone.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT-server requires perl-DB_File on every platform below EL10. openSUSE has no
package of that name -- it ships the module in perl-core-DB_File -- so zypper
answers "nothing provides 'perl-DB_File' needed by the to be installed
xCAT-server" and refuses to install xCAT on an openSUSE management node.
xCAT-server.spec now requires the perl(DB_File) capability where suse_version is
set, which perl-core-DB_File provides. EL9 keeps the package name EPEL
publishes, and EL10 keeps the weak requirement it has for riscv64.
xCAT-test/unit/opensuse_db_file_requires.t fails on the openSUSE assertions
without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
openSUSE ships DB_File in perl-core-DB_File. The spec asks for perl-DB_File on
every platform below EL10, so zypper refuses the transaction with "nothing
provides 'perl-DB_File' needed by the to be installed xCAT-server" and the
management node cannot install xCAT.
The test reads the Requires of xCAT-server with rpmspec for openSUSE, EL9 and
EL10. On openSUSE it expects the perl(DB_File) capability and no perl-DB_File
package name. The EL assertions hold the existing behaviour down: EL9 keeps the
hard package requirement, EL10 keeps none.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT-buildkit, xCAT-client, xCAT-test and xCAT-vlan failed in %build with
"pod2man: command not found", and buildrpms.pl then refused to index a partial
repository, so there is no openSUSE core repo to install from at all.
An openSUSE build root installs only perl-base, which does not ship pod2man, and
xpod2man runs it. The four specs guarded "BuildRequires: perl-Pod-Html" with
"%if !0%{?suse_version}" and declared nothing in its place, so openSUSE had no
requirement that brings the tool in. They now require the full perl package there.
This is not an IPv6 defect. xCAT-vlan and xCAT-buildkit carry no change on this
branch and fail the same way, so the gap predates it; it is fixed here because it
stands between the branch and any openSUSE test.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Nothing asserted that the specs whose %build runs xpod2man declare something that
ships pod2man on openSUSE. The test reads the BuildRequires of each one for
openSUSE and for EL, so the EL side is held unchanged beside it.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
subiquity_boot_params now asks whether the node has an IPv4 address, and this
test's xCAT::NetworkUtils stub had no node_is_ipv6_only, so the extracted routine
died at the call and the file reported no plan rather than a failed assertion.
The stub answers that the node has an IPv4 address, which is what every case here
describes. The refusal itself is covered in debian_subiquity_boot_params.t.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
With a boot configuration written, an IPv6-only node reached the live installer and
could only PXE-loop. casper configures the interface with klibc ipconfig and mounts
the root with klibc nfsmount, and neither knows IPv6: measured on noble, the
ipconfig in the casper initrd carries no IPv6 string at all, and nfsmount answers
"need a path" for both "[2001:db8::1]:/export" and "2001:db8::1:/export".
subiquity_boot_params now refuses a node with no IPv4 address and says why. The
caller already reports the message and skips the node. A node with an IPv4 address
is unaffected.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The test never asked what subiquity_boot_params does for a node with no IPv4
address. The new cases assert that such a node is refused, that the message names
the node and the component without IPv6 support, and that a node which has an IPv4
address is unaffected.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
nodeset refused the node and named the wrong reason:
Error: The <node> can not be resolved
Error: Failed to generate grub2 configurations for some node(s)
The node resolves: it has an IPv6 address and no IPv4 one. setstate resolved the
!myipfn! placeholder with my_ip_facing, which resolves its argument with inet_aton
and so reports any IPv6-only node unresolvable.
The lookup now follows the address family of the node, as the tftpserver lookup in
the same file already does. A node with an IPv4 address keeps the lookup it had.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
grub2_ipv6.t drove setstate with a command line that has no placeholder, so the
lookup that resolves it was never exercised. The new cases assert the placeholder
becomes the IPv6 facing address and that the IPv4-only lookup, which reports the
node unresolvable, is not used. The IPv4 case beside it holds that path unchanged.
An earlier version of the assertion counted IPv6 facing calls, which the tftpserver
lookup in the same run already makes, so it passed with the defect in place.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
vm.othersettings firmware: accepted only efi, which leaves Secure Boot to libvirt
firmware autoselection. Autoselection picks a descriptor by host policy, so on a
host whose best match enrolls keys the guest refuses an unsigned boot loader:
NBP file downloaded successfully.
BdsDxe: failed to load Boot0004 "UEFI PXEv6" : Access Denied
That decides whether a node can network boot over IPv6. A DHCPv6 bootfile-url is
written for a grub2 node alone, and the grub2 image under /tftpboot/boot/grub2 is
built with grub2-mkimage and is not signed, so a node with Secure Boot enforced
cannot start it and falls through to the next boot entry.
firmware: now also takes efi-secureboot and efi-insecure, and build_xmldesc adds
the <firmware> element that states the request. enrolled-keys follows secure-boot
because libvirt refuses a guest whose keys are enrolled while Secure Boot is off.
XML::Simple writes the firmware attribute of <os> and the element has the same
name, so the element is added to the rendered XML rather than to the hash.
firmware:efi keeps its behaviour and adds no element.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The setting accepted one value, efi, and nothing covered what a guest then asks of
Secure Boot. The test holds down which values the setting accepts, what each one
asks, and the guest XML each one produces, including that a guest which does not
ask for EFI gains no firmware element.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
post.xcat and post.xcat.ng exported XCATSERVER as "$MASTER_IP:3001".
getcredentials.awk and updateflag.awk split that value on a colon to separate the
address from the port, and an IPv6 address is full of colons, so the node could not
reach xcatd. remoteshell installed no root key and the node stopped at
installstatus postbooting.
Measured on openEuler 24.03: the node installed, booted, answered ping6 on its
reserved address, and refused xdsh with "Permission denied (publickey)" while its
status stayed postbooting.
Both scripts now build the endpoint with format_host_port, as post.xcat.rhels10
already did.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
post.xcat.rhels10 builds XCATSERVER with format_host_port and the other two copies
wrote "$MASTER_IP:3001". The test drives each script's own format_host_port and
asserts that no copy interpolates the address unbracketed.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
post.xcat and post.xcat.ng built their download URLs as
"http://$MASTER_IP:${HTTPPORT}...". An IPv6 management node address already
contains colons, so the result is not a URL, curl and wget refuse it, the script
reports installstatus failed and halts with sleep infinity. The install itself has
already succeeded at that point, so the node sits in %post and xCAT records
status=failed, which reads as an install failure.
Measured on openEuler 24.03: the node took its reserved address, installed all 565
packages over IPv6, then stopped in "Running post-installation scripts".
Both scripts now carry the format_uri_host helper that post.xcat.rhels10 already
had, and build their URLs from MASTER_HTTP_HOST. The helper is a third copy because
a node has no shared shell library at the point these scripts run.
This reaches openEuler, EL 8, EL 9 and CentOS 8 through post.xcat.ng, and the
Ubuntu and SUSE post scripts through post.xcat. EL 10 was already correct.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
post.xcat.rhels10 brackets the management node address before it goes in a URL and
the other two copies did not, and nothing held the three to each other.
The test drives each script's own format_uri_host with one table, and asserts that
no download URL in them interpolates MASTER_IP unbracketed.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
makedhcp wrote no boot file into a DHCPv6 reservation, so the firmware took the
reserved address and had nothing to load. EDK2 reported "PXE-E21: Remote boot
cancelled" and tried the next boot entry, which reads as a DHCP failure although
the address was granted. Measured on openEuler 24.03: dhcpd6.conf carried no
bootfile reference where the DHCPv4 configuration carried fifteen.
addnode6 now emits option dhcp6.bootfile-url, which is RFC 5970 option 59, from
the same helpers the Kea backend uses. Those two helpers read noderes and
BootPolicy, not Kea, so they lose their kea_ prefix.
Two further defects kept the same node from booting. The DHCPv6 daemon was never
started: ISC runs it as a second service, the flag that recorded the need was
assigned and never read, restart_dhcpd restarted only the DHCPv4 service, and the
service map had no ISC DHCPv6 name. And makedhcp failed with "The file
/etc/sysconfig/dhcpd6 doesn't exist" although no EL or openEuler dhcp package
ships that file and dhcpd6 does not need it: with the file deleted the daemon
still binds the provisioning NIC, because ISC dhcpd listens only on the
interfaces its subnet declarations name.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The DHCPv6 half of makedhcp had no test for the boot file, the DHCPv6 service or
the sysconfig file, so a node could be given its reserved address with nothing to
load and the suite stayed green.
The test drives the ISC path of makedhcp and asserts that every DHCPv6 host it
creates carries a bootfile-url naming the grub2 loader, that a node with
netboot=xnba gets none, that the DHCPv6 daemon is restarted, and that a missing
/etc/sysconfig/dhcpd6 is not reported as an error.
The harness now names the operating system instead of reading the host it runs
on. Both sysconfig branches depend on it, so without this the test exercised
whichever branch the build host happened to take, and the error assertion passed
with the defect in place. It also stubs restartservice, which the harness
previously let through to the services of the build host.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The IPv6 provisioning support has no page in the admin guide, so two
requirements that a cluster cannot work without are only visible in the code.
Only netboot=grub2, grub2-http and grub2-tftp get a bootfile-url in a DHCPv6
reservation, and the grub2 image under /tftpboot/boot/grub2 is not signed, so
firmware that enforces Secure Boot downloads it and refuses to start it.
The page states both requirements, how xCAT predicts the DHCPv6 client
identifier from vpd.uuid, what the configdhcpv6duid postscript does, and the
static address that nodeset puts on the kernel command line.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
sles.pm matched ipv6 nowhere in 2801 lines and the SUSE templates wrote
"<bootproto>dhcp</bootproto>" directly, so an IPv6-only SUSE node had no way to configure its
installer: DHCP cannot serve it, and SUSE has no static handoff on the kernel command line.
_autoyast_network6 builds the networking section of such a node, with a static interface, the
address of the node and a prefix length, which is what AutoYaST takes for IPv6 instead of a
netmask, and a default route carrying the IPv6 gateway.
The #YAST2NET6# directive chooses between that and the DHCP block the templates carried. An IPv4
node gets that block unchanged, which is why the existing #YAST2NET# was not used: its DHCP arm
renders something else, and leap15.6 is a gating cell. compute.leap15.tmpl and compute.sle15.tmpl
take the directive.
autoyast_ipv6_network.t covers the section. Emitting a netmask instead of a prefix length fails 2
of its 11 assertions. The IPv4 output of the directive was compared with the text it replaced and
is identical.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>