2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-08-04 08:27:01 +00:00
Commit Graph

690 Commits

Author SHA1 Message Date
Markus Hilger f8ea1adec7 Keep the nodediscover CSV import going past a failed assignment
gather propagates the first exception and leaves its siblings running,
so a transport level failure against one node ends the import with a
traceback while the rest of the batch is cancelled at loop shutdown.
The forked children used to contain such a failure to their own node.
assign_macs already reports an error response itself, so this is the
connection dropping rather than the server refusing the assignment.

Collect the exceptions instead, report each one and count it towards
the exit code.  Schedule the assignments as tasks while doing so, since
the plain coroutines are left unawaited if defining a later node raises
before the gather is reached.
2026-07-27 06:15:45 +02:00
Markus Hilger a619b6ed6f Bound the sessions the nodediscover CSV import opens
Replacing the forked children with a gather kept their fan-out: every
row of the import file gets a session of its own and they all start at
once, so a large file opens a local socket and a server side session
task per node simultaneously.

Hold a semaphore for the duration of each node's assignment instead, so
a finished node's session is dropped before the next one starts.  Also
build that session once per node rather than once per MAC, and say why
the caller's session is not reused, which was self evident while this
ran in a forked child.
2026-07-27 06:15:32 +02:00
Markus Hilger 18c24effc6 Initialize the scan total in nodediscover register
register_endpoint primes current but not total, so a first response
without a count field goes straight to

  UnboundLocalError: local variable 'total' referenced before assignment

on the elif.  Start at zero, which skips the progress line until the
server does report a count.
2026-07-27 06:15:08 +02:00
Markus Hilger 53f1d4a7c2 Do not block the event loop with time.sleep in the async clients
nodediscover's rescan poll and nodeconsole's screenshot refresh both slept
with time.sleep inside a coroutine.  In nodeconsole --video that stops the
input handler and the VNC streaming tasks for the whole interval.
2026-07-27 01:54:24 +02:00
Markus Hilger 7ebc1dc616 Fix nodediscover CSV import in the async port
import_csv was left with several synchronous idioms:

- search_record is a coroutine function, but was called without await.
  The returned coroutine is always truthy, so the rescan on incomplete
  discovery data never happened, and iterating the result raised
  TypeError: 'coroutine' object is not iterable
- the node creation loop iterated an async generator with plain for
- the per-node discovery assignment was forked off with os.fork() while
  the event loop was running, and the child then built a fresh session
  on the inherited selector

Assign discovery entries with asyncio.gather instead of a forked child,
which keeps the assignments concurrent and lets their exit codes
propagate.  The forked child always ended in sys.exit(0), so its
accumulated errorcode was discarded.
2026-07-27 01:51:16 +02:00
Markus Hilger 4197bd9118 Fix nodediscover register and subscribe in the async port
register_endpoint and subscribe_discovery were left as plain functions
iterating the async client generators, so nodediscover register,
subscribe and unsubscribe all failed immediately with

  TypeError: 'async_generator' object is not iterable
