2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-12 11:06:17 +00:00
Commit Graph

7099 Commits

Author SHA1 Message Date
Jarrod Johnson 813ddd4d05 Merge pull request #348 from Obihoernchen/fix/confignet-no-network-tool
Fail clearly when confignet finds no network configuration tool
2026-11-02 07:50:24 -05:00
Jarrod Johnson 0c85cbcc26 Merge pull request #347 from Obihoernchen/fix/imgutil-build-full-selinux-context
Set full SELinux contexts on images built with --selinux
2026-11-02 07:49:56 -05:00
Jarrod Johnson 75402fe9ba Merge pull request #346 from Obihoernchen/fix/ubuntu-diskless-netplan-perms
Restrict the netplan file written by Ubuntu diskless boot
2026-11-02 07:49:20 -05:00
Jarrod Johnson 016db810ea Merge pull request #345 from Obihoernchen/fix/diskless-stop-on-extract-failure
Stop a diskless boot when the root filesystem cannot be extracted
2026-11-02 07:49:09 -05:00
Markus Hilger cb09845fcd Set full SELinux contexts on images built with --selinux
setfiles without -F only corrects the type of a file and keeps its user,
role and range. Files of a new build tree get the SELinux user of the
process that created them, so about 1800 of them stayed unconfined_u
instead of system_u. Label the new tree with -F. Pack keeps relabeling
without it, so contexts set on purpose in a captured or edited tree stay.
2026-11-01 22:41:06 +01:00
Markus Hilger 6bdc3e17d7 Restrict the netplan file written by Ubuntu diskless boot
imageboot.sh wrote /etc/netplan/10-<iface>-confluentcfg.yaml with the
default mode 0644, and netplan warns that its configuration should not
be accessible by others. confignet already writes its files 0600, but
it leaves an identical file in place, so the boot-time one stayed 0644.
2026-11-01 22:39:31 +01:00
Markus Hilger 5d97bc6a19 Stop a diskless boot when the root filesystem cannot be extracted
extract_untethered_rootimg reports failure, for example when the image
does not fit into the memory backed root, but imageboot.sh ignored it and
booted into the partly extracted root, which then hung later on. Stop
with a message saying why instead.
2026-11-01 22:16:57 +01:00
Markus Hilger eb4f1ad21a Fail clearly when confignet finds no network configuration tool
Without netplan, nmcli or wicked the manager variable was never set and
confignet died with a NameError. Say what is missing instead. Also pick
netplan over nmcli in the retry pass, as the first pass does, instead of
switching to NetworkManager on systems that have both.
2026-11-01 22:10:22 +01:00
Jarrod Johnson 26f27da575 Merge pull request #343 from Obihoernchen/fix/image2disk-bls-kernel-paths
Point boot entries at the kernel on the installed boot filesystem
2026-11-01 13:32:38 -05:00
Jarrod Johnson 5e3d0d0f6b Merge pull request #342 from Obihoernchen/fix/imgutil-el-rpmdb-path
Find the rpm database of an EL image of another generation
2026-11-01 13:31:21 -05:00
Jarrod Johnson c41b39643f Merge pull request #341 from Obihoernchen/fix/imgutil-apt-failure
Fail imgutil build when apt fails in an Ubuntu image
2026-11-01 13:28:19 -05:00
Jarrod Johnson c87ce57eda Merge pull request #340 from Obihoernchen/fix/nodeattrib-env-dotted-attrs
Fix nodeattrib -e for dotted attribute names in asynclient
2026-11-01 13:27:54 -05:00
Jarrod Johnson 84b232db63 Merge pull request #339 from Obihoernchen/fix/untethered-failover
Fall back to other managers for untethered images
2026-11-01 13:27:30 -05:00
Jarrod Johnson e02972a5b7 Merge pull request #344 from Obihoernchen/fix/imgutil-drop-boot-entries
Drop the boot entries kernel scriptlets write during imgutil build
2026-11-01 13:25:25 -05:00
Markus Hilger 54d9d1d20b Drop the boot entries kernel scriptlets write during imgutil build
The kernel package writes a boot loader entry inside the build chroot.
Its linux and initrd paths point into the scratch directory of the
server (grub2-mkrelpath sees the bind mount) and its options are the
kernel command line of the server. Diskless boot never reads it, but
after installing to disk it sits next to the entry post.sh writes on
the installed system, so grub may pick the broken one. Remove the
entries when building, post.sh writes the right one when installing.
2026-11-01 18:50:46 +01:00
Markus Hilger 0e824ec529 Reset the rpm database path macro on any error
The _dbpath macro set for fingerprinting an image is process global. It
was only removed after a successful query, so an error left it set and
later fingerprinting in the same process, which fancy_chroot does on
every command, read the wrong database.
2026-11-01 18:09:58 +01:00
Markus Hilger 8b4445e675 Query the release package in the image, not the host
Without the rpm Python bindings, fingerprinting an image found its
system-release provider in the image database but then ran rpm -qi
against the host, so an image whose release package the host lacks was
not recognized. Use the same rooted rpm command for both queries.
2026-11-01 16:59:52 +01:00
Markus Hilger 1d8d4f3077 Point boot entries at the kernel on the installed boot filesystem
image2disk rewrote root= in the boot loader entries but kept their
linux and initrd paths. Those come from where the image was built: in a
diskless image from imgutil they carry the scratch directory of the
server (grub2-mkrelpath sees its bind mount), and a /boot/ path does not
match the separate /boot filesystem image2disk creates for such images.
grub then fails with "you need to load the kernel". Make the paths
relative to the boot filesystem of the target.
2026-11-01 15:02:43 +01:00
Markus Hilger e70f66d2df Fail imgutil build when apt fails in an Ubuntu image
DebHandler raised SystemExit on a failed apt-get, but prep_root runs
under run_constrained, which only catches Exception and otherwise exits
0. A failed package install was therefore reported as a successful
build. Raise an Exception instead, as ElHandler already does.
2026-11-01 13:14:10 +01:00
Markus Hilger 7039706e4d Fix nodeattrib -e for dotted attribute names in asynclient
f9dc92ec fixed this in client.py, but nodeattrib has used asynclient.py
since 76efea7c, so it still sends the underscored name (info_note
instead of info.note) as the attribute, and a missing variable raises a
KeyError instead of a usage error. Port the client.py logic over.
2026-11-01 13:14:10 +01:00
Markus Hilger af8d91a507 Find the rpm database of an EL image of another generation
EL9 and older keep the rpm database in /var/lib/rpm, EL10 moved it to
/usr/lib/sysimage/rpm. fingerprint_host_el opened the image with the
default path of the host, so on an EL10 server an EL9 image was not
recognized (and an empty database was created in it). pack then wrote
no profile.yaml and no addons link, and import refused the image. Use
/var/lib/rpm when it is a real directory in the image. In EL10 it is a
relative link, so the default of the host still applies.
2026-11-01 13:14:10 +01:00
Markus Hilger 0839299bd4 Fall back to other managers for untethered images
An untethered or uncompressed diskless boot downloaded the root image
only from the deployment server and retried it forever when that server
failed. Try the other managers that answered discovery as well, as the
tethered urlmount already does.

