2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-19 08:52:20 +00:00
Commit Graph

7213 Commits

Author SHA1 Message Date
Jarrod Johnson bd647ebfa4 Implement chassis information separate from system
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.
2026-11-14 08:01:31 -05:00
Jarrod Johnson 334815e9a5 Catch the target url from a 403 extended message, if required 2026-11-13 10:00:38 -05:00
Jarrod Johnson d4c2072e3f Have nvos discovery handle LLA based onboarding 2026-11-13 09:36:31 -05:00
Jarrod Johnson dd700ad1a5 Add mac address to registered address, when possible 2026-11-13 09:04:07 -05:00
Jarrod Johnson 85ff47e684 Add singleton IPv6 support to nodediscover register
This allows otherwise queried ipv6 addresses to be checked one at a time.
2026-11-13 08:13:26 -05:00
Jarrod Johnson 4862c9f734 Implement blacklist of module init functions
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.
2026-11-12 11:15:43 -05:00
Jarrod Johnson ad2de237bc Implement management of UEFI HTTPS certificates
On supported platforms, manage the UEFI HTTPS certificate store.  This can make it easier to manage HTTPS boot.
2026-11-12 10:17:48 -05:00
Jarrod Johnson 9d78d42071 Merge remote-tracking branch 'xcat/master' 2026-11-12 10:06:02 -05:00
Jarrod Johnson bdfe5d9b32 Merge pull request #381 from Obihoernchen/feat/imgutil-image-kernel
imgutil: report the image kernel in exec and build
2026-11-12 10:02:01 -05:00
Markus Hilger 7108cdd3d9 imgutil: derive the seccomp filter length from the filter 2026-11-12 15:42:18 +01:00
Jarrod Johnson aedb093c22 Merge pull request #384 from Obihoernchen/fix/image2disk-no-boot-partition
Use the root filesystem for grub when an image has no /boot
2026-11-12 09:41:42 -05:00
Markus Hilger 973a340ed7 Use the root filesystem for grub when an image has no /boot
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.
2026-11-12 15:17:36 +01:00
Jarrod Johnson bec1ed1498 Merge pull request #383 from Obihoernchen/feat/confluent-attrib-helper
Add confluent_attrib helper for profile scripts
2026-11-12 07:40:14 -05:00
Markus Hilger 9d8cb97fb3 Add confluent_attrib helper to profile functions
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>'.
2026-11-11 23:02:02 +01:00
Markus Hilger c949359199 Return node groups from /self/myattribs
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.
2026-11-11 23:02:02 +01:00
Jarrod Johnson 5523abc435 Merge pull request #382 from Obihoernchen/fix/nodedefine-shared-groups
Copy per-node attribute data in set_node_attributes
2026-11-11 13:02:08 -05:00
Markus Hilger 69a872c208 Copy per-node attribute data in set_node_attributes
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.
2026-11-11 18:51:56 +01:00
Jarrod Johnson 20a5065d06 Merge remote-tracking branch 'xcat/master' 2026-11-11 07:39:21 -05:00
Jarrod Johnson 218f245b50 Merge pull request #380 from Obihoernchen/fix/confignet-firewalld-quiet
Do not print the firewalld check of confignet
2026-11-11 07:09:09 -05:00
Jarrod Johnson fac29990c0 Merge pull request #379 from Obihoernchen/fix/imgutil-dosfstools
Add dosfstools to the EL imgutil package lists
2026-11-11 07:08:46 -05:00
Jarrod Johnson 316107db60 Merge pull request #378 from Obihoernchen/fix/diskless-post-custom
Add post.custom to EL diskless profiles, drop firstboot tls copy
2026-11-11 07:08:25 -05:00
Markus Hilger dade8ea706 imgutil: report the image kernel in exec and build 2026-11-11 00:10:36 +01:00
Markus Hilger 823f2e57e6 Do not print the firewalld check of confignet
systemctl status firewalld printed the unit status, or 'Unit
firewalld.service could not be found.' on images without firewalld.
2026-11-10 22:25:29 +01:00
Markus Hilger e9e284986f Add post.custom to EL diskless profiles, drop firstboot tls copy
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.
2026-11-10 22:25:09 +01:00
Markus Hilger 82ecc69bc9 Add dosfstools to the EL imgutil package lists
image2disk formats /boot/efi with mkfs.vfat, which minimal built EL
images lack, so installtodisk failed. The Ubuntu lists have it.
2026-11-10 22:04:57 +01:00
Jarrod Johnson 5990303661 Fix ARM/x86 UEFI HTTP boot
Make http location tree consistent with tftp
2026-11-10 14:09:37 -05:00
Jarrod Johnson 2370623f94 Merge remote-tracking branch 'xcat/master' 2026-11-10 10:24:52 -05:00
Jarrod Johnson 48f82777b4 Enable iPXE based http boot
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.
2026-11-10 10:23:42 -05:00
Jarrod Johnson 05ec7f9d4d Merge pull request #377 from Obihoernchen/fix/diskless-lvm-autoactivation
Do not autoactivate LVM on local disks on diskless boot
2026-11-09 15:38:42 -05:00
Jarrod Johnson c3bc8ce747 Merge pull request #375 from Obihoernchen/fix/image2disk-kernelargs
Keep interface naming arguments when installing images to disk
2026-11-09 15:37:55 -05:00
Jarrod Johnson ccc68b5c5a Merge pull request #376 from Obihoernchen/fix/installtodisk-sshd
Fix syncfiles during EL9 installtodisk
2026-11-09 15:37:08 -05:00
Markus Hilger 5473f46cf3 Do not autoactivate LVM on local disks on diskless boot
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.
2026-11-09 21:35:40 +01:00
Jarrod Johnson a1e8f2b31b Merge pull request #374 from Obihoernchen/doc/imgutil-chroot-tools
Document running chroot tools through imgutil exec
2026-11-09 15:35:19 -05:00
Markus Hilger bd5c7be4da Add interface naming arguments to captured image cmdlines
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.
2026-11-09 21:04:06 +01:00
Markus Hilger 9b84a4ecba Point the installtodisk no disk hint at port 22
While installimage waits for an install disk, the sshd of the image
listens on port 22. The el9 initramfs sshd on port 2222 only runs with
debugssh.
2026-11-09 21:03:07 +01:00
Jarrod Johnson 1665b82b70 Set target VERSION for master branch 2026-11-09 14:58:35 -05:00
Markus Hilger e23873888f Serve installtodisk syncfiles with the sshd of the image
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.
2026-11-09 20:26:06 +01:00
Markus Hilger 81f375f6da Include sshd-session in the el9 diskless initramfs
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.
2026-11-09 20:26:06 +01:00
Markus Hilger 0e3f732538 Keep interface naming arguments when installing images to disk
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.
2026-11-09 20:17:18 +01:00
Markus Hilger 0581af6dcf Document running chroot tools through imgutil exec
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.
2026-11-09 20:01:40 +01:00
Jarrod Johnson 52505e6f2d Improve SSDP responder concurrency
Bulk boot could get serialized too harshly. Particularly could hiccup on name lookup delay.

