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

7311 Commits

Author SHA1 Message Date
Markus Hilger f2e18689a8 Allow imgutil scratch directories on another host
build, exec, unpack and pack accept an rsync style host:/path scratch
directory, so an image of another architecture can be built natively,
for example on an aarch64 host, instead of under qemu-user emulation.

build and exec copy imgutil to a temporary directory on that host and
run the command there over ssh. Paths in -s, -r and -v are paths on
that host. A -p or -a package list that exists on this system is
copied to the host with the lists it includes.

pack copies the tree to a private staging directory under /var/tmp
and packs it locally. unpack unpacks to a staging directory and copies
the tree to the host, where the target must not exist or be an empty
directory. The copies leave out SELinux labels, pack relabels the tree
with the policy of the image.
2026-11-27 23:06:55 +01:00
Jarrod Johnson c803832ee9 Merge pull request #413 from Obihoernchen/fix/pxe-no-ipv4-message
Name the interface in the no-IPv4 boot reply message
nightly
2026-11-27 16:52:06 -05:00
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 b52be49242 Merge pull request #410 from Obihoernchen/fix/redfish-chassis-inventory-none
Fix redfish chassis inventory with unrecognized chassis ids
2026-11-27 16:50:00 -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
Jarrod Johnson bc292cc7ac Merge pull request #415 from Obihoernchen/el10-cabundle
Provide tls-ca-bundle.pem in EL diskless initramfs
2026-11-27 16:46:36 -05:00
Jarrod Johnson 9bad76d0e9 Merge pull request #412 from Obihoernchen/fix/makeman-placeholders
Keep placeholders in man pages
2026-11-27 16:45:07 -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 556a854a85 Name the interface in the no-IPv4 boot reply message
The message gave only the interface index, which reads like a wrong
value when a node falls back to PXE over InfiniBand on a network the
deployment server has no IPv4 address on. Log the interface name and
the requesting hardware address instead.
2026-11-26 13:04:02 +01:00
Markus Hilger 6e628e9a87 Keep placeholders in man pages
pandoc read placeholders such as <scratchdir> as HTML tags and dropped
them from the man pages, so the imgutil synopsis showed
"imgutil build []". Read the ronn files without raw HTML, so they stay
text. Ten pages lost placeholders this way, the others are unchanged.
2026-11-25 22:00:32 +01:00
Markus Hilger 15f779786d Fix redfish chassis inventory with unrecognized chassis ids
When a BMC lists several chassis and none of them carries a well known
id (e.g. AMI MegaRAC on Lenovo HR650N with BMC_0, Baseboard_0, CPU_0,
...), no chassis url was chosen and nodeinventory failed with
"'NoneType' object has no attribute 'get'".

Fall back to the chassis the system declares in Links.Chassis, and
tolerate missing chassis data and null string properties.
2026-11-25 21:11:18 +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 f12b9fa01f Provide an API to get direct redfish inventory
Sometimes, a caller may want specific redfish attributes that aren't available in the ipmi path nor even accelerated oem firmware inventory.

Provide a new API entry point for software to get that data.
2026-11-24 13:52:23 -05:00
Jarrod Johnson ce15e3434c Accept unconfiguredbad as a valid storage state 2026-11-23 16:53:25 -05:00
Jarrod Johnson 0c15a83203 Merge remote-tracking branch 'xcat/master' 2026-11-23 15:34:39 -05:00
Jarrod Johnson 41cc0d5a0b Fix unclean exit in nodeconsole in some scenarios
Some scenarios left the terminal in a weird state, more consistently hit cleanup code.
2026-11-23 15:33:23 -05:00
Jarrod Johnson 4a0d32cfd3 Merge pull request #408 from Obihoernchen/fix/trace-cleanup-small
Fix small trace-log bugs
2026-11-23 15:07:13 -05:00
Markus Hilger f79d5bc53d Do not trace expected errors while creating a console
A console whose backend could not be created, for example because the
BMC name did not resolve, logged a stack trace for every attempt even
though the error was a TargetEndpointUnreachable. The console already
shows the error to the user, so only trace unexpected failures.
2026-11-23 20:27:05 +01:00
Markus Hilger bed2ae45d2 Recheck the pending IPMI payload after waiting in onlogon
onlogon read onlogpayload only after awaiting _cmdwait. If another logon
sent the payload or a logout dropped it during that wait, send_payload
got None and failed with "cannot convert 'NoneType' object to
bytearray". A command timing out during the wait can also start a
relogin that queues its own payload on a session no longer logged in.
Send the payload only if it is still pending and the session is logged
in, as raw_command checks after the same wait.
2026-11-23 20:27:05 +01:00
Markus Hilger 07ed1a7b62 Make the closed IPMI console output handler awaitable
close() swaps the console output handler for _donothing to break the
reference cycle, but aiohmi awaits that handler. SOL data that arrived
after close then failed with "object NoneType can't be used in 'await'
expression".
2026-11-23 20:27:05 +01:00
Markus Hilger b854f2fa46 Report a missing osdeploy initialize as a request error
Importing media before 'osdeploy initialize' raised a plain Exception,
which was answered as an unexpected 500 and logged with a stack trace.
Raise InvalidArgumentException so the user gets the message without a
trace, like the unsupported media case.
2026-11-23 20:27:05 +01:00
Markus Hilger 665fd310a4 Keep waiting for slow affluent switches
retrieve waited up to 10 seconds for the next result but only expected
QueueEmpty. When no switch answered within that time, wait_for raised
TimeoutError and failed the whole request, including switches that were
still about to answer. Keep waiting while workers remain. Each request
is bounded by the web client timeout.

