2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-12-01 14:52:20 +00:00
Commit Graph

1315 Commits

Author SHA1 Message Date
Jarrod Johnson f7048f019f Merge pull request #409 from Obihoernchen/doc/include-syntax
Document include syntax for package lists and syncfiles
2026-11-27 16:51:06 -05:00
Jarrod Johnson eabbb3a6c3 Merge pull request #417 from Obihoernchen/fix/quiet-ib-modprobe
Quietly probe optional InfiniBand modules at boot
2026-11-27 16:47:34 -05:00
Jarrod Johnson b316b61776 Merge pull request #416 from Obihoernchen/fix/zram-xfs-pagesize
Use page sized XFS blocks for the zram diskless root
2026-11-27 16:47:14 -05:00
Markus Hilger e394e63cd2 Quietly probe optional InfiniBand modules at boot
The initramfs scripts try to load ib_ipoib, ib_umad, hfi1 and mlx5_ib
unconditionally. Kernels that do not ship one of them, such as hfi1 on
aarch64, print a FATAL modprobe error on the console during
'Loading drivers...'. Use modprobe -q so missing optional modules are
skipped silently.
2026-11-27 19:33:22 +01:00
Markus Hilger 3b2e2ceae8 Use page sized XFS blocks for the zram diskless root
On kernels with pages larger than 4k, such as the RHEL 10 aarch64
kernel-64k, zram never completes a discard that covers only part of a
page. XFS with 4k blocks issues such discards with -o discard, and the
diskless boot hangs in update-ca-trust. Fixed upstream in
https://git.kernel.org/torvalds/c/e3668b371329

zram reports the page size as its physical block size. Using it as the
XFS block size keeps every discard page aligned. Kernels with 4k pages
keep 4k blocks.

Fixes #414
2026-11-27 17:46:59 +01:00
Markus Hilger 5f6fdc97e5 Provide tls-ca-bundle.pem in EL diskless initramfs
libcurl 8.12.1-6 in EL 10.3 (RHEL-56966) changed its built-in CA
bundle from /etc/pki/tls/certs/ca-bundle.crt to
/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem. The diskless
initramfs carries no ca-certificates content and the hook only wrote
ca-bundle.crt, so every HTTPS request in the initramfs failed
verification, functions came back empty and boot stopped with
"source_remote: command not found".

