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

1243 Commits

Author SHA1 Message Date
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
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 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
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 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
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
Markus Hilger b0561c61d2 Keep the image mounted for installtodisk on Ubuntu
Like on EL9 and EL10, an untethered or uncompressed boot unmounts the
image before installimage runs, so image2disk.py has nothing to copy.
2026-10-30 13:09:24 +01:00
Jarrod Johnson 58906b00cc Merge pull request #324 from Obihoernchen/fix/installtodisk-untethered
Keep the image mounted when installing a diskless image to disk
2026-10-30 08:02:14 -04:00
Jarrod Johnson 67b5a60c78 Merge pull request #323 from Obihoernchen/fix/diskless-tethered-selinux
Label overlay upper layer of diskless images for SELinux
2026-10-30 08:00:27 -04:00
Markus Hilger dc909e6f0b Label overlay upper layer of diskless images for SELinux
With a tethered root (and on EL8 always), the initramfs writes the
overlay upper layer before the SELinux policy is loaded, so those files
are unlabeled_t. On a captured enforcing image sshd-keygen then cannot
search / and the node comes up without sshd.

Label exactly the upper layer paths with matchpathcon and chcon.
setfiles would recurse into the merged tree and restorecon is a no-op
before policy load. Built images have SELinux disabled and skip this.
2026-10-30 12:43:30 +01:00
Markus Hilger 8bec81fb95 Keep the image mounted when installing a diskless image to disk
With installtodisk and confluent_imagemethod=untethered (or
uncompressed) imageboot.sh first extracts the image to RAM and tears
down the image mount and the cryptimg device. installimage then hands
the empty /mnt/remote to image2disk.py, which wipes the target disk and
fails with:

  FileNotFoundError: [Errno 2] No such file or directory: '/dev/mapper/cryptimg'

Writing the image to disk never needs the RAM copy, so treat the image
method as tethered when installtodisk is set. The same profile can then
be switched between untethered and installtodisk by only adding or
removing installtodisk.
2026-10-30 09:55:43 +01:00
Markus Hilger 4aa6bf8af5 Accept plain device names in deployment.storage and fail on no match
The attribute help promises "a specific device name", but getinstalldisk
only understood "m2" and "/dev/<name>". A plain "nvme0n1" aborted the
install with "Unknown deployment.storage specification", and a
"/dev/<name>" that matched no disk was silently ignored, so the OS went
to whatever disk the default ordering picked. For an attribute meant to
pin the OS disk that is the dangerous failure mode.

Accept a kernel name with or without /dev/ and resolve /dev/disk/by-*
links to their kernel name, so a disk can be pinned by a stable path.
When nothing matches, fail with "No disks match" like the m2 filter
already does. Document the accepted forms in the attribute help.
2026-10-30 09:43:54 +01:00
Jarrod Johnson cb92a3f332 Merge pull request #320 from robertcaliman/rcaliman/add-vroc-support-for-esxi
Add support for Intel VROC in ESXi
2026-10-29 10:27:44 -04:00
Robert Caliman cd3c337880 Add support for Intel VROC in ESXi 2026-10-29 16:12:18 +02:00
Jarrod Johnson 41f0d7cca2 Avoid spurious output in setupssh 2026-10-28 15:19:35 -04:00
Jarrod Johnson 8864030a76 Implement advisory rate limiting for ssh certificate signing requests 2026-10-28 13:18:55 -04:00
Jarrod Johnson 1777c80969 Add retry to image fetch 2026-10-21 08:54:51 -04:00
Jarrod Johnson edaf55ba62 Try to scope DNS to interfaces if possible
netplan and NetworkManager both scope dns to interface.

In certain cases, it can really mean it, so try to match the nameservers to the appropriate interface,
falling back to adding to every interface with a gateway.
2026-10-02 10:44:26 -04:00
Jarrod Johnson c72821cdfa Restore genesis specific functions
Common functions depend on curl, but genesis cannot
2026-09-23 10:45:37 -04:00
Jarrod Johnson 69b0b8462f Fixes for ARM genesis
Do not autocons if we have ttyAMA0

Make sure to use the proper architecture for addons.
2026-09-23 10:41:28 -04:00
Jarrod Johnson fc1790ed80 Fix failing to reference converted LVM name 2026-09-11 10:23:38 -04:00
Jarrod Johnson e5b3b8ce65 Merge pull request #298 from Obihoernchen/fix/suse15-setupssh-chmod
Fix the chmod typo in the SUSE 15 ssh setup
2026-09-09 08:31:02 -04:00
Markus Hilger 399ce08680 Stop loading InfiniBand modules the SUSE 16 media lacks
This reverts commit be6c7a3794.