urlmount limits each small range request to 10 seconds, but the single
whole-image download cannot take a total limit. Give up on a connect
after 10 seconds and on a transfer that stalls for 30 seconds instead,
so a hung server moves on to the next one.
2026-11-01 12:09:06 +01:00
Jarrod Johnson 89787671cf Merge pull request #338 from Obihoernchen/fix/ssh-agent-dir-owner
Hand /run/confluent/ssh to the confluent user
2026-10-31 09:21:18 -04:00
Jarrod Johnson f42a8ff667 Merge pull request #337 from Obihoernchen/fix/require-ipxe-2
Require confluent_ipxe 2.0.0
2026-10-31 09:20:34 -04:00
Jarrod Johnson 516930107f Merge pull request #336 from Obihoernchen/fix/nightly-publish
Various CI/CD improvements
2026-10-31 09:20:16 -04:00
Jarrod Johnson fa11d643ab Merge pull request #335 from Obihoernchen/fix/diskless-confluent-arg-ubuntu-suse
Support confluent= in Ubuntu diskless initramfs + sles16 diskless selinux
2026-10-31 09:19:12 -04:00
Jarrod Johnson 12a97a6eff Merge pull request #334 from Obihoernchen/fix/diskless-confluent-arg
Support confluent= in el9 and el10 diskless initramfs
2026-10-31 09:16:46 -04:00
Jarrod Johnson 97489aff8c Merge pull request #333 from Obihoernchen/fix/pre-without-ifidx
Skip bringing up the deploy nic without a discovered ifidx
2026-10-31 09:10:05 -04:00
Markus Hilger 8ff02dc772 Require confluent_ipxe 2.0.0
Fixes #317
2026-10-31 02:35:30 +01:00
Markus Hilger 905992f054 Hand /run/confluent/ssh to the confluent user
Fixes #316
2026-10-31 02:14:21 +01:00
Markus Hilger 83c2a05dbd Harden nightly publishing and bound CI job runtimes
Write the nightly release notes only after every bundle is uploaded.
The notes carry the build key that prepare compares against, so a
failed upload used to record the new build anyway, and the following
nights skipped it while the release kept stale or missing bundles.

Publish only from the default branch. A manual run defaulted to
publishing, so testing the workflow on a topic branch replaced the
nightly with that branch.

Run the packaging build on pull requests that touch MANIFEST.in, which
decides what goes into the client and server packages, or anything
under confluent_vtbufferd, which is compiled here and carries the only
debian/ packaging in the tree.

Give every job a timeout instead of the six hour default, so a hung
container or download fails within minutes.
2026-10-31 01:57:38 +01:00
Markus Hilger 551658b5fe Label overlay upper layer of suse16 diskless images for SELinux
The initramfs writes the overlay upper layer before the SELinux policy
is loaded, so those files are unlabeled_t. On an enforcing image /
itself is unlabeled, and logind, getty and sshd fail.

