A request sent from within a console session, such as the power state
check confetty makes, went through a handler that logged every failure
as an unexpected 500 with a stack trace. A node with an unreachable BMC
filled the trace log with TargetEndpointUnreachable. Share the error
reporting of the main request loop, so the client gets the real error
code and only unexpected failures are traced.
A client that reset the connection or closed it before finishing the
exchange left a stack trace in the trace log (ConnectionResetError, or
an IndexError on an empty read). Read each field in full, and treat a
client going away as the end of that exchange rather than a server fault.
It is verified that iPXE leverages the UEFI CA and does not let untrusted connections.
So let it do https as well as http, relegating boot.img for virtual media instead.
This like the plain http boot works nicely with a broader set of UEFI.
Some implementations claim to have a system, but have useless data.
We can't tell programattically that the data is useless, so provide chassis for the user to decide.
Since we have a Seccomp cBPF going anyway, add insmod/modprobe operations to block.
Also reframe things to be a bit more readable using enum and less magical numbers.
image2disk only took the boot UUID from a /boot volume. Images captured
from a system without a separate /boot left it unset, and rewriting the
EFI stub grub.cfg failed with "TypeError: sequence item 5: expected str
instance, NoneType found". Fall back to the UUID of the / filesystem,
which holds /boot in that case.
Profile scripts had to call apiclient and parse /self/myattribs to read
a node attribute. confluent_attrib prints one attribute, comma joining
lists, and returns 1 when it is unset. Non-shell scripts can run it as
'bash /etc/confluent/functions confluent_attrib <name>'.
groups is stored as a plain list rather than a value dict, so the
value check skipped it and a node could not see its own groups. Return
it as a list, the same way ansible plays get it as host vars.
nodedefine with a noderange passed one dict for all nodes, so they
shared one stored groups list. Later group membership changes then
updated inheritance for only the first node, leaving the others with
values inherited from groups they no longer belong to.
post.sh runs post.custom, which the profiles lacked, so every install
to disk logged a failed download. firstboot.sh copied
/etc/confluent/tls/*.pem, which diskless nodes never have: installimage
already adds the confluent CA to the ca-trust anchors.
When using non-https (when we would need UEFI certificate) and if we have secureboot friendly ipxe setup, use ipxe for http boot.
This avoids the tftp requirement and preserves secureboot, but uses material that UEFI is generally better equipped to handle.
For now, take care of the IPv4 path, IPv6 path contingent on testing.
An old stateful OS on LVM was activated at diskless boot and kept the
disk busy, so repartitioning it for scratch failed. Set an empty
auto_activation_volume_list unless the image sets one. Ubuntu also
needs it in the initramfs, whose udev rules activate LVM earlier.
A captured image keeps the /etc/kernel/cmdline of its source. If the
source did not run with the net.ifnames=/biosdevname= of the diskless
boot, the installed system renames the interface and the connection
written during the install does not match. Append them when missing.
After image2disk, installimage stopped the sshd of the image and moved
port 22 to the initramfs sshd, chrooted into the install target, by
sending that sshd HUP. The el9 initramfs only starts its sshd with
debugssh, and on EL 9.8 it cannot start at all without sshd-session, so
normally nothing listened on port 22. The syncfiles push of post.sh then
failed with connection refused while the node still reported completed.
Restart the sshd of the image instead, chrooted into the install target.
It is always present and matches the OpenSSH helpers of the image, so
this also works for images packed or captured before the initramfs fix.
Wait for the old sshd to exit first, so the new one can bind port 22.
EL 9.8 ships OpenSSH 9.9, whose sshd runs each connection through
/usr/libexec/openssh/sshd-session. Without it the initramfs sshd refuses
to start, so debugssh does not work on EL 9.8 images. Install it when
present, older EL9 releases do not have it.
image2disk only carried console= and quiet into the installed system.
A built image deployed with net.ifnames=0 biosdevname=0 came up with
enp1s0 while the connection written during the install was for eth0,
so the network failed. Carry net.ifnames= and biosdevname= as well.
Also add the missing space before crashkernel= in the default el9
GRUB_CMDLINE_LINUX.
A plain chroot, as used by ansible's chroot connection, has no DNS or
/dev in a built image. Describe what imgutil exec mounts, show ansible
running through it, and fix the exec example, which needs -- before
command options.