Write the deployment CA to tls-ca-bundle.pem and point ca-bundle.crt
at it, the same layout ca-certificates uses, so both old and new
libcurl builds find it.
2026-11-26 16:26:51 +01:00
Markus Hilger 64470862f9 Document include syntax for package lists and syncfiles
A <file> entry in an imgutil package list or a syncfiles file includes
another file, relative to the including file unless absolute. Describe
this in the imgutil and nodeapply man pages and add commented examples
to the default pkglist and syncfiles files.
2026-11-25 16:46:00 +01:00
Jarrod Johnson efd7be193c Merge pull request #401 from Obihoernchen/fix/debian-preseed-multivalue
debian: Pass multiple nameservers and ntp servers correctly to d-i
2026-11-20 08:20:03 -05:00
Jarrod Johnson a8abdf0fe7 Merge pull request #400 from Obihoernchen/fix/debian-routed-deploy
debian: Support confluent= for routed debian deployment
2026-11-20 08:17:49 -05:00
Jarrod Johnson 9e5e18c606 Merge pull request #402 from Obihoernchen/fix/debian-single-installer
debian: Ship /preseed.cfg in the debian installer addons
2026-11-20 07:54:14 -05:00
Markus Hilger c4eb02e0e7 Preseed an empty domain when dns.domain is unset
Without dns.domain the d-i startup set no netcfg/get_domain, so a static
network install stopped at the interactive domain name prompt. A cleared
dns.domain reaches deploycfg as '' rather than null and was preseeded
literally, giving c1.'' as the host name and search ''.
2026-11-20 13:37:08 +01:00
Markus Hilger 999027062c Ship /preseed.cfg in the debian installer addons
reopen-console decides before the startup scripts run whether d-i is
preseeded, by looking for /preseed.cfg or auto/url on the command line.
S25confluentinit only creates /preseed.cfg later, so d-i started on every
console (ttyS0 and tty1) and the parallel installers raced, e.g. anna
reported no kernel modules while the other instance downloaded them.
2026-11-20 13:27:51 +01:00
Markus Hilger b1e33a9307 Pass multiple nameservers and ntp servers correctly to d-i
The nameserver and ntp loops quoted their list, so they ran once with
all servers in one word. Unquoted in setdebopt, that split into extra
arguments: debconf got only the first server and the preseed line got
the second server where the type belongs. Set the nameservers as one
space separated string, use the first ntp server (clock-setup takes
one) and quote the setdebopt arguments.
2026-11-20 12:52:03 +01:00
Markus Hilger e1e831771b Support confluent= for routed debian deployment
The debian installer startup only located the deployment server through
SSDP multicast, which does not cross a router. With DHCP relay the node
got a lease and then looped forever. Identify the node through
self/whoami on the server given by confluent=, as the other profiles do,
and fall back to SSDP if that fails.
2026-11-20 12:52:03 +01:00
Markus Hilger dd13f1c619 Fix DHCP identity image and dhcp netcfg checks in d-i startup
The identity image DHCP branch tested an unset variable, so it never ran,
and its udhcpc call would not have worked (no -i, no -q/-n) nor recorded
the interface. Probe each link like the static branch does. The deploycfg
dhcp check also misspelled v4cfgmeth.
2026-11-20 12:50:01 +01:00
Markus Hilger 4848ef3c15 Tolerate missing DSA host keys when initializing ssh
Newer OpenSSH no longer generates DSA host keys, so ssh-keygen -A
leaves none behind and the unconditional rm printed an error during
genesis boot and el8 installs.
2026-11-19 23:07:54 +01:00
Jarrod Johnson 5c9bbf0da5 Fully rework suse15 to use bash 2026-11-19 16:47:05 -05:00
Jarrod Johnson c5319017c2 Actually change all suse scripts to bash 2026-11-19 16:09:38 -05:00
Jarrod Johnson 06698cb97e Have suse use bash for pre.sh
Change to do myattribs depends on bash specific syntax
2026-11-19 15:54:36 -05:00
Markus Hilger d4bea73868 Apply profile installedargs when installing a diskless image to disk
The installedargs of profile.yaml only reached systems installed by an
OS installer. A diskless image written to disk with installtodisk got
none of them, and keeps from the network boot only console=,
net.ifnames=, biosdevname= and quiet, so arguments meant for the
installed system had to be baked into the image.

image2disk.py now fetches the profile.yaml of the deployment and adds
its installedargs before deployment.installedargs, in the same places.
An argument the image already has, as when it was captured from a node
installed this way, is kept once, in its last position, so the node
arguments still come last, and a profile.yaml that cannot be read only
skips the profile arguments instead of failing the install.
2026-11-18 23:44:04 +01:00
Markus Hilger 903a9f2c9a Add deployment.installedargs for per-node installed kernel arguments
Kernel arguments for the installed OS could only be set per profile,
with installedargs in profile.yaml. deployment.installedargs sets them
per node or group, appended after the ones of the profile.

The deploycfg served to the node carries the value as installedargs,
and the installers add it wherever they add the profile installedargs:
the kickstart bootloader line on EL and RHVH, the AutoYaST and Agama
bootloader settings on SUSE, and GRUB_CMDLINE_LINUX on Debian and
Ubuntu. Diskless images installed to disk add it to GRUB_CMDLINE_LINUX,
and on EL9 and EL10 also to /etc/kernel/cmdline and the boot loader
entries.

deploycfg is no longer wrapped at 80 columns, since the scripts read
each value from its single line.
2026-11-18 23:44:04 +01:00
Jarrod Johnson 7662955a98 Merge pull request #390 from Obihoernchen/fix/profile-installedargs
Fix profile installedargs on Debian, Ubuntu and SUSE 16
2026-11-17 13:43:20 -05:00
Jarrod Johnson 7d27b13f16 Merge pull request #389 from Obihoernchen/fix/image2disk-grub-lvm-names
Name the created volumes in the grub defaults of an image install
2026-11-17 13:42:07 -05:00
Jarrod Johnson 8470f1d155 Merge pull request #388 from Obihoernchen/fix/suse16-profile-label
Label the SUSE 16 profile as the default profile
2026-11-17 13:41:27 -05:00
Markus Hilger 52ae9c9e16 Fix profile installedargs on Debian, Ubuntu and SUSE
On Debian and Ubuntu 18.04 the installedargs line of profile.yaml was
added to GRUB_CMDLINE_LINUX with its "installedargs:" key still in
front, and update-grub was not run for it, so the arguments only took
effect with a later grub update, as a broken first argument.