That timeout is an asyncio.TimeoutError, which before python 3.11 is
neither TimeoutError nor OSError. fetch then reported it as an unknown
error instead of a target timeout, so catch it explicitly.
2026-11-23 20:27:05 +01:00
Jarrod Johnson 109bb0c7aa Merge remote-tracking branch 'xcat/master' 2026-11-23 14:01:19 -05:00
Jarrod Johnson 6e2152b43c Improve handling of pixel geometry
Some things put bad data in the pixel geometry. If the data looks too low (noted cases were 0x0 and hardset 640x480), then estimate 8xwidth, 16xheight.

Also, stop trying 14t/18t since mouse tracking is hard to cope with in that scenario.
2026-11-23 14:00:56 -05:00
Jarrod Johnson acb73a2205 Merge pull request #407 from Obihoernchen/fix/trace-cleanup
Fix server tracebacks seen in production logs
2026-11-23 13:56:40 -05:00
Jarrod Johnson c931ffc624 Merge pull request #406 from Obihoernchen/docs/nodeattrib-aliases
Document attribute aliases in nodeattrib man page
2026-11-23 13:55:03 -05:00
Jarrod Johnson 3deb0fca03 Merge pull request #405 from Obihoernchen/docs/nodeshell-options
Document missing -e and -x options in nodeshell man page
2026-11-23 13:54:48 -05:00
Markus Hilger 8e8933b7f6 Strip prefix length from the BMC address in vinzmanager
hardwaremanagement.manager may carry a prefix length such as
10.0.0.1/22. Passing that to WebConnection built the base URL
https://10.0.0.1/22:443, which aiohttp rejects with
"base_url must have a trailing '/'", so remote video for openbmc
nodes failed. Other consumers of the attribute already strip it.
2026-11-23 19:47:45 +01:00
Markus Hilger 1cf4225d97 Iterate over a snapshot of pending_nodes during recheck
_recheck_nodes_backend yields with asyncio.sleep(0) inside the loop, so
other coroutines can add or remove pending nodes meanwhile and the loop
fails with 'dictionary changed size during iteration'.
2026-11-23 19:47:45 +01:00
Markus Hilger 71b8198cb9 Report TargetResourceUnavailable as 503 with its reason
The attribute was misspelled apierrocode, so the exception fell back to
500 and every occurrence was logged as a stack trace. strip_node also
dropped the error text, so a single node request such as starting a
console on a PDU reported no reason.
2026-11-23 19:47:45 +01:00
Markus Hilger 44f7b3497e List outlets for geist PDUs instead of crashing
Retrieving the power/outlets/ collection of a geist PDU passed the
literal 'outlets' to get_outlet, which failed with
ValueError: invalid literal for int() with base 10: 'outlets'.
Enumerate the outlets from /api/dev like the raritan plugin does.
2026-11-23 19:47:45 +01:00
Jarrod Johnson de6a9d56e2 Provide a '-s' argument to let users skip sections they don't want in /etc/hosts. 2026-11-23 09:29:28 -05:00
Markus Hilger 4c12fb85fc Document attribute aliases in nodeattrib man page 2026-11-23 03:25:34 +01:00
Markus Hilger 3b6b88c6fd Document -e and -x options in nodeshell man page 2026-11-23 02:59:12 +01:00
Jarrod Johnson d27fab88c8 Provide mechanism to store BMC net config in node net configs.
Use hardwaremanagement.manager_tls_name as another possible way to indicate conflict

If wanting to use net.bmc attributes to direct DHCP, but wanting hardwaremanagement.manager to be lla, then use manager_tls_name as a way to store a second value to indicate the BMC-ness of a value

Now API calls that don't necessarily have the ability to discern the peer mac address can be somehow spared confusion.
2026-11-20 15:49:01 -05: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 206ab3d08a Merge pull request #399 from Obihoernchen/fix/initprofile-umask
debian: Run initprofile.sh with a relaxed umask
2026-11-20 07:54:40 -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
Jarrod Johnson 5a284b7e23 Merge pull request #403 from Obihoernchen/fix/debian-empty-domain
debian: Preseed an empty domain when dns.domain is unset
2026-11-20 07:53:27 -05:00
Jarrod Johnson 570d359fa9 Merge pull request #404 from Obihoernchen/fix/nodediscover-pyrefly
Fix pyrefly division-by-zero in nodediscover
2026-11-20 07:52:09 -05:00
Markus Hilger 3e4b846b73 Fix pyrefly division-by-zero in nodediscover 2026-11-20 13:45:10 +01: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 58cfa7ab24 Run initprofile.sh with a relaxed umask
Debian's initprofile.sh copies the EFI loaders out of efi.img with mcopy.
Under the daemon's 077 umask they became mode 0600 and could not be
served over HTTP, so UEFI boot of a fresh debian profile failed.
2026-11-20 12:52:03 +01:00