Take the penalties concurrently instead.
2026-11-06 17:28:05 -05:00
Jarrod Johnson 84faa9a1c7 Properly indicate bynode or not in message state 2026-11-06 10:08:19 -05:00
Jarrod Johnson 58d4c6a5a9 Allow API caller to request raw binary images.
This can make it more straightforward as an interface, and also defer the penalty for base64 processing.
2026-11-06 09:37:58 -05:00
Jarrod Johnson b0fff4a8fe Default to json, and add binary types for screenshot to come down in a more straightforward way 2026-11-06 08:44:46 -05:00
Jarrod Johnson 791d0bea69 Merge pull request #373 from Obihoernchen/docs/nodeconsole-video
Document nodeconsole video mode and recording
2026-11-05 10:12:38 -05:00
Jarrod Johnson f569020c57 Merge pull request #351 from Obihoernchen/feat/imgutil-import
Add container image sources and --containerfile to imgutil build
2026-11-05 10:10:49 -05:00
Markus Hilger 875d87332c Add imgutil build --containerfile to start an image for offline builds
An image meant to build without network access must contain every
package build checks for, and that list differs by distribution, version
and architecture and changes between releases. build --containerfile
writes a Containerfile, or with --apptainer an Apptainer definition
file, generated from the same package lists, including -p, -a and
--selinux, so it cannot drift from what build expects. The OS is that of
the -s distribution or of the build system, as for a build. --arch names
the matching build platform and --from replaces the default base image.
-r is refused, the image installs from the repositories of its base
image.
The generated EL file installs full coreutils instead of the
coreutils-single of container bases, and the Ubuntu file cleans the apt
cache.
2026-11-05 12:46:44 +01:00
Markus Hilger 4a2be59d5d Add container image sources to imgutil build
For sites that already build images elsewhere, for example in CI from a
Dockerfile, imgutil build -s also takes a container image: a SIF file,
an OCI or Docker archive, an OCI layout directory, or a podman reference
with its transport, such as docker:// or containers-storage:. Files and
directories are recognized by their content, and any other source is a
distribution as before. The image is extracted into the scratch
directory, with podman or, for a SIF file, from its squashfs partition.
It is then completed the way build does: the confluent initramfs
configuration, the default package list with the package manager and
repositories of the image, and an initramfs for every kernel. The result
works with exec and pack like any built tree, and the build info names
the image as its source.

When the image already has every package of the list, the package
manager is not run, so an image prepared in CI builds without network
access. Missing packages are named before installing them. The
architecture comes from the image, and a requested --arch is checked
before extracting it. -r is refused because the image brings its own
repositories. With --arch, the matching variant of an image for several
architectures is used. Other than a local image, podman pulls or loads
the image into a temporary storage that is removed afterwards, so the
images and tags of the system stay as they are.

Container base images are not bootable systems, so the build also
unmasks the units they mask (systemd-remount-fs, getty.target,
systemd-logind and others) and removes policy-rc.d, reporting each
change, drops the boot entries kernel-install writes (they carry the
command line of the build system, installing to disk writes its own),
and with --selinux labels the tree with full contexts. Ubuntu images get
ubuntu-minimal, which debootstrap installs but container bases lack.

EL9, Ubuntu 24.04 and SUSE 16 or later images are supported, as long as
imgutil has a package list for the release. Older releases and
architectures other than x86_64 and aarch64 are refused.
2026-11-05 12:46:44 +01:00
Markus Hilger bb59cc7fd7 Document nodeconsole video mode and recording 2026-11-04 23:43:12 +01:00
Jarrod Johnson d48de07097 Merge pull request #370 from Obihoernchen/fix/ignore-generated-man-pages
Ignore the man pages generated by addattribs.py
2026-11-04 16:48:43 -05:00