From ce8531375af781c52e225f7a1ca78326a7a52021 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 31 Oct 2025 09:45:59 -0400 Subject: [PATCH 1/4] Update to handle newer XCC2 firmware --- confluent_server/confluent/discovery/handlers/xcc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/discovery/handlers/xcc.py b/confluent_server/confluent/discovery/handlers/xcc.py index a0846187..b39574d5 100644 --- a/confluent_server/confluent/discovery/handlers/xcc.py +++ b/confluent_server/confluent/discovery/handlers/xcc.py @@ -490,7 +490,7 @@ class NodeHandler(immhandler.NodeHandler): {'UserName': username}, method='PATCH') if status != 200: rsp = json.loads(rsp) - if rsp.get('error', {}).get('code', 'Unknown') in ('Base.1.8.GeneralError', 'Base.1.12.GeneralError', 'Base.1.14.GeneralError', 'Base.1.18.GeneralError'): + if rsp.get('error', {}).get('code', 'Unknown') in ('Base.1.8.GeneralError', 'Base.1.12.GeneralError', 'Base.1.14.GeneralError', 'Base.1.18.GeneralError', 'Base.1.21.GeneralError'): if tries: eventlet.sleep(4) elif tmpaccount: @@ -522,7 +522,7 @@ class NodeHandler(immhandler.NodeHandler): if userent['users_user_name'] == user: curruser = userent break - if curruser.get('users_pass_is_sha256', 0): + if curruser and curruser.get('users_pass_is_sha256', 0): self._wc = None wc = self.wc nwc = wc.dupe() From d2d77ab1d5bd14208004760be9c115f49c202086 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 7 Nov 2025 13:22:21 -0500 Subject: [PATCH 2/4] Do not let diskless.conf persist into EL9 diskless images It fouls run of kdump building the kdump image. --- .../el9-diskless/profiles/default/scripts/imageboot.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/confluent_osdeploy/el9-diskless/profiles/default/scripts/imageboot.sh b/confluent_osdeploy/el9-diskless/profiles/default/scripts/imageboot.sh index 7b340d2c..544cb366 100644 --- a/confluent_osdeploy/el9-diskless/profiles/default/scripts/imageboot.sh +++ b/confluent_osdeploy/el9-diskless/profiles/default/scripts/imageboot.sh @@ -129,6 +129,7 @@ mv /lib/modules/$(uname -r) /lib/modules/$(uname -r)-ramfs ln -s /sysroot/lib/modules/$(uname -r) /lib/modules/ mv /lib/firmware /lib/firmware-ramfs ln -s /sysroot/lib/firmware /lib/firmware +rm -f /sysroot/etc/dracut.conf.d/diskless.conf # remove diskless dracut from runtime, to make kdump happier kill $(grep -l ^/usr/lib/systemd/systemd-udevd /proc/*/cmdline|cut -d/ -f 3) if grep debugssh /proc/cmdline >& /dev/null; then exec /opt/confluent/bin/start_root From 75e7b9040ba9f44a4bff7152d9b56e066854f5c7 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 25 Nov 2025 13:19:03 -0500 Subject: [PATCH 3/4] Add more imgutil documentation --- confluent_client/doc/man/imgutil.ronn | 139 ++++++++++++++++++++++++++ imgutil/imgutil | 2 +- 2 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 confluent_client/doc/man/imgutil.ronn diff --git a/confluent_client/doc/man/imgutil.ronn b/confluent_client/doc/man/imgutil.ronn new file mode 100644 index 00000000..939cef09 --- /dev/null +++ b/confluent_client/doc/man/imgutil.ronn @@ -0,0 +1,139 @@ +# imgutil(1) -- Work with confluent OS cloning and diskless images + +## SYNOPSIS + +`imgutil` `build` [] +`imgutil` `exec` [] [...] +`imgutil` `unpack` +`imgutil` `pack` [] +`imgutil` `capture` + +## DESCRIPTION + +**imgutil** is a utility for creating, managing, and deploying OS images for diskless boot and system cloning in a Confluent environment. It supports building images from scratch, capturing images from running systems, and packing/unpacking diskless profiles. + +## COMMANDS + +* `build`: + Build a new diskless image from scratch in the specified scratch directory. + +* `exec`: + Start the specified scratch directory as a container and optionally run a command inside it. + +* `unpack`: + Unpack a diskless image profile to a scratch directory for modification. + +* `pack`: + Pack a scratch directory into a diskless profile that can be deployed. + +* `capture`: + Capture an image for cloning from a running system. + +## BUILD OPTIONS + +* `-r`, `--addrepos` : + Repositories to add in addition to the main source. May be specified multiple times. + +* `-p`, `--packagelist` : + Filename of package list to replace default pkglist. + +* `-a`, `--addpackagelist` : + A list of additional packages to include. May be specified multiple times. + +* `-s`, `--source` : + Directory to pull installation from, typically a subdirectory of `/var/lib/confluent/distributions`. By default, the repositories for the build system are used. For Ubuntu, this is not supported; the build system repositories are always used. + +* `-y`, `--non-interactive`: + Avoid prompting for confirmation. + +* `-v`, `--volume` : + Directory to make available in the build environment. `-v /` will cause it to be mounted in image as `/run/external/`. `-v /:/run/root` will override the target to be `/run/root`. Something like `/var/lib/repository:-` will cause it to mount to the identical path inside the image. May be specified multiple times. + +* : + Directory to build new diskless root in. + +## EXEC OPTIONS + +* `-v`, `--volume` : + Directory to make available in the build environment. `-v /` will cause it to be mounted in image as `/run/external/`. `-v /:/run/root` will override the target to be `/run/root`. May be specified multiple times. + +* : + Directory of an unpacked diskless root. + +* : + Optional command to run (defaults to a shell). + +## UNPACK OPTIONS + +* : + The diskless OS profile to unpack. + +* : + Directory to extract diskless root to. + +## PACK OPTIONS + +* `-b`, `--baseprofile` : + Profile to copy extra info from. For example, to make a new version of an existing profile, reference the previous one as baseprofile. + +* `-u`, `--unencrypted`: + Pack an unencrypted image rather than encrypting. + +* : + Directory containing diskless root. + +* : + The desired diskless OS profile name to pack the root into. + +## CAPTURE OPTIONS + +* : + Node to capture image from. + +* : + Profile name for captured image. + +## EXAMPLES + +Build a diskless image from a distribution: + + imgutil build -s alma-9.6-x86_64 /tmp/myimage + +Execute a shell in an unpacked image: + + imgutil exec /tmp/myimage + +Execute a specific command in an image: + + imgutil exec /tmp/myimage /bin/rpm -qa + +Unpack an existing profile for modification: + + imgutil unpack myprofile /tmp/myimage + +Pack a modified image into a new profile: + + imgutil pack /tmp/myimage myprofile-v2 + +Capture an image from a running node: + + imgutil capture node01 production-image + +## FILES + +* `/var/lib/confluent/public/os/`: + Default location for OS profiles. + +* `/var/lib/confluent/private/os/`: + Location for encrypted image keys and private data. + +* `/var/lib/confluent/distributions/`: + Default location for installation sources. + +## SEE ALSO + +osdeploy(8) + +## AUTHOR + +Written for the Confluent project. diff --git a/imgutil/imgutil b/imgutil/imgutil index 6ecc7295..0c44d8ee 100644 --- a/imgutil/imgutil +++ b/imgutil/imgutil @@ -894,7 +894,7 @@ def main(): buildp.add_argument('-p', '--packagelist', help='Filename of package list to replace default pkglist', default='') buildp.add_argument('-a', '--addpackagelist', action='append', default=[], help='A list of additional packages to include, may be specified multiple times') - buildp.add_argument('-s', '--source', help='Directory to pull installation from, typically a subdirectory of /var/lib/confluent/distributions. By default, the repositories for the build system are used.') + buildp.add_argument('-s', '--source', help='Directory to pull installation from, typically a subdirectory of /var/lib/confluent/distributions. By default, the repositories for the build system are used. For Ubuntu, this is not supported, the build system repositories are always used.') buildp.add_argument('-y', '--non-interactive', help='Avoid prompting for confirmation', action='store_true') buildp.add_argument('-v', '--volume', help='Directory to make available in the build environment. -v / will ' From c8745292bfdb69f8f87701baeb4f84e5f073fee9 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 4 Dec 2025 09:52:15 -0500 Subject: [PATCH 4/4] Handle broader memory information being returned from confluent --- confluent_client/bin/nodeinventory | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/confluent_client/bin/nodeinventory b/confluent_client/bin/nodeinventory index 1fb3d151..6551c1b5 100755 --- a/confluent_client/bin/nodeinventory +++ b/confluent_client/bin/nodeinventory @@ -60,16 +60,21 @@ def print_mem_info(node, prefix, meminfo): elif 'DCPMM' in meminfo['memory_type']: memdescfmt = '{0}GB {1} ' meminfo['module_type'] = 'DCPMM' + elif meminfo['memory_type'] == 'HBM': + memdescfmt = '{0}GB HBM ' else: print('{0}: {1}: Unrecognized Memory'.format(node, prefix)) return if meminfo.get('ecc', False): memdescfmt += 'ECC ' - capacity = meminfo['capacity_mb'] / 1024 modtype = meminfo.get('module_type', None) if modtype: memdescfmt += modtype - memdesc = memdescfmt.format(capacity, meminfo['speed']) + if meminfo.get('capacity_mb', None): + capacity = meminfo['capacity_mb'] // 1024 + memdesc = memdescfmt.format(capacity, meminfo['speed']) + else: + memdesc = 'Unspecified Module' print('{0}: {1} description: {2}'.format(node, prefix, memdesc)) print('{0}: {1} manufacturer: {2}'.format( node, prefix, meminfo['manufacturer']))