2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-08-03 16:07:00 +00:00
Commit Graph

1142 Commits

Author SHA1 Message Date
Jarrod Johnson d7dcb07a3f Implement deployment.storage
This is an attribute for a node to indicate preferences for storage.

For now, 'm2' policy will hit m.2 and mirroring kits.
2026-07-28 15:02:27 -04:00
Jarrod Johnson 3501f70c37 Merge pull request #247 from Obihoernchen/unsquashfs
Use multi-threaded unsquashfs to extract untethered images
2026-07-28 08:59:38 -04:00
Markus Hilger 67e84f15f8 Keep the root filesystem guard reachable when extraction fails
source_remote imageboot.sh is the last thing the diskless cmdline hook
runs, so returning early on a failed extraction ended the hook and left
dracut to time out. Falling through instead reaches the existing
/sysroot/sbin/init guard, which reports the failure and holds the node so
it stays reachable over ssh, as it did before extraction was checked.
2026-07-28 01:49:38 +02:00
Markus Hilger d9da502fbe Copy LICENSE into confluent_osdeploy before leaving the directory
The copy ran after the cd to the repo root, so it read ../LICENSE from
outside the checkout and never placed the file in confluent_osdeploy/. The
tarball went out without it and the spec's %install, which does
"cp LICENSE" after %setup cds into the unpacked directory, failed.
imgutil/buildrpm already copies before its cd; do the same here.

The aarch64 spec has its LICENSE lines commented out, so only the x86_64
build broke, but the copy was equally wrong in both scripts.
2026-07-27 20:19:39 +02:00
Markus Hilger a9d7b67929 Derive build versions from a tracked VERSION file
Release tags do not live on master: 3.15.2 through 3.15.6 were tagged on branch
3.15, so git describe reaches only 3.15.1 and dev builds were stamped
3.15.2.dev<n>. Besides being confusing, rpm and dpkg both rank the released
3.15.6 above that, so a dev package will not install over a released one.

Add a top-level VERSION file naming the release the branch is working toward
(4.0.0 on master) and a mkversion helper that stamps packages from it, keeping
the tag-derived value as a floor so a forgotten bump cannot go backwards.
mkversion also replaces the block copy-pasted into seven build scripts, and
makesetup no longer writes a per-package VERSION file, so the stale checked-in
confluent_common/VERSION goes with it.
2026-07-27 20:06:22 +02:00
Jarrod Johnson b3b16c6497 Do not fail on inability to do REUSEPORT 2026-07-24 11:52:41 -04:00
Jarrod Johnson 61e0524a56 Some fixup of SELinux contexts for EL10 diskless boot
Unfortunately, the problem of urlmount's selinux context is left open.

urlmount starts before policy load, preventing transition.

However the policy blocks access urlmount needs when loaded.
2026-07-23 15:58:07 -04:00
Jarrod Johnson 5136b95cde Adjust to EL10 grub stub cfg
The syntax changed, make the code more adaptive to a variety of situations.
2026-07-20 17:11:19 -04:00
Jarrod Johnson 9dfb3ea42b Merge pull request #250 from Obihoernchen/stateless-booted-status
Report stateless boot completion via new 'booted' status
2026-07-20 12:55:55 -04:00
Markus Hilger 9101b07d54 Report stateless boot completion via new 'booted' status
Diskless profiles had the updatestatus callback in onboot.sh commented
out because no suitable status existed: 'complete' clears
deployment.pendingprofile, which the PXE responder requires to answer
the next network boot of a diskless node.