Label exactly the upper layer paths like el9-diskless does. The root
is an overlay in untethered mode too, so this covers both. chcon comes
from the image, the initramfs has none.
2026-10-31 01:37:16 +01:00
Markus Hilger 91370cb8a8 Support confluent= in Ubuntu diskless initramfs
Without it the server is only found by link-local discovery, so nodes
behind a DHCP relay never boot. Ported from el9-diskless. The initramfs
has dhcpcd from 24.04 on and only ipconfig before.
2026-10-31 00:50:45 +01:00
Markus Hilger 4e8c7c0a9f Support confluent= in suse16 diskless initramfs
Without it the server is only found by link-local discovery, so nodes
behind a DHCP relay never boot. Ported from el9-diskless, with dhcpcd
in place of dhclient.
2026-10-31 00:50:45 +01:00
Markus Hilger 61c08c0c31 Include af_packet in suse16 diskless initramfs images
The SUSE kernel builds it as a module, so dhcpcd failed with "Address
family not supported" and a diskless node with ipv4_method dhcp never
got an address.
2026-10-31 00:50:45 +01:00
Markus Hilger 3b2a6dcf51 Try each NIC for confluent= in EL diskless
The first NIC with a link may not reach the server. Also stop the
DHCP client before the static setup, its lease would expire in the
booted image.
2026-10-31 00:03:09 +01:00
Markus Hilger 1ef80f5f19 Skip bringing up the deploy nic without a discovered ifidx
With confluent= on the kernel command line, e.g. behind a DHCP relay,
apiclient writes no /tmp/confluent.ifidx and cat and nmcli printed
errors.
2026-10-30 23:20:37 +01:00
Markus Hilger a19c1fabe0 Support confluent= in el9 and el10 diskless initramfs
Without it the server is only found by link-local discovery, so nodes
behind a DHCP relay never boot. Ported from el8-diskless.
2026-10-30 22:56:05 +01:00
Jarrod Johnson 9186b6418a Merge pull request #329 from Obihoernchen/fix/installtodisk-selinux-relabel
Label disk installs of diskless images for SELinux at the end
2026-10-30 17:25:55 -04:00
Jarrod Johnson f3ebf3001d Merge pull request #331 from Obihoernchen/fix/runansible-multiple-plays
Run every playbook of a remote configuration
2026-10-30 17:24:53 -04:00
Jarrod Johnson 12ad4aea1c Merge pull request #332 from Obihoernchen/feat/imgutil-selinux
Add imgutil build --selinux support
2026-10-30 17:24:33 -04:00
Jarrod Johnson 2b429119b5 Merge pull request #330 from Obihoernchen/fix/runansible-ssh-keepalive
Use ssh keepalives for ansible plays
2026-10-30 17:20:06 -04:00
Markus Hilger 5175e29a0a Remove the diskless dracut config before SELinux labeling
Removing it afterwards copied /etc/dracut.conf.d up unlabeled in
tethered mode on images built with SELinux. Skip the whiteout that the
removal leaves in the upper layer.
2026-10-30 20:27:53 +01:00
Markus Hilger a9a57fe93b Add opt-in SELinux support to imgutil build for EL images
imgutil build --selinux installs the targeted policy and keeps SELinux enforcing.
imgutil pack labels images that enable SELinux with their own policy.
2026-10-30 20:27:53 +01:00
Markus Hilger 680ff433ed Run every playbook of a remote configuration
asyncio has no sock_close, so the first playbook ended with an
AttributeError and the remaining ones were silently skipped.
2026-10-30 19:31:00 +01:00
Markus Hilger 0e03b07939 Use ssh keepalives for ansible plays
A node reset during a play left ssh waiting forever, which blocked
every later remote configuration of that node, like an install's post.d.
2026-10-30 18:42:48 +01:00
Markus Hilger e0be3ce5f7 Label disk installs of diskless images for SELinux at the end
The install runs before a policy is loaded, so the module index from
kernel-install and files of later post scripts stayed unlabeled and
systemd-modules-load failed. Relabel every local filesystem last.
2026-10-30 18:30:01 +01:00
Jarrod Johnson 57a4659d59 Merge pull request #328 from Obihoernchen/fix/diskless-untethered-selinux
Label untethered diskless roots for SELinux
2026-10-30 13:10:18 -04:00
Markus Hilger 63cdb6b2ed Label untethered diskless roots for SELinux
On an untethered root, files the initramfs writes before policy load
and sockets that unsquashfs creates without attributes have no label.
Label every inode without one, as the upper layer is in tethered mode.
2026-10-30 15:53:03 +01:00
Jarrod Johnson 4f44dd8d82 Merge pull request #327 from Obihoernchen/fix/installtodisk-untethered-ubuntu
Keep the image mounted for installtodisk on Ubuntu
2026-10-30 08:16:51 -04:00