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

7287 Commits

Author SHA1 Message Date
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 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
Jarrod Johnson 192eda00a5 Merge pull request #394 from Obihoernchen/fix/ipxe-shim-refresh
Fix ipxe shim refresh
2026-11-18 16:06:08 -05:00
Jarrod Johnson ba45554de1 Merge pull request #395 from Obihoernchen/fix/neighutil-addr-done
Stop the address dump at a done message anywhere in the datagram
2026-11-18 16:04:52 -05:00
Jarrod Johnson 631d7fa680 Relax watchdog timing
Some systems during startup especially may take a hit that crosses the threshold.

Also, some IO hangs in select environments during certain activity can pause a while.

Heartbeat 4 times per interval instead of 2.
2026-11-18 15:33:53 -05:00
Jarrod Johnson be48cb28ce Merge remote-tracking branch 'xcat/master' 2026-11-18 12:18:13 -05:00
Jarrod Johnson 00f62d4506 Fix some functions with chassis-only bmcs
Some infrastructure equipment models as a chassis with no system, handle this case better more generically.
2026-11-18 12:17:48 -05:00
Markus Hilger e6c5210699 Name the cause in the kernelargs HTTP boot warnings
UEFI HTTP boot goes through the iPXE shim once osdeploy initialize has
installed it, so the boot.img fallback warning points to that, for IPv4
and IPv6.
2026-11-18 13:30:05 +01:00
Markus Hilger 8d09bb5b0d Add deployment.kernelargs for per-node kernel arguments
Kernel arguments could only be set per profile, baked into the static
boot files of the profile. Nodes or groups that need extra arguments,
such as a different console or driver options, required a copy of the
whole profile.

When deployment.kernelargs is set, the iPXE boot offer now points at the
existing /confluent-api/boot/by-node endpoint, which serves the profile
boot.ipxe or boot.ipxe.shim with the node arguments appended to the
kernel line and the paths made absolute. UEFI HTTP boot takes the same
path, as it chainloads the iPXE shim when that is installed. A UEFI
HTTP boot that loads the static boot.img instead logs that the node
arguments are not applied.

Nodes without the attribute keep receiving the static profile files.
2026-11-18 13:30:01 +01:00
Markus Hilger a328123357 Ignore DHCPv6 requests sent to another server
A client sends its Request to the server whose Advertise it picked,
named by the server identifier. confluent answered every Request, so
with several DHCPv6 servers on the segment, such as the members of a
collective, all of them replied to it.
2026-11-18 13:06:14 +01:00
Markus Hilger a8f18b6955 Stop the address dump at a done message anywhere in the datagram
get_my_addresses only looked at the first netlink message of each
datagram for NLMSG_DONE. When the kernel sends the last addresses and
the done message in one datagram, as EL10 does for an IPv6 dump, the
loop waited for another datagram that never came. reply_dhcp6 asks for
the IPv6 addresses of the interface, so every DHCPv6 boot request went
unanswered.

A failed dump ends with an error message and no done message, so stop
at an error message too.
2026-11-18 13:06:00 +01:00
Markus Hilger be3623c551 Use the iPXE shim for IPv6 UEFI HTTP boot
IPv6 UEFI HTTP boot always served boot.img. Offer the iPXE shim when
the profile has boot.ipxe.shim and the shim of the booting
architecture is installed, as the IPv4 path does.

iPXE then sends its own DHCPv6 request with user class iPXE and a
PXEClient vendor class, which was refused as IPv6 PXE. Answer it with
the boot.ipxe.shim URL, or boot.ipxe when the profile has no shim
script. With only the other configuration flag in the router
advertisement, iPXE sends an Information-request, which was not
handled at all and carries no IA_NA. Handle it and only assign an
address when the request asks for one.

Before it starts the shim, the firmware releases the address and
retransmits the Release while it is unanswered, which delayed the
handoff by over a minute. Answer a Release sent to this server.
2026-11-18 11:22:22 +01:00