They do not exist in Leap/SLE 16 installer initrd.
The diskless hook keeps its copies. imgutil's installkernel instmods
all four, so they are in that image and the calls do work there.
2026-09-08 16:03:13 +02:00
Markus Hilger d7a25a9933 Use dhcpcd for SUSE 16 diskless
SLES 16 ships no ISC dhclient and nothing provides dhcp-client, so the
image could not be built from SLES media at all. Leap carries dhcpcd
too, so one client covers both. el10 made the same move when RHEL
dropped dhclient.
2026-09-07 07:07:03 +02:00
Markus Hilger edf98e3177 Lock root on SUSE 16 when no password is set
The deploycfg carries the literal 'null', which went into the profile as
a password hash, so the installed root account reported a usable
password instead of a locked one. 15 substitutes '!' for this; the sed
delimiter has to move off '!' to carry it.
2026-09-07 06:14:54 +02:00
Markus Hilger 2e0323e333 Run the SUSE 16 firstboot service only once
15 got this from AutoYaST init-scripts. 16 enables its own unit, so it
has to disable it the way el8 and the diskless profiles do.
2026-09-07 06:14:54 +02:00
Markus Hilger 20563d3c3a Apply installedargs on SUSE 16
Every other profile feeds it to the bootloader; agama takes it as
bootloader.extraKernelParams.
2026-09-07 06:14:54 +02:00
Markus Hilger f742626226 Stop the SUSE 16 install when agama rejects the config
The default Etc/UTC is not in the tzdata list agama validates against,
so the load failed and the install fell through to agama defaults and
still reported completion. Normalize it and halt if the load fails.
2026-09-07 06:14:54 +02:00
Markus Hilger f3ea32bcd3 Say autoinstall where the SUSE 16 pre script means it
The comment came from 15, which rewrote an autoyast profile.
2026-09-07 06:14:54 +02:00
Markus Hilger 571076b211 Always netboot the SUSE 16 installer
The attached-media branch could never be taken: the label pattern built
from os-release is opensuse-leap-16.0 or sles-16.0, while the media is
labelled Install-Leap-16.0-x86_64 and Install-SUSE-SLE-16-x86_64. Had it
matched, it would have written an inst.repo to the dracut cmdline that
agama does not read, and skipped inst.script entirely.
2026-09-07 06:14:54 +02:00
Markus Hilger 6cd3805058 Drop the EL vendor names from the SUSE 16 hook
Neither Oracle nor Red Hat can be the first word of a SUSE PRETTY_NAME.
2026-09-07 06:14:54 +02:00
Markus Hilger a0cd0ac5f2 Verify the deploy server when registering a SUSE 16 node
The -k made the --capath on the same line pointless. el8 makes the
identical call without it.
2026-09-07 06:14:54 +02:00
Markus Hilger be6c7a3794 Load the InfiniBand modules for SUSE 16 installs
They stayed commented out when the hook was forked from el8, so an
IPoIB-only node had no path to the deploy server. The diskless hook
loads them already.
2026-09-07 06:14:54 +02:00
Markus Hilger 9e8fc106a1 Drop the anaconda leftovers from the SUSE 16 hook
agama takes inst.install_url and inst.script, set just above.
2026-09-07 06:14:54 +02:00
Markus Hilger 737c761be2 Set up hostbased ssh on installed SUSE 16 systems
prechroot.sh had setupssh.sh commented out and copied only the keys
inline, so nodes came up without shosts.equiv, without the CA in
ssh_known_hosts and without a setuid ssh-keysign.
2026-09-07 06:14:54 +02:00
Markus Hilger ace72d428a Ship the syncfiles template for SUSE 16
post.sh runs syncfileclient, but there was no template to edit.
2026-09-07 06:14:54 +02:00
Markus Hilger 6a77e91bf9 Give SUSE 16 the customization hooks SUSE 15 has
firstboot.custom and the empty pre.d, post.d, firstboot.d and ansible
directories were left out, so the documented drop-in points did not exist.
2026-09-07 06:14:54 +02:00
Markus Hilger fd9bdc00c3 Ship the post.custom stub for SUSE 16
post.sh already runs it, so every install logged a 404 for it.
2026-09-07 06:14:54 +02:00
Markus Hilger 2634c582e7 Fix the chmod typo in the SUSE 15 ssh setup
'chmd' left the mode of the installed root authorized_keys to whatever cp
gave it, and put a command not found in every install log.
2026-09-07 02:40:43 +02:00
Markus Hilger 939a46d8d1 Fix SUSE 16 diskless boot 2026-09-05 02:12:18 +02:00
Markus Hilger 9dd5802698 Fill in the spots the SUSE 16 work missed
- the aarch64 osdeploy spec builds the stateful suse16 addons but its
  diskless loop was never extended, so the aarch64 rpm shipped suse16
  without suse16-diskless and a packed image got a dangling addons.cpio.
- imgutil's builddeb keeps its own copy of the directory list that
  confluent_imgutil.spec.tmpl has, and it had learned about neither suse16
  nor el10.
- gather_bootloader gained a /usr/share/efi fallback for shim on both
  architectures but only for x86_64 on grub, so an aarch64 root found a
  shim and then died copying grub.

Finally, rewriting repos.d file by file rather than copying the tree meant
a subdirectory or a file that is not valid UTF-8 aborted the build before
any package was installed, which also regressed SUSE 15. Pass anything
that is not a plain text repo definition through untouched and restore the
modes on the ones that are rewritten.
2026-09-05 02:12:18 +02:00
Markus Hilger 398211a6ed Support diskless boot on SUSE 16
Ported from suse15-diskless, with the differences 16 forces:

- dracut symlinks /lib/dracut/hooks to /var/lib/dracut/hooks, so a hook
  shipped at the old path replaces the symlink with a directory
- there is no netconfig or /etc/sysconfig/network to hand the running
  address to, so the initramfs writes a NetworkManager keyfile instead.
  Without it NetworkManager claims the interface on its own terms and the
  tethered root filesystem goes away with the old address, and confignet
  never gets the chance to refine anything
- the discovery loop retries without a delay, so a link that takes a
  moment to come up can exhaust all 30 tries before the first packet can
  go anywhere. Keep asking, as the el9 hook already does
2026-09-05 02:11:53 +02:00
Markus Hilger b5e24333ce Add the missing suse16 profile.yaml
Without it osdeploy import cannot generate a profile at all:
generate_stock_profiles opens profile.yaml unguarded, and initprofile.sh
seds the label into it. The label substitution also still looked for
'sle 15'.
2026-09-05 02:11:53 +02:00
Jarrod Johnson 8fcb5aec9a Avoid exiting on tail failure
tail can fail in certain scenarios.  Switch to wait if that should occur.
2026-09-04 08:39:05 -04:00