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

42 Commits

Author SHA1 Message Date
Markus Hilger ab6eeb3ced Merge branch 'master' into ruff 2026-07-14 05:28:53 +02:00
Markus Hilger 2af402b13c ruff auto fixes
Apply ruff's safe autofixes.
The changes are mechanical and behaviour-preserving. Issues fixed:

- F401: remove unused imports.
- F841: drop unused local variables and assignments, including discarded
  await/return values, unused "except ... as e" bindings, and unused
  "with ... as name" targets.
- F541: remove the f prefix from f-strings that contain no placeholders.
- E711: compare against None with "is"/"is not" instead of "=="/"!=".
- E712: test truthiness directly instead of comparing to True.
- E713: use "x not in y" instead of "not x in y".
- E714: use "is not" instead of "not ... is".
- E731: convert lambdas bound to a name into def statements.
- W291/W293: trim trailing whitespace on touched lines.
2026-07-14 05:03:58 +02:00
Jarrod Johnson 090a887ed9 Merge pull request #235 from Obihoernchen/aiohmi
Various asyncio fixes
2026-07-13 13:26:07 -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
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 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 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
Jarrod Johnson 0106758ceb Prevent overwrite of existing files when saving licenses 2026-07-01 21:06:32 -04:00
Jarrod Johnson 1934b88b0d Use basename to ensure no path traversal in license filenames 2026-07-01 20:54:36 -04:00
Jarrod Johnson ae290c4419 Ensure the filename cannot have path traversal in XCC2 and older 2026-07-01 20:42:22 -04:00
Jarrod Johnson 33c67db3c4 Further mitigate potential XML misbehavior
Since it turns out we already incurred lxml dependency, use lxml etree instead of xml and mitigate risky xml features beyond blocking the word '!entity'
2026-07-01 08:28:25 -04:00
Jarrod Johnson fbec09c073 Fix behavior with IPMI bad user/password 2026-06-30 15:17:45 -04:00
Jarrod Johnson 5abd080ba2 Restore some sanity to redfish error handling 2026-06-30 13:56:34 -04:00
gosforthcross fbb79de786 Include EUREKA in necessary files for loading and handling redfish and autodiscovery 2026-06-30 11:30:24 +02:00
gosforthcross 5435acd23e Add redfish OEM implementation for EUREKA Chassis 2026-06-30 11:28:45 +02:00
Jarrod Johnson 1068be423a Remove some python2 considerations 2026-06-23 08:30:21 -04:00
Jarrod Johnson 4aef4ac6d3 Bring XCC3 raid config workaround forward 2026-06-16 10:49:31 -04:00
Jarrod Johnson b5c71e46ee SMM3 debug log workaround 2026-06-11 07:50:29 -04:00
Jarrod Johnson c8c00c8f5f Update to ast.Constant
Python removed ast.Num in 3.14
2026-06-08 09:19:04 -04:00
Jarrod Johnson 0b10c240bd Fx issues with IPMI session management
Do not continue waiting when session is broken.

Do not call _timedout without releasing the lock first.

Properly await on relog with bad rakp4

If an accounting issue pushes logontries too far without touching zero, then still recognize retries were exhausted.

Timeout on missing RAKP2 if retries were already exhausted.
2026-06-05 09:44:10 -04:00
Jarrod Johnson ac9fd075b9 Remove use of deprecated get_event_loop 2026-06-04 13:36:11 -04:00
Jarrod Johnson 86abdc4257 Bring changes forward from pyghmi
HTTP boot enablement and fixes for the firmware parameters.
2026-06-04 08:27:03 -04:00
Jarrod Johnson 6185917ab8 Port megarac changes over 2026-06-01 19:44:38 -04:00
Jarrod Johnson 0f70401ad6 Port pyghmi fixes forward 2026-05-21 10:59:19 -04:00
Jarrod Johnson 7787a405bc Merge pull request #210 from VersatusHPC/remove-eventlet
Comment fixup and attempted removal of eventlet workarounds that shouldn't be needed
2026-05-20 15:43:06 -04:00
Jarrod Johnson 6bf534aa56 Fix generic refish boot override handling 2026-05-20 15:29:53 -04:00
Jarrod Johnson 698b29c3c0 Fix syntax mistake 2026-05-15 08:19:53 -04:00
Jarrod Johnson a7a83f5cf0 Ensure that logoutexpiry is set if it is going to be needed 2026-05-14 17:34:25 -04:00
Jarrod Johnson 0d1cd4b570 Correct path to DEFAULT_TIMEOUT 2026-05-08 14:49:57 -04:00
Jarrod Johnson 5d7e88998a Do not pass None, as some aiohttp vintages don't understand that timeout 2026-05-08 14:21:42 -04:00
Vinícius Ferrão aafd6967ba Clean up iothread design rationale comment 2026-05-03 12:04:36 -03:00
Vinícius Ferrão b195429d6b Remove python3-eventlet from build deps and clean up stale references
Drop python3-eventlet from the Ubuntu Noble build Dockerfile. Clean up
remaining greenthread/greenlet terminology in comments across aiohmi
IPMI modules, consoleserver, macmap, and the IPMI plugin. Remove a
commented-out GreenPool reference in macmap.
2026-05-02 23:07:54 -03:00
Vinícius Ferrão a69d828e69 Remove eventlet dependency, migrate to asyncio/concurrent.futures
Replace eventlet.greenpool with concurrent.futures.ThreadPoolExecutor
in the BMC discovery script, using as_completed() for proper exception
propagation and main-thread result aggregation to avoid race conditions.

Remove dead eventlet socket compatibility code (.fd attribute checks)
from the IPMI session layer, and clean up stale eventlet references
in comments across the codebase.

Closes: xcat2/confluent#197
2026-05-02 22:56:39 -03:00
Jarrod Johnson bfc27595dc Fold aiohmi into confluent
If someone asks for it independently, we can break it out again.  But for now,
assume it's only for confluent.
2026-04-30 08:48:24 -04:00