Add a 'booted' status that records the pending profile as
deployment.profile while leaving pendingprofile armed and skipping
autolock, and enable the onboot.sh callback in all diskless profiles.
nodedeploy now shows 'pending: <profile> (booted)' for a running
stateless node.
2026-07-20 15:59:30 +02:00
Markus Hilger 73c5b9cebf Comment out the MERGE statement in syncfiles
It's confusing for users to have this enabled by default.
This should be opt-in as everything else.
2026-07-18 03:40:48 +02:00
Jarrod Johnson 12ef3fc529 Merge pull request #245 from Obihoernchen/selinux
SELinux label diskless runtime files on EL
2026-07-16 20:10:43 -04:00
Markus Hilger b6fb58b31f Skip add_local_repositories if no imgutil build --source is set
BUILDSRC is only set if imgutil build is run with --source, otherwise
the build host repos are used. If --source is not used, there is no
distribution symlink and add_local_repositores failed with 404.
Check if BUILDSRC is set and skip add_local_repositories if this is the
case.
2026-07-17 00:06:57 +02:00
Markus Hilger cfc4490fe1 Use multi-threaded unsquashfs to extract untethered images
`unsquashfs` can use multiple CPU cores during image extraction, significantly reducing boot time.
For example the whole boot time from PXE to shell on a 8-core VM, from approximately 45 seconds to 20 seconds.

This PR adds `squashfs-tools` as a dependency. Since the package is smaller than 1 MB, the additional image size is justified by the performance improvement.

For backward compatibility, the existing `cp`-based extraction method is used when `unsquashfs` is unavailable, such as with images built before this change.

The extraction logic has also been moved into the common functions and is now shared between EL9, EL10, and Ubuntu.

Both untethered `squashfs` images and `confluent_multisquash` images are supported.

Images must be rebuilt to include `unsquashfs` and benefit from the faster extraction path.
2026-07-16 21:24:58 +02:00
Markus Hilger c3c4805f9d SELinux label diskless runtime files on EL
Centralize the SELinux chcon helper and use it for downloaded
systemd units, onboot hooks, and apiclient files across EL7 through EL10.
Include chcon in captured EL initramfs images.

Without this fix the onboot services failed to start on SELinux enabled
captured image.
2026-07-16 19:52:52 +02:00
Markus Hilger fa605160e0 Merge branch 'master' into ci 2026-07-14 17:04:16 +02:00
Jarrod Johnson 53172f760f Have the priority models brought out and more documented 2026-07-14 08:30:34 -04:00
Markus Hilger ab6eeb3ced Merge branch 'master' into ruff 2026-07-14 05:28:53 +02:00
Markus Hilger 2af402b13c ruff auto fixes
Apply ruff's safe autofixes.
The changes are mechanical and behaviour-preserving. Issues fixed:

- F401: remove unused imports.
- F841: drop unused local variables and assignments, including discarded
  await/return values, unused "except ... as e" bindings, and unused
  "with ... as name" targets.
- F541: remove the f prefix from f-strings that contain no placeholders.
- E711: compare against None with "is"/"is not" instead of "=="/"!=".
- E712: test truthiness directly instead of comparing to True.
- E713: use "x not in y" instead of "not x in y".
- E714: use "is not" instead of "not ... is".
- E731: convert lambdas bound to a name into def statements.
- W291/W293: trim trailing whitespace on touched lines.
2026-07-14 05:03:58 +02:00
Markus Hilger 69a6714108 Use raw string notation to fix python compile warnings
E.g.: SyntaxError: "\d" is an invalid escape sequence. Did you mean "\\d"? A raw string is also an option.
2026-07-14 01:26:19 +02:00
Jarrod Johnson 6bdd44ffcf Merge pull request #234 from Obihoernchen/netsettings
Add net.extra_settings for passthrough network settings
2026-07-13 08:45:23 -04:00
Markus Hilger 6d606f37f6 Fix Shellcheck errors
Fix SC2045 (error): Iterating over ls output is fragile. Use globs.

Add exception SC2068 exception for confluent_client/confluent_env.sh as this is intended.
SC2068 (error): Double quote array expansions to avoid re-splitting elements.
2026-07-13 05:34:12 +02:00
Markus Hilger 2f006e507f Add net.extra_settings for passthrough network settings
Allow arbitrary per-connection network settings, such as static routes
or a firewalld zone, to be specified as semicolon-delimited key=value
pairs on a net.*.extra_settings attribute. The keys are passed through
to the network backend of the deployed OS in its native syntax: nmcli
properties on NetworkManager systems, netplan YAML paths on netplan
systems, and ifcfg variables on wicked systems.
2026-07-11 20:46:46 +02:00
Jarrod Johnson 263953fc1e Remove nuisance autoncons output when empty
If no serial console detected, don't bother mentioning it.
2026-07-09 14:22:12 -04:00
Jarrod Johnson 5f34fac2bc confluent_nodename variable might not survive to imageboot
Pull it from the confluent.info file.
2026-07-09 14:13:12 -04:00
Jarrod Johnson 0a14e019d0 Skip suse16 diskless for now 2026-07-09 10:47:55 -04:00
Markus Hilger dba2af71c7 Match Apache-2.0 license name with SPDX expressions
For EPEL the official SPDX license expressions have to be used.
Check:

