2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-07-18 00:16:50 +00:00
Commit Graph

6450 Commits

Author SHA1 Message Date
Markus Hilger dab2f0bb02 Move returns out of finally blocks
Fixes python compile warning:

SyntaxError: 'return' in a 'finally' block
2026-07-14 01:30:16 +02:00
Markus Hilger 69a6714108 Use raw string notation to fix python compile warnings
E.g.: SyntaxError: "\d" is an invalid escape sequence. Did you mean "\\d"? A raw string is also an option.
2026-07-14 01:26:19 +02:00
Jarrod Johnson 090a887ed9 Merge pull request #235 from Obihoernchen/aiohmi
Various asyncio fixes
2026-07-13 13:26:07 -04:00
Jarrod Johnson c208162839 Add a sample to get ip addresses from a switch port 2026-07-13 13:19:32 -04:00
Markus Hilger 44d2534b4b Revert changes flagged by review
Restore pre-PR behavior for three changes flagged by @jjohnson42.
Bigger changes are needed for these. Will be done in a separate PR.
2026-07-13 17:25:58 +02:00
Markus Hilger dc906b9cd0 Await IPMI session challenge callbacks
The IPMI 1.5 session-challenge callback returned coroutine objects from error reporting and session activation instead of expressing an asynchronous callback contract directly. That made completion depend on the dispatch path noticing and awaiting the returned object.

Make the callback asynchronous and explicitly await both onlogon() and _activate_session(), ensuring failure notification and activation finish before callback dispatch continues.
2026-07-13 17:25:22 +02:00
Jarrod Johnson e853db5c36 Support affluent peeraddresses, when available 2026-07-13 11:16:47 -04:00
Jarrod Johnson 81cf17360e arm64 boot assets pick up 2026-07-13 09:59:15 -04:00
Jarrod Johnson 7babc503c3 Merge pull request #233 from Obihoernchen/checkipmac2
Warn on conflicting entries in confluent2hosts and confluent2dnsmasq
2026-07-13 08:58:19 -04:00
Jarrod Johnson 1660fe9c7d Merge pull request #231 from Obihoernchen/ipmioemfix
Improve SEL record type handling in aiohmi
2026-07-13 08:56:28 -04:00
Jarrod Johnson f4a207ed47 Merge pull request #232 from Obihoernchen/timeout
Add connect timeout option to nodeshell
2026-07-13 08:45:46 -04:00
Jarrod Johnson 6bdd44ffcf Merge pull request #234 from Obihoernchen/netsettings
Add net.extra_settings for passthrough network settings
2026-07-13 08:45:23 -04:00
Jarrod Johnson a2c1b2bd44 Merge pull request #238 from Obihoernchen/shellcheck
Fix Shellcheck errors
2026-07-13 07:56:41 -04:00
Markus Hilger 6d606f37f6 Fix Shellcheck errors
Fix SC2045 (error): Iterating over ls output is fragile. Use globs.

