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>
The previous commit required Socket6 and IO::Socket::INET6 on every RPM family. That
is wrong for EL and openEuler, where dnf installs a recommended package and the
existing Recommends already delivers both modules.
The gap is openSUSE only, and it has two parts. xCAT-server recommends both modules
inside a guard that names fedora, rhel and openEuler and omits suse_version, so an
openSUSE build declares neither a requires nor a recommends. perl-xCAT declares nothing
at all, although xCAT::SLP, xCAT::Client and xCAT::NetworkUtils all reach IPv6 through
these modules. A recommendation would not close it either: the openSUSE Minimal-VM
image sets solver.onlyRequires = true, so zypper installs no recommended package, which
is why xCAT already names a DHCP server directly.
Both specs now require both modules on openSUSE and recommend them on the families
whose package manager honours a weak dependency. The xCAT-server deb returns to a
Recommends.
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>
Shared image utilities must not require the Debian source directory.
Keep the profile helper beside imgutils and materialize the Debian copy
when building RPM and DEB packages. Source-only Debian copies must follow
symlinks; installed Debian directories stay self-contained.
Every caller of Socket6 and IO::Socket::INET6 loads it with an eval and keeps
working on IPv4 when the load fails. NetworkUtils carries a second resolver
path on core Socket for exactly that case. xCAT-server.spec and
xCAT-server/debian/control named both modules as a hard dependency, which
states a dependency the code does not have and stops xCAT installing where
the modules are missing.
Declare both as Recommends in the spec and in debian/control. A package
manager installs a recommendation by default, so a management node still gets
them. Both are in EL AppStream and in openEuler 24.03 everything, measured
from its primary.xml.
The family cache block in networkutils_ipv6_helpers.t was guarded on Socket6
and skipped where the unit suite runs, which has no Socket6. The family cache
keys are the same on both resolver paths, so the guard now accepts either
resolver: six more assertions run, and one of them fails when the OnlyV4 and
OnlyV6 cache split is removed.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
An IPv6-only provisioning network cannot deploy a node. The discovery and
credential callbacks open IPv4 sockets, the kickstart and boot templates
render an IPv4 address into every endpoint, and makehosts drops an IPv6
value because hosts.pm gates on isIpv4addr.
NetworkUtils gains the address helpers the rest of the change uses:
format_host_port, parse_host_port and format_uri_host bracket an IPv6
literal, getNodeNetworkCfg6 reads the static IPv6 configuration of a node,
my_ip_facing_family selects the management-node address of one family,
getIPv6ReverseZone builds a nibble-aligned reverse zone, and
node_is_ipv6_only and ipv6_server_for_node answer the two questions the
plugins used to answer for themselves. credentials.pm opens the callback
socket through IO::Socket::INET6 when the modules are present and keeps the
IPv4 path when they are not. Template.pm and anaconda.pm render an IPv6
kickstart network line and bracketed endpoints. The postscripts and the
stateless xcatroot format every endpoint through the bracketing helpers.
xCAT-server requires perl-IO-Socket-INET6 and perl-Socket6 on EL, and
libio-socket-inet6-perl and libsocket6-perl on Debian.
(cherry picked from commits c0a69bb5a and caa8ca790)
Ported onto upstream master ee6b4f532. The two commits are folded because the
second refactors the first. Master is kept where it has a newer form of the
same thing: the getipaddr cache guard, the Kea control_socket_path helper, the
netboot method list, install_device_params, the modern_installer test and the
isValidIp validator, which replaces the isValidIPAddress this branch added.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 3928c04507)
Booting nodes need a server that sends a published root image once to
every node that asks for it in a short window.
xcat-uftp-listener accepts HTTP/1.0 GET requests that name an image
path and its digest. It serves only an archive that packimage published
under the configured image roots, for a digest that the checksum file
lists. It keeps the archive open from the first request, so a later
packimage does not change the bytes of a queued batch. It collects the
requests for the same inode, digest and port for batch_delay seconds,
then runs one closed-group uftp session for the batch. Connections,
queued jobs, senders and receivers per job are limited.
The sender gets an argument vector built only from the configuration,
and signs the encrypted session with a persistent server key. It drops a
receiver that misses nearly every block of a section, so one node
without multicast cannot hold the session open. A sender that is not the
UFTP 5 build of xcat-dep is refused.
block_size allows larger packets on jumbo frame networks, up to the
8800-byte limit of uftp.
xCAT::UFTP holds the decisions of the listener: request checks, batches,
limits, timeouts and the runtime check. The script holds the sockets,
the key commands and the sender processes.
The packages install the service but do not enable it. Package removal
stops and disables it.
Group-writable sources leave install and netboot assets writable by other users in the Debian package. Remove group and other write permission from those two staged trees. Preserve executable bits and leave source files and the rest of the payload unchanged.
xcat-server ships xcatws.cgi and restapi.pl with the endpoint enabled in
apache, and both load CGI at top level. Nothing declared the module, so on
a management node where nothing else pulled it every /xcatws request
answered 500. The rpm package requires perl(CGI).
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
copycd builds the riscv64 boot loader by running grub-mkimage, which
grub-common ships on every supported Ubuntu release. Nothing declared it, so a
management or service node installed without that package copies riscv64 media
and produces no loader, while DHCP keeps pointing every riscv64 node at the path
where the loader should be.
The declaration belongs to xcat-server, which carries the plugin that runs the
command, so both metapackages inherit it.
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
We added some configuration files for xdsh to run switch management
control. But all the configuration files were not checked in for
Ubuntu. This fix is to add them for Ubuntu.
from the builds. Also remove the changelog because that file is going
to be ignored from the source tree. Ubuntu builds are being done
in the xcat-core directory and causing issues when we are switching
between releases. Should probably change the builds scripts as a longer
term solution