All Debian and Ubuntu profiles also put the arguments into a sed
replacement unescaped, so an argument containing a slash, such as
rd.lvm.lv=vg/root, made sed fail and left the grub defaults unchanged.

SUSE 16 put the arguments into a JSON string unescaped, so an argument
containing a double quote or backslash produced an invalid
autoinstall.json, and one containing "!" or "&" broke the sed command
that fills it in.

SUSE 15 put them into the AutoYaST XML unescaped, so an argument
containing "&" or "<" made the whole profile invalid and stopped the
install.
2026-11-17 19:03:50 +01:00
Markus Hilger e9e83635ee Name the created volumes in the grub defaults of an image install
When the image has no /etc/default/grub, as images built by imgutil do
not, installing it to disk on EL9 and EL10 wrote one with
rd.lvm.lv=vg/root rd.lvm.lv=vg/swap, volumes that do not exist. A
missing /etc/kernel/cmdline likewise got root=/dev/mapper/localstorage-root,
which is wrong for an install without LVM or with a volume group named
after the node. The boot loader entries were rewritten correctly, so
the first boot worked, but grub2-mkconfig --update-bls-cmdline or a new
kernel would take the wrong names from these files.

Both defaults now name the root device and the logical volumes for root
and swap that the install created.
2026-11-17 16:53:10 +01:00
Robert Caliman 1e8c4a88c3 Add support for SLES 16 deployed from a multi NIC server 2026-11-17 17:14:12 +02:00
Markus Hilger f05ef810c1 Label the SUSE 16 profile as the default profile
Every other OS labels its stock profile "(Default Profile)", including
SUSE 15, whose server profile also has the directory name server. SUSE
16 said "(Server Profile)" instead.
2026-11-17 16:05:04 +01: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
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
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
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
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
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
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 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
Jarrod Johnson b59d8b24c0 Have NetworkManager run if not already enabled 2026-11-04 12:40:31 -05:00
Jarrod Johnson aa85c1a8bb Fix up some issues in suse leap 16 diskless boot 2026-11-04 12:33:09 -05:00
Jarrod Johnson dbdb9e062e Fix 'grep true' error in suse boots 2026-11-04 11:48:45 -05:00
Markus Hilger fc63269dc7 Give every deployed node its own machine-id
Captured images carried the machine-id of the source system, and images
built with imgutil carry the one generated in the build root, so every
node deployed from a profile shared it. That breaks anything keyed on it,
such as DHCP DUIDs and journal identities.

Capture now stores an empty /etc/machine-id. Diskless boot on EL and SUSE
writes a stable per-node one derived from the node name and the DMI
product UUID, as Ubuntu already does, using openssl since the initramfs
has no sha512sum. Install to disk copies that machine-id into the target
and renames the boot loader entries from the image to it. Otherwise
kernel-install in post.sh adds a second set of entries under another ID.
2026-11-04 15:06:58 +01:00
Jarrod Johnson afc96a66e4 Merge pull request #366 from Obihoernchen/fix/ubuntu-install-fixes
Fix Ubuntu install to disk and installedargs
2026-11-04 08:28:59 -05:00
Jarrod Johnson 1f0202b68c Merge pull request #362 from Obihoernchen/fix/capture-optional-lvm
Make lvm optional for capture
2026-11-04 08:06:41 -05:00
Jarrod Johnson ae4bbe5300 Merge pull request #361 from Obihoernchen/fix/image2disk-localstorage-recapture
Fix install to disk of recaptured localstorage LVM nodes
2026-11-04 08:05:52 -05:00
Jarrod Johnson f31305ab7b Merge pull request #360 from Obihoernchen/fix/image2disk-partition-overflow
Fix install to disk of images with plain partitions
2026-11-04 08:05:06 -05:00
Markus Hilger 244f75b0b2 Pass maxsplit to re.split as a keyword
ruff B034 flags the positional maxsplit argument.
2026-11-03 22:03:31 +01:00