Add exception SC2068 exception for confluent_client/confluent_env.sh as this is intended.
SC2068 (error): Double quote array expansions to avoid re-splitting elements.
2026-07-13 05:34:12 +02:00
Markus Hilger 670a11666d Fix remaining hardware async responses 2026-07-13 02:50:12 +02:00
Markus Hilger ca6a54ab05 Fix asynchronous console control dispatch 2026-07-13 02:50:12 +02:00
Markus Hilger 430260becf Await collective address propagation 2026-07-13 02:50:12 +02:00
Markus Hilger 3c6e7d202f Await BMC discovery configuration operations 2026-07-13 02:50:12 +02:00
Markus Hilger b5c5f62789 Fix OEM asynchronous operation dispatch 2026-07-13 02:50:12 +02:00
Markus Hilger 0165fc9935 Fix IPMI coroutine result handling 2026-07-13 02:50:11 +02:00
Markus Hilger 38746b19d5 Import signal for SSH agent cleanup 2026-07-13 02:50:11 +02:00
Markus Hilger b5e0e9f9e4 Fix asynchronous console and shell contracts 2026-07-13 02:50:11 +02:00
Markus Hilger 9c4f9e1935 Fix hardware management async dispatch 2026-07-13 02:50:11 +02:00
Markus Hilger 89d0fa81b9 Fix asynchronous discovery call contracts 2026-07-13 02:50:11 +02:00
Markus Hilger 5fc036a2b7 Await asynchronous configuration mutations 2026-07-13 02:50:11 +02:00
Markus Hilger 91654ea0d1 Fix aiohmi async call contracts 2026-07-13 02:50:11 +02:00
Markus Hilger 2c41841efc Fix additional missing awaits in aiohmi
Await the channel access raw command, the TSMA remote media settings
requests, and the XCC3 volume creation responses. These calls returned
or unpacked coroutine objects, breaking set_channel_access, TSMA
virtual media attach, and RAID volume creation at runtime.
2026-07-13 02:50:11 +02:00
Markus Hilger 2117d120d8 Fix remaining aiohmi async call paths
Await OEM sensor, NTP, retry, and firmware-update operations that otherwise returned or discarded coroutine objects. Return the initialized energy manager for FAPM systems and update stale utility entry points to use asynchronous Command factories.
2026-07-13 02:50:11 +02:00
Markus Hilger 6650a01a25 Fix Redfish OEM handler instantiation
Fallback paths called OEM handler constructors directly, but these handlers are initialized through async create factories. This caused generic, TSMA, and SMM3 selection to fail with 'OEMHandler() takes no arguments'. Use and await the factories consistently.

Also await the asynchronous bmcinfo lookup and forward the TSMA pool argument correctly.
2026-07-13 02:50:11 +02:00
Markus Hilger 2f006e507f Add net.extra_settings for passthrough network settings
Allow arbitrary per-connection network settings, such as static routes
or a firewalld zone, to be specified as semicolon-delimited key=value
pairs on a net.*.extra_settings attribute. The keys are passed through
to the network backend of the deployed OS in its native syntax: nmcli
properties on NetworkManager systems, netplan YAML paths on netplan
systems, and ifcfg variables on wicked systems.
2026-07-11 20:46:46 +02:00
Markus Hilger 60a00c452b Warn on conflicting entries in confluent2hosts and confluent2dnsmasq
Neither tool detected when the attribute database produces conflicting
name/IP data, silently emitting the conflicts.

confluent2hosts now warns when the same hostname is generated for
multiple different addresses within one address family (dual-stack
IPv4+IPv6 pairs stay silent), which happens naturally in -a mode when a
node has several networks without distinct per-net hostnames.

confluent2dnsmasq now warns when generated reservations share a
hostname across different IPs, reserve the same IP more than once
(dnsmasq refuses to start on a duplicate dhcp-host IP), or reuse a MAC.
2026-07-11 04:29:03 +02:00
Markus Hilger 3af93c2a39 Tolerate standard SEL records with malformed bodies
A type 0x02 record whose body cannot be decoded (e.g. a bogus EvM
revision) would raise and abort retrieval of the entire event log.
ipmitool and freeipmi print such entries with whatever fields they can
extract rather than failing; degrade to the same raw passthrough used
for undecodable reserved types instead of raising.
2026-07-10 16:50:25 +02:00
Markus Hilger 2034d522d7 Decode Linux kernel panic SEL records
The Linux kernel ipmi panic logger stores panic strings in SEL records
of type 0xf0, with a chunk sequence number in byte 4 and up to 11
characters of the message in bytes 5-15.  ipmitool and freeipmi both
recognize this convention; do the same rather than presenting such
records as opaque non-timestamped OEM data.
2026-07-10 16:50:25 +02:00
Markus Hilger 9f35965b1b Decode reserved SEL record types as standard events
Some BMCs (e.g. AMI) log events using spec-reserved record types like
0x04 with a standard system event record layout.  Previously only type
0x02 was decoded, leaving such entries with no usable data and tripping
the generic OEM handler.  Follow ipmitool and treat all types below 0xc0
as standard format.  If the body of a reserved type turns out not to
follow the standard layout, fall back to passing it through raw instead
of aborting the whole log retrieval.
2026-07-10 16:50:25 +02:00
Markus Hilger be7a3c753a Fix crash if sel entry is not OEM 2026-07-10 16:50:25 +02:00
Markus Hilger 0f7ba1b70d Add connect timeout option to nodeshell 2026-07-10 04:31:59 +02:00
Jarrod Johnson 0272137e94 Have custom handling for megarac initial password state
Initial password state demands webgui to change password.