2026-07-27 01:50:24 +02:00
Jarrod Johnson 3f2ad75b6d Change output of the nodedeploy timestamp
The 'updated' could be confused for OS updates or similar.
2026-07-24 16:23:27 -04:00
Jarrod Johnson bf195bfdeb Fix stray typing in nodedeploy 2026-07-24 15:10:06 -04:00
Jarrod Johnson 9fa89d712a Format timestamp consistent with nodeveentlog 2026-07-24 12:05:58 -04:00
Jarrod Johnson 2fed3ddb57 Add timestamp to booted information on diskless boot
It can be ambiguous if the node booted recently or not.
2026-07-24 08:46:47 -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
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 0f7ba1b70d Add connect timeout option to nodeshell 2026-07-10 04:31:59 +02: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
Markus Hilger f4c43394d8 Fix missing format() leaving {0} literal in error message 2026-07-02 22:07:48 +02:00
Markus Hilger 46ada49401 Remove stray debug write to /etc/whatnowhosts 2026-07-02 22:07:48 +02:00
Markus Hilger 7727cd86fc Fix typos in help text, errors, and log messages 2026-07-02 22:07:27 +02:00
Markus Hilger 1129089307 Rename confluent2dnsmasqdhcp -> confluent2dnsmasq 2026-06-30 02:59:12 +02:00
Markus Hilger 6a12b6c977 Use ip route for listen-address and detect missing /prefixlen 2026-06-30 02:55:52 +02:00
Markus Hilger 007b374c73 Implement confluent2dnsmasqdhcp
confleunt2dnsmasqdhcp creates static DHCP entries for dnsmasq
for nodes with defined net.*.hwaddr.
2026-06-30 02:55:23 +02:00
Jarrod Johnson e5c550f200 Avoird warning on nodeconsole -tv exit with newer python 2026-06-08 14:30:51 -04:00
Jarrod Johnson 1aca69fd14 Allow nodedeploy to request http boot specifically 2026-06-04 08:04:45 -04:00
Jarrod Johnson ea693e1246 Add support for http boot
Some redfish require us to be very specific.
2026-06-04 08:04:39 -04:00
Jarrod Johnson 2a84c68ad3 Add support for passing a parameterfile in updates 2026-06-01 19:49:19 -04:00
Jarrod Johnson a99f3de910 Implement a headless mode
For automation, this can make more sense.
2026-05-12 14:55:45 -04:00
Jarrod Johnson eebc4ed3c7 Add expression support to the nodeconsole automation 2026-05-12 14:55:39 -04:00
Jarrod Johnson a537a7ba5c Provide automation facility for nodeconsole
Allow nodeconsole to walk console according to a script
2026-05-12 14:55:28 -04:00
Jarrod Johnson 34f8ad221d Fix shift-enter, and fix SS3 handling in general 2026-05-07 09:28:33 -04:00
Jarrod Johnson 1d5c5028cf Significantly rework '-tv' titlebar behavior 2026-05-05 16:25:23 -04:00
Jarrod Johnson 0abe252c24 Implement power commands in nodeconsole -tv 2026-05-05 09:49:35 -04:00
Jarrod Johnson b165977870 Disable 'help' text for now, can't be seen.
Also plant a seed for potential titlebar content add.
2026-05-04 19:54:07 -04:00
Jarrod Johnson 9d474591f9 Make 'titlebars' more prominent 2026-05-04 19:44:05 -04:00
Jarrod Johnson c54eb2919a Have nodeconsole cleanly exit 2026-05-04 18:35:57 -04:00
Jarrod Johnson dc627342e9 Fix handling of special keys
Particularly handle alt-arrows
2026-05-04 13:57:07 -04:00
Jarrod Johnson f911198907 Implement keyboard input and focus changes
Replace input handling with an async, this
permitts screen updates while doing commands.

Implement 'send break' (sysrq) and focus move.

Indicate not-yet-active focus with titlebar color.
2026-05-04 12:20:46 -04:00
Jarrod Johnson e55cf43f7a Begin work to add ctrl-e commands to video nodeconsole 2026-05-03 22:37:58 -04:00
Jarrod Johnson 966cb9a01d Fix streaming video behavior on resize 2026-05-03 13:49:40 -04:00
Jarrod Johnson 98aac78e55 Fix await of vnc client create 2026-05-02 12:41:58 -04:00
Jarrod Johnson b7f6c158ea Switch to homegrown async vnc implementation
The pip ones didn't support tight.

Further, when switching to streaming, they were a bit hiccupy with performance.
2026-05-02 12:37:52 -04:00
Jarrod Johnson 3116416799 First pass at '-v' support 2026-05-02 09:16:35 -04:00
Jarrod Johnson fcb2c3b4f5 Switch to mostly binary image manipulation
This saves a few round trips through base64 and reduce memory footprint.
2026-05-01 15:38:54 -04:00
Jarrod Johnson f4c68032e3 Change noderemove to use sync client for now 2026-04-15 10:03:57 -04:00
Jarrod Johnson 5ccbc37aa6 Merge branch 'master' into async 2026-04-03 10:36:25 -04:00
Jarrod Johnson 69d984b9dc Fix syntax mistake in deferred handling in nodeapply 2026-04-03 10:34:20 -04:00
Jarrod Johnson cd68225672 Fix nodeconfig and nodefirmware to IPMI targets 2026-03-24 16:23:48 -04:00
Jarrod Johnson 78c708424d async fixes for nodeconfig and netutil 2026-03-24 14:08:54 -04:00
Jarrod Johnson 07a6eb32ed Merge branch 'master' into async 2026-03-19 12:21:10 -04:00
Jarrod Johnson f78b301143 Update usage text 2026-03-19 09:54:08 -04:00
Jarrod Johnson 794502eb6a Merge branch 'master' into async 2026-03-09 17:30:04 -04:00
Jarrod Johnson e185f2224f Implement ability for user to kick off confluent ansible runs
Add nodeapply -A and associated API.

This permits orchestrating plays without touching the nodes directly by the user.
2026-03-06 16:24:26 -05:00