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

3582 Commits

Author SHA1 Message Date
Jarrod Johnson c803832ee9 Merge pull request #413 from Obihoernchen/fix/pxe-no-ipv4-message
Name the interface in the no-IPv4 boot reply message
2026-11-27 16:52:06 -05: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 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
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
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
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 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
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
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
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
Markus Hilger aaaf4e3ea8 Install the HTTP boot iPXE shim on every osdeploy initialize run
The shim copy ran after the early exit of initialize, so -p, -k, -l
or -g on their own did not install it. It also checked for the aarch64
shim as ipxe-aarch64-shim.efi, a name it never writes, so it copied
that one on every run instead of only when it was missing.
2026-11-17 23:20:28 +01:00
Markus Hilger 2ba8db30ef Check the iPXE shim of the booting architecture for HTTP boot
UEFI HTTP boot chainloads the iPXE shim only when it is installed, but
the check always looked for the x86_64 shim. An aarch64 node on a
server with only the x86_64 shim was offered the missing aarch64 one
and failed to boot, and on a server with only the aarch64 shim it got
the static boot.img instead.
2026-11-17 21:05:33 +01:00
Jarrod Johnson f72ce3f98a Fix import of Ubuntu 26.04.1 arm media 2026-11-17 14:08:25 -05:00
Markus Hilger d7a4af65b1 Tolerate a null system UUID in Redfish inventory
A Giga Computing BMC reports the system UUID as null, which made
nodeinventory fail with 'NoneType' object has no attribute 'lower'.
Treat a null UUID like a missing one.
2026-11-17 16:41:50 +01:00
Markus Hilger aa250bb91b Handle IPMI sessions torn down while a response is pending
A SOL keepalive reply arriving after the console was closed failed with
an AttributeError on the released session. A privilege level request on
a session that was logged out or given up on during login raised
IpmiException out of the packet handler into the event loop shared by
all sessions. Ignore the late keepalive reply, and report the failed
login to its waiters instead.
2026-11-17 16:27:52 +01:00
Markus Hilger 75a5e75063 Log IPMI plugin stack traces to the trace log
traceback.print_exc() went to stderr, where the log redirect tags every
line with its caller, traceback.py, which made the traces unreadable.
2026-11-17 16:27:52 +01:00
Markus Hilger e73a42ca5e Report request errors from console sessions like other requests
A request sent from within a console session, such as the power state
check confetty makes, went through a handler that logged every failure
as an unexpected 500 with a stack trace. A node with an unreachable BMC
filled the trace log with TargetEndpointUnreachable. Share the error
reporting of the main request loop, so the client gets the real error
code and only unexpected failures are traced.
2026-11-17 16:27:52 +01:00
Markus Hilger cb729147e7 Tolerate credserver clients that disconnect early
A client that reset the connection or closed it before finishing the
exchange left a stack trace in the trace log (ConnectionResetError, or
an IndexError on an empty read). Read each field in full, and treat a
client going away as the end of that exchange rather than a server fault.
2026-11-17 16:27:52 +01:00
Jarrod Johnson 209d6ef2ed Fix undefined nodeinfo in the get_chassis_info flow. 2026-11-16 16:47:19 -05:00
Jarrod Johnson 246aae08fe Change secure http to ipxe as well
It is verified that iPXE leverages the UEFI CA and does not let untrusted connections.

So let it do https as well as http, relegating boot.img for virtual media instead.

This like the plain http boot works nicely with a broader set of UEFI.
2026-11-16 16:43:11 -05:00
Jarrod Johnson bd647ebfa4 Implement chassis information separate from system
Some implementations claim to have a system, but have useless data.

We can't tell programattically that the data is useless, so provide chassis for the user to decide.
2026-11-14 08:01:31 -05:00
Jarrod Johnson 334815e9a5 Catch the target url from a 403 extended message, if required 2026-11-13 10:00:38 -05:00
Jarrod Johnson d4c2072e3f Have nvos discovery handle LLA based onboarding 2026-11-13 09:36:31 -05:00
Jarrod Johnson dd700ad1a5 Add mac address to registered address, when possible 2026-11-13 09:04:07 -05:00
Jarrod Johnson 85ff47e684 Add singleton IPv6 support to nodediscover register
This allows otherwise queried ipv6 addresses to be checked one at a time.
2026-11-13 08:13:26 -05:00
Jarrod Johnson ad2de237bc Implement management of UEFI HTTPS certificates
On supported platforms, manage the UEFI HTTPS certificate store.  This can make it easier to manage HTTPS boot.
2026-11-12 10:17:48 -05:00
Jarrod Johnson 9d78d42071 Merge remote-tracking branch 'xcat/master' 2026-11-12 10:06:02 -05:00
Jarrod Johnson bec1ed1498 Merge pull request #383 from Obihoernchen/feat/confluent-attrib-helper
Add confluent_attrib helper for profile scripts
2026-11-12 07:40:14 -05:00