- https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
- https://spdx.org/licenses/
- https://docs.fedoraproject.org/en-US/legal/allowed-licenses/
2026-07-07 21:08:43 +02:00
Jarrod Johnson 1feec98edf Ensure install interface comes up in firstboot 2026-07-02 17:51:56 -04:00
Markus Hilger 7727cd86fc Fix typos in help text, errors, and log messages 2026-07-02 22:07:27 +02:00
Jarrod Johnson f6d7a47140 Successfully indicate install_url and TLS setup
While curl and agama download are happy with the CA bundle, zypper was not.  Have pre.sh properly set up the CA certs.

Additionally, indicate the install subdirectory of the repository to agama via it's cmdline conf.
2026-07-02 14:57:26 -04:00
Jarrod Johnson a41e20b1ab Place install_url into agama configuration 2026-07-02 10:19:26 -04:00
Jarrod Johnson 97e0f4d253 Rework autoconsole logic
Match autocons

Skip unless EFI x86_64.

If SPCR, trust it and use that unconditionally.

Otherwise, if only one can respond to TIOCMGET, then use that one.

If multiple can respond, but exactly one shows carrier, use that.
2026-06-25 16:41:14 -04:00
Jarrod Johnson e748a97eae Only count copernicus replies that have OK status 2026-06-25 15:08:23 -04:00
Jarrod Johnson 7845376eaf Fix debian deployment on slow network link up
When network link was slow to establish, it would fall right through
the network initilalization code.

Now keep working it until a result is acheived.
2026-06-25 08:36:37 -04:00
Jarrod Johnson 8fdf3a9abe Do not set 0.0.0.0 gateway 2026-06-24 15:58:45 -04:00
Jarrod Johnson 701a9a7268 Adjustments for Suse 16.1 beta 2026-06-22 09:59:40 -04:00
Jarrod Johnson a117aace05 Fix suse16 firstboot behavior 2026-06-16 16:37:31 -04:00
Jarrod Johnson b89cba1643 Fix non-bonding configuration of ubuntu 2026-06-16 12:41:30 -04:00
Jarrod Johnson 8f2b044cc9 Make SUSE16 support adaptive to SLES/Leap 2026-06-16 10:49:14 -04:00
Jarrod Johnson 1afba4ecaa Add initprofile for suse profiles 2026-06-15 14:13:09 -04:00
Jarrod Johnson 0b6e5fa63e More work on SUSE16 deployment 2026-06-15 14:04:35 -04:00
Jarrod Johnson af84c6c45b Further implement SUSE16 deployment 2026-06-12 16:51:46 -04:00
Jarrod Johnson 8b5147a321 Actually put the common copy of functions in 2026-06-12 16:17:34 -04:00
Jarrod Johnson 0645788b0d Rework functions to be common file 2026-06-12 16:06:06 -04:00
Jarrod Johnson c33a9730f2 Iterate SUSE16 deployment support 2026-06-12 15:30:12 -04:00
Jarrod Johnson f58cc7d984 Fix sed invocation with slashes in the value 2026-06-12 14:08:51 -04:00
Jarrod Johnson 7ddd18391d Commence work on autoinstall scripts for SUSE16 2026-06-12 13:29:29 -04:00
Jarrod Johnson 1fc1f47e00 Preserve a breadcrumb to indicate autocons results to live env 2026-06-12 08:10:32 -04:00
Jarrod Johnson 1042404a38 Move getinstalldisk for all the Linux into a common place
esxi is the only one with a different version
2026-06-12 07:45:41 -04:00
Jarrod Johnson 033b2e4e3f Make it possible for a common script to be superseded by a profile specific script 2026-06-12 07:43:11 -04:00