2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-12-01 23:02:22 +00:00
Commit Graph

7297 Commits

Author SHA1 Message Date
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
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
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
Jarrod Johnson 42a4291cb4 Merge pull request #397 from Obihoernchen/fix/ssh-dsa-key-rm
Tolerate missing DSA host keys when initializing ssh
2026-11-19 18:59:42 -05: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
Jarrod Johnson 5b7026384c Add ability to scan by noderange to hit ports unicast
Use LLDP and MAC FDB info for a viable list of unicast addresses to hit.

This makes it feasible to find fe80:: systems that do not respond to any multicast by default, if you ask it to scan by noderange.
2026-11-19 15:34:20 -05:00
Jarrod Johnson 1bf855f3c1 Keep lease_time with mac address isolated for DHCP offer
If a network middle name has an hwaddr and a lease time, keep it from bleeding into other interfaces.

We have long allowed a viable network config to be assembled from multiple middle names, to let a user be a bit sloppy, particularly when going by uuid.

However, when trying to manage interfaces on same subnet, e.g. a bmc and the system, this is untenable.  Invalidate a middle name if it is potentially going to be for non-boot activity and has a hwaddr specified and it doesn't match the request.
2026-11-19 10:47:44 -05:00
Jarrod Johnson 4d03ca8c24 Change deltapdu to async
Convert and clean up.

Also required webclient to support port 80 without TLS, which delta pdu gives us no choice on.
2026-11-19 09:53:33 -05:00
Jarrod Johnson 2e958becaf Merge pull request #392 from Obihoernchen/feat/node-installedargs
Per-node kernel arguments for the installed OS
2026-11-18 17:47:18 -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 86f6c5f1f5 Merge pull request #391 from Obihoernchen/feat/node-kernelargs
Per-node kernel arguments at network boot
2026-11-18 16:17:47 -05:00
Jarrod Johnson 447d86739e Merge pull request #396 from Obihoernchen/feat/httpboot6-ipxe-shim
Use the iPXE shim for IPv6 UEFI HTTP boot
2026-11-18 16:09:47 -05:00