So act like the webgui.
2026-07-09 16:42:28 -04:00
Jarrod Johnson 12c35f2b96 Merge pull request #230 from Obihoernchen/crossarch
Add cross-architecture image build support to imgutil
2026-07-09 14:43:02 -04:00
Jarrod Johnson 0bbc75d53e Copy sshd-session helper if present 2026-07-09 14:24:34 -04:00
Jarrod Johnson 263953fc1e Remove nuisance autoncons output when empty
If no serial console detected, don't bother mentioning it.
2026-07-09 14:22:12 -04:00
Jarrod Johnson beab5cd791 Fix for modern python ioctl
Need to actually feed full buffer into modern python ioctl calls.
2026-07-09 14:13:45 -04:00
Jarrod Johnson 5f34fac2bc confluent_nodename variable might not survive to imageboot
Pull it from the confluent.info file.
2026-07-09 14:13:12 -04:00
Jarrod Johnson 149ecad90e Improvements for MegaRAC discovery
Some Megarac fail with Host header looking like link local.

Systems with nVidia architecture have multiple bmcs, select the actual bmc.
2026-07-09 14:12:23 -04:00
Markus Hilger 5945e8f22d Fix imgutil crash without arg 2026-07-09 19:11:09 +02:00
Markus Hilger 7633bac055 Add cross-architecture image build support to imgutil
Allow building EL and Ubuntu diskless images for a foreign architecture (e.g.
aarch64 on an x86_64 host) by leveraging qemu-user-static. The target
architecture is detected automatically from a -s source tree (for EL),
or may be requested explicitly with the new --arch option.

When the target differs from the host, dnf/debootstrap is invoked with
--forcearch/--arch and the presence of an enabled binfmt_misc handler
with the F (fix-binary) flag is verified up front, so emulation keeps working
inside the installroot chroot and a missing setup yields an actionable
error instead of a confusing exec failure mid-build.

The image architecture is recorded in confluentimg.buildinfo so that
pack selects the initramfs addons for the image architecture rather
than the build host, and exec of a foreign-arch root performs the same
binfmt check.
2026-07-09 19:11:09 +02:00
Jarrod Johnson 0a14e019d0 Skip suse16 diskless for now 2026-07-09 10:47:55 -04:00
Jarrod Johnson b724de4230 Merge pull request #223 from Obihoernchen/showsecret
Add server-side confluentdbutil showattrib subcommand
2026-07-08 17:53:12 -04:00
Markus Hilger 6f11dffae8 Add server-side confluentdbutil showattrib subcommand
Adds `confluentdbutil showattrib <noderange> <attribute>...` to print the
node attribute.

In contrast to nodeattrib it can shows secrets and crypted values with -u flag.
It's server-side only: reads the config store and master key directly, never over
the API.
It's read-only and works without confluentd running.
2026-07-08 19:55:18 +02:00
Jarrod Johnson 40f1a85932 Merge pull request #227 from Obihoernchen/autorelease
Auto add releases for new tags
2026-07-08 12:32:33 -04:00
Jarrod Johnson 0d90317d1f Merge remote-tracking branch 'xcat/master' 2026-07-08 11:57:15 -04:00