SLOF, the open firmware of a PowerKVM guest and a PowerVM LPAR, identifies
itself with an RFC 3315 DUID-LL built from the MAC of its interface, and it
reports no UUID at all. makedhcp derives every DHCPv6 reservation from
vpd.uuid, so the reservation of a ppc64le node can never match: measured on an
IPv6-only node, SLOF sent 00:03:00:01:<mac> against the 00:04:<uuid>
reservation xCAT wrote. The node gets no reserved address and no RFC 5970
option 59, and its firmware has nothing to load.
dhcp6_client_duid now takes the MAC and the architecture. kea_duid_ll_from_mac
builds the DUID-LL from the first address of mac.mac, which is the interface
that netboots, and dhcp6_firmware_duid_is_link_layer says which architectures
send one. A ppc64le node takes the DUID-LL with no attribute set, and the
byte-order warning about vpd.uuid is not reported for it, because that firmware
does not read the value. mac.duid gains ll, which selects the DUID-LL on any
architecture. firmware and canonical are unchanged and still override.
One reservation covers the whole netboot: the grub2 ieee1275 network stack
builds its DUID from the same interface, so the loader sends what the firmware
sent. That is why no second reservation is written, unlike a chainloading UEFI
node.
dhcp_dhcpv6_duid.t gains five cases. On the unfixed tree 15 of its 195
assertions fail, cn11 with the firmware-order DUID-UUID where the DUID-LL is
expected. A mutation that gives every architecture the DUID-LL fails 42,
naming the x86_64 cases that must keep the DUID-UUID.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
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>
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>
Before this work xCAT stored vpd.uuid with its first three fields swapped for
nodes from Genesis discovery and for KVM guests from mkvm, clonevm and rscan.
vpd.uuid now holds the UUID that the operating system reports, and no row is
migrated. makedhcp swaps such a row a second time, so the DUID it reserves the
address for is the canonical order of the real UUID, which no client sends. The
node then gets no lease and makedhcp reports nothing. Until now the problem was
only described in makedhcp.8.pod.
A row cannot be rewritten, because nothing tells which spelling it holds. So
makedhcp reports instead. The new dhcp6_uuid_looks_byte_swapped reads the RFC
4122 version field: a swap of the first three fields moves it from the first
nibble of the third field to the third nibble, and moves nothing else. A value
whose version is valid only in the swapped position is therefore a row to look
at. dhcp6_client_duid returns the message as a third value, and addnode6 and
kea_node_reservations6 report it once for the node. Neither changes the value or
the reservation.
What the check cannot know: a swap leaves a valid version in the first field
about half the time, so it misses those rows. It also cannot read the UUID that
the node holds, so a node with a non-conformant firmware UUID can be reported
for nothing.
dhcp_dhcpv6_duid.t adds node cn10 and a block that holds down the detection, the
double swap, and the remedy the message gives. Reading the swapped version from
nibble 15 instead of 14 fails exactly the four assertions that name the report,
and leaves green the five that hold the limits of the check and the four that
hold the DUID values.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
nodeimport writes '00000000-0000-0000-0000-000000000000' to vpd.uuid for every
PowerKVM node it creates (profilednodes.pm). That value is 32 valid hexadecimal
digits, so kea_duid_from_uuid builds a DUID from it and returns
00:04:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 for all of them. makedhcp
then keeps the reservation of the node it wrote last and reports nothing.
kea_duid_from_uuid now refuses the nil UUID, which it reads through the new
dhcp6_uuid_is_placeholder. A node whose vpd.uuid is the nil UUID is treated like
a node with no vpd.uuid: with Kea DHCP the reservation falls back to the MAC
address of the node, and with ISC DHCP addnode6 skips the node and names the
reason. addnode6 carries a third message for the nil UUID, because the existing
'vpd.uuid is not a UUID.' is false for a value of the right form.
The all-f UUID is left alone. Nothing in the tree writes it, and RFC 4122 names
only the nil UUID.
dhcp_dhcpv6_duid.t adds node cn09 and a block for two PowerKVM nodes. Dropping
the one new line from kea_duid_from_uuid fails 15 assertions, among them 'two
nodes with the nil vpd.uuid keep one reservation each', while the three
neighbours that hold the limits of the check stay green.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Add the duid attribute to the mac table, node and group reference pages,
and describe in makedhcp(8) which DHCPv6 client identifier a reservation
matches and how the duid attribute selects it.
The vpd.uuid description and makedhcp(8) now say that vpd.uuid holds
the system UUID that the operating system reports, and what to do for
a node whose vpd.uuid Genesis discovery, mkvm or rscan stored with the
first three fields swapped.
(cherry picked from commit 5f19a715345853e9236fbc455b4f834ded2e0bd4)
(cherry picked from commit ef9b17d6e5)
Sixteen assertions on this branch matched a regular expression against the
source of the code they test. Such an assertion passes when the code is moved
somewhere it never runs, and fails when the file is reformatted and nothing
has changed: a perltidy respace of updatenode.pm:1606 turned
updatenode_ipv6_endpoint.t red with the behaviour unchanged.
updatenode_ipv6_endpoint.t now runs updatenoderunps and updatenodesoftware
and reads the xdsh command each one dispatched. It also covers the service
node name that has no usable endpoint, which the regular expressions could
not reach.
anaconda.pm built the debug syslog kernel arguments inline inside two large
subs. Move each to its own sub, _netboot_syslog_kcmdline_args and
_install_syslog_kcmdline_args, and render them in the test. An unusable
server name now gives no syslog arguments, where it gave "syslog.server="
with nothing after it.
pping is a program with no sub API, so the nmap and fping command building
moves to xCAT::DSHCore as nmap_ping_command and fping_ping_command, and pping
stays the caller that forks and execs the list.
credentials_ipv6_callback.t read allowcred.awk as text, and ran gawk from a
.t. The awk program is covered by xCAT-test/bats/ipv6_allowcred_awk.bats,
which starts it and speaks the credential protocol to it over both families.
Stubbing Socket6 and IO::Socket::INET6 in %INC also unskips the four
_open_callback_socket assertions, which skipped where the suite runs.
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)
xCAT installs on the leap15.6 node and the install gate still fails:
GATE FAIL: xcatd not active
GATE FAIL: lsdef cannot reach xcatd
GATE FAIL: site.xcatdport not seeded
journalctl for xcatd has no entries, and loading the library by hand on the
node says why:
Can't locate JSON.pm in @INC ... (@INC contains: /opt/xcat/lib/perl ...)
openSUSE has no perl-generators. Nothing generates a perl(...) requirement for
any xCAT package there, so no spec installs the modules its code loads, and
perl-xCAT names no Requires at all. Measured on xcat20-mn against the 85
external modules the EL build auto-requires: five are absent -- Date::Parse,
Expect, HTML::Form, JSON and SNMP -- and the other 80 are present.
Each openSUSE branch now names the modules EL's generator emits for that
package, as capabilities, so the same core build serves the sles15 and sles12
cells: both Leap releases provide all five, from perl-TimeDate, perl-Expect,
perl-HTML-Form, perl-JSON and perl-SNMP.
Verified with rpmspec that only openSUSE gets these; EL and openEuler are
unchanged and keep generating them.
xCAT-test/unit/opensuse_mn_requires.t fails on the commit before this one.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The candidate list of comment_bind_address was assigned by a top-level
statement below the main flow's exit, so the statement never ran. The list
was empty, the fallback index read undef, and mysqlsetup -i failed with
"cannot read : No such file or directory" on every MySQL cluster. The
service node install stops there.
A BEGIN block now fills the list at compile time.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
mysqlsetup commented the bind-address line by writing the result to
/tmp/my.cnf and renaming it over the configuration file. A file created in
/tmp takes user_tmp_t, and a rename keeps the type of the file it moves, so
the management node was left with a MySQL configuration that mysqld is denied
read of. The denial survives the command and was seen in three rounds of the
SELinux campaign. The temporary path is also a fixed name in a world writable
directory, written as root.
comment_bind_address now reads the file, substitutes the line and writes the
result back through the same file. Truncating in place keeps the inode, which
is what carries the label, so no relabel is needed afterwards. The candidate
list moves to @BIND_FILES and the resolution order does not change: the
Ubuntu mariadb.conf.d file, then /etc/mysql/my.cnf, then /etc/my.cnf.
mysqlsetup_bind_address_label.t drives the sub against a scratch tree and
asserts the inode survives, that only a line starting with bind is commented,
and that no temporary file is left beside the target. With the rewrite put back
through a renamed file in /tmp, the inode check is the one check of the
thirteen that fails.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Describe the .sha256 file that packimage and liteimg write, and how
nodeset has nodes check it. Describe the rootimgchecksum attributes of
the site and the osimage, the upgrade that keeps existing images
unchecked, and the nodeset warning. Describe the checksum that genimage
and nodeset write for an image packed before this release.
The man page said that packimage overwrites the root image and that nodes
cannot use it while packimage runs. Describe the replacement instead, and
the disk space that it needs.
A new page describes the ipxe and xnba netboot methods: the files of the
upstream loader, UEFI Secure Boot through the shim and its limits, the
client test, the loader of nodes without a definition, the move of
nodes to the ipxe method and back, and the known limits of the upstream
loader.
The node guide, the noderes, node, group and nodeset pages list the ipxe
method, and the value lists mark xnba deprecated. The examples that
define an x86 node use netboot=ipxe. The mixed cluster and uninstall
guides name ipxe-xcat, and the DHCP validation matrix gets the iPXE
loader rows, Secure Boot included.
Merge current master into the openEuler support branch. Keep native
kernel, DHCP, locale and timezone requirements with the upstream payload
verifier and EL10 package paths. Preserve signed openEuler installation.
Update the native fixtures to check the merged payload contract.
The deb metapackages and xcat-client only recommended nmap and
ipmitool-xcat, while xCAT.spec, xCATsn.spec and xCAT-client.spec require
them. An install with --no-install-recommends therefore left bmcdiscover
without a scan method and out-of-band management without the tool ipmi.pm
and bmcdiscover.pm hard-code. Both move to Depends.
The ipmitool-xcat floor rises from 1.8.17-1 to 1.8.18-4, the floor of
xCAT.spec. Builds before 1.8.18-3 lack the CVE-2020-5208 patch.
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
zxcatexport.pl, zxcatimport.pl and zxcatCopyCloneList.pl load
Capture::Tiny at top level. The deb ships them on every architecture and
declared nothing for it.
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
makentp reads site.ntpbackend to select the NTP daemon, and setupntp takes the same value as
--backend, but no help text names the attribute. An admin who needs ntpd on a host that has
chrony has no way to find out the attribute exists. site.dhcpbackend, which selects the DHCP
implementation the same way, is documented in the site table help.
The site table description in xCAT::Schema now carries ntpbackend beside ntpservers, with its
valid values and the auto default. The makentp man page lists it with the other site attributes
the command honors, and names the setupntp --backend option that carries the value to the nodes.
ntp_backend_selection.t reads the site help from the loaded schema and the makentp pod. Five
assertions fail without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Add the riscv64 page to the cluster management guide (UEFI + grub2 boot
path, discovery through mknb's grub2 network configurations, stateful and
stateless provisioning, the dependency picture for a management node on
riscv64, limitations), list riscv64 in the node object attributes and in
the support matrices, add the architecture to the cross-build page for
stateless images, extend the grub2 install guide (and fix its swapped
x86_64/aarch64 file names), the uninstall package lists, the DHCP backend
validation matrix and the mknb/genimage man pages, and carry the riscv64
schema values into the generated nodetype, osimage, noderes, node and
group references.
Record that a node with more than one BMC is configured one BMC at a
time and that a comma separated value gives one setting per BMC, in
both the man page source and the checked-in text.
pasu strips OneCLI's banner and status lines so only the requested settings are
shown, but OneCLI has grown several status lines over the years that were not
filtered and leaked into the output. Add the missing patterns.
Recovered from the unmerged lenovobuild branch (229533cb, a6932bb4), which added
"Connected to BMC at IP address" (master only matched "by"), "Succeed in running
the command:" and "start to convert cmd.". Extended after testing a current
OneCLI 5.3.0 on a Lenovo ThinkSystem SR635, which also emits "Start to connect
...", "Connected to the node(N) by KCS" and a trailing "Succeed." -- now
filtered too.
Validated by running a real OneCLI 5.3.0 "config show" through the filter:
every banner/footer line is removed and all 756 setting lines pass unchanged.
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
When invoked with no node name, replaycons printed a terse "Please specify a
node name." Print the full usage statement instead, consistent with -h.
Also document, in the man page, that confluent log rotation renames older logs
and how to replay one by appending the date suffix seen in
/var/log/confluent/consoles/.
Recovered from the unmerged lenovobuild branch (originals 1c1b23fac, 48a92b7d4).
Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>