2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-23 01:53:28 +00:00
Commit Graph

2402 Commits

Author SHA1 Message Date
Jarrod Johnson
bd2f08d3ad Reactive SSDP in discovery core
Also, fix a getaddrinfo call to be async.
2024-05-08 13:18:38 -04:00
Jarrod Johnson
b9a2c9a3ae Convert more XCC handling to asyncio 2024-05-08 13:18:05 -04:00
Jarrod Johnson
42b7cbe421 Implement SSDP asyncio
This covers SSDP devices as well as confluent deployment
discovery.
2024-05-08 13:17:43 -04:00
Jarrod Johnson
a3506cf0bf Correct misrouting in slp
IPv4 scan responses were lost as
the reader was passed IPv6 socket
no matter what.

Also, remove some needless verbosity.
2024-05-08 11:48:46 -04:00
Jarrod Johnson
25d4d13a96 Finish conversion of slp to asyncio.
Make process_peer async, with socket connection being async,
and dependency.

Have getaddrinfo use the asyncio version.

Rework the snoop to be more effective.

Rework the scan to be less convoluted.
2024-05-08 11:35:33 -04:00
Jarrod Johnson
23658680a5 Have slp mostly work
Advance the SLP discovery code and core discovery
to mostly work.
2024-05-07 17:02:51 -04:00
Jarrod Johnson
2089f5e7e6 Deal with normal generator from a plugin 2024-05-07 17:01:04 -04:00
Jarrod Johnson
b3e0117944 Fix getpeername invocation in async 2024-05-07 17:00:43 -04:00
Jarrod Johnson
5e222041bf Merge branch 'master' into async 2024-05-03 10:27:31 -04:00
Jarrod Johnson
b7a5101a34 Provide extra warning about redoing SSH materials 2024-05-03 10:27:01 -04:00
Jarrod Johnson
ee6f869cea Port utilities to asyncio, selfcheck and osdeploy
confluent_selfcheck removes eventlet dependency,

osdeploy reworked to use async methods to work with new client.
2024-04-30 14:30:01 -04:00
Jarrod Johnson
b967c552fd Migrate intra-collective requests to asyncio
Update dispatch to be asyncio based, remove eventlet from core

Clean up some overly verbose print statements.
2024-04-30 13:56:00 -04:00
Jarrod Johnson
553916340e Advanced asyncio port progress
Offer a function in core to normalize plugin return.

A plugin might return an async generator, a traditional generator,
or might even return an awaitable wrapping a traditional generator.

Replace eventlet spawn with util spawn in discover core

Have node attribute update await the set_node_attributes appropriately
2024-04-30 10:44:43 -04:00
Jarrod Johnson
a5dc10debf Fix attribute synchronization
Specify a finite read to actually return from the buffer.

Convert some functions to async/await as appropriate.
2024-04-29 10:54:30 -04:00
Jarrod Johnson
d2edcb62c6 Begin implementation of asyncio collective
The config synchronization is in progress.
2024-04-26 15:48:14 -04:00
Jarrod Johnson
560ec60c12 Merge branch 'master' into async 2024-04-17 15:18:58 -04:00
Jarrod Johnson
10f0fabb8c Fix nodegroup retrieval
nodegroup information was broken by clear warning support.
2024-04-17 15:18:45 -04:00
Jarrod Johnson
e890276bf6 Advance state of collective in asyncio
Eventlet is nominally removed from collective manager, however the join process still
needs to be reworked, and a lot more flows need to be adjusted.
2024-04-16 16:53:45 -04:00
Jarrod Johnson
e8110551db Port some of the collective management to asyncio 2024-04-15 17:19:27 -04:00
Jarrod Johnson
bfe7529d21 Merge branch 'master' into async 2024-04-15 10:04:19 -04:00
Jarrod Johnson
3ba3394a54 Fix None return by exec_on_leader with warnings 2024-04-12 17:32:13 -04:00
Jarrod Johnson
a6a2f2f2de Fixes for attribute clear warning behavior
Correct collective behavior for failing to clear on followers.

Also, connect the warnings from the leader to the member issuing the
RPC.
2024-04-12 11:46:17 -04:00
Jarrod Johnson
c3cafd9bf8 Purge eventlet and greenlet and long-polling support
Rather than try to support long deprecated http api behavior,
purge it for simpler code and remove eventlet/greenlet from the http
stack.
2024-04-11 09:09:02 -04:00
Jarrod Johnson
fb8ac158cb Merge branch 'master' into async 2024-04-11 08:14:20 -04:00
Jarrod Johnson
8e5ee6c9d8 Make orphaned sync runner retire on new sync request 2024-04-10 13:54:06 -04:00
Jarrod Johnson
ceaf641c1a Keep reap loop going on error 2024-04-09 16:18:24 -04:00
Jarrod Johnson
01722c18c4 Fix location of idle sleep in syncfiles cleaner 2024-04-09 15:40:40 -04:00
Jarrod Johnson
8fb889ba73 Correct syntax error 2024-04-09 15:27:20 -04:00
Jarrod Johnson
eaffb342b2 Reap stale sync runners after a minute dead
If the client never claims the result, delete the sync task.
2024-04-09 15:19:38 -04:00
Jarrod Johnson
8ca9a44476 Provide more interesting response body to syncfileclient 2024-04-09 14:27:00 -04:00
Jarrod Johnson
9d828f0998 Merge branch 'master' into async 2024-04-09 13:37:09 -04:00
Jarrod Johnson
33271451d7 Support SHA384 if used as fingerprint 2024-04-09 13:17:19 -04:00
Jarrod Johnson
f68f9f4693 Make syncfile step robust or pause
If syncfiles fails, keep it retrying.

Also, slow down sync checking to avoid hammering the system.

Further, randomized delay to spread highly synchronized requestors.

Block attempts to do multiple concurrent syncfile runs.
2024-04-09 11:07:11 -04:00
Jarrod Johnson
a4e152c17d Defer disarm until after successful client notification
It is theoretically possible for a client to get disconnected
right in the middle. In such a scenario, err on the side of letting
the mechanism stay armed for the sake of a retry being possible.
2024-04-09 10:31:46 -04:00
Jarrod Johnson
e8fed28a21 Do not disarm until client notify done
In the unlikely event of a hiccup during the credserver connection,
defer the disarm until the server has transmitted success.
2024-04-09 10:28:21 -04:00
Jarrod Johnson
7b2e32009f Numerous async improvements
Restore 'as available' behavior to noderange over socket

Bring the httpapi to the point where the webui is able to start working,
notably bringing the asynchttp online with the websocket.

Fix a flaw in the async ipmi that would cause hangups.
2024-04-04 17:13:37 -04:00
Jarrod Johnson
587ccd13cc More work toward asyncio
aiohttp now covers a lot of httpapi GET, and some of websocket.
2024-04-03 16:58:40 -04:00
Jarrod Johnson
198ffb8be6 Advance asyncio port
Purge sockapi of remaining eventlet call

Extend asyncio into the credserver to finish out sockapi.

Have client and sockapi complete TLS connection including password checking

Fix confetty ability to 'create'.
2024-04-01 16:38:10 -04:00
Jarrod Johnson
c1d680d8d8 Merge branch 'master' into async 2024-04-01 12:15:47 -04:00
Jarrod Johnson
34804b2d5f Provide components for cert management with modern XCC
Refresh getcsr and installcert to handle latest firmware.

Also add ability to have pre-existing CSR, and trust the SAN on the way through.

If this becomes more properly a feature, then would likely impose a SAN
on certs, similar to the SSH principals, rather than deferring to the CSR
to get it right.
2024-04-01 12:13:21 -04:00
Jarrod Johnson
1fbaee6149 Further move toward asyncio and reduce PyOpenSSL dep
Since we are rebasing to at least Python 3.6, and with
some extra ctypes wranging of the ssl context, we can likely
remove PyOpenSSL. Take first steps by removing it from 'sockapi'.

Have confluent executable become the 'top level' for eventlet, to allow
work on 'de-eventleting' on 'main.py'.

Rework tlvdata to deal with either a socket or a reader, writer tuple.
Using TLS with asyncio is easiest with the 'open_connection'
semantics, which force either a Protocol handler (callback based) or
dual streams.  While protocol approach ends with a more socket-like
'transport', the 'protocol' half is a bit unwieldy. So reader and writer
streams instead.
2024-03-29 16:23:45 -04:00
Jarrod Johnson
668c5af261 Bugfix and rework consoleserver a bit
Fix incorrect syntax in ssh.py, and correct direct asyncio
call of sock_recv when it must be called on the loop.
2024-03-25 15:18:05 -04:00
Jarrod Johnson
b1cd7bcd98 Wire up 'configuration/system/all' in async way
This allows the fundamental API call to pass through
2024-03-25 15:16:56 -04:00
Jarrod Johnson
508adc8d03 Merge master into asyncio 2024-03-22 15:52:04 -04:00
Jarrod Johnson
c60bf68cbc Logout prior to renaming user
Some firmware cannot tolerate a web session being
active during a rename.  Make sure logout has been done, and
give a retry if needed to let the session close out after
logging out.
2024-03-22 12:56:09 -04:00
Jarrod Johnson
6ad0e773de Actually have the vformat override return
Performing the super() is hardly helpful if it
doesn't actually copy the return behavior.
2024-03-21 16:28:49 -04:00
Jarrod Johnson
5a7d98c6b8 Enhance error reporting
For one, when using confluent expressions, induce {} to be an error to
trigger an error for someone trying to xargs something.

Another is to add warnings when clear does something deliberately, but
is something that might surprise a user, steering them toward
what they possibly might want to do instead.
2024-03-21 16:09:37 -04:00
Jarrod Johnson
13fc5d9f37 Capture better error data on failed syncfiles
syncfiles can often hang up in unexpected ways,
provide a catch-all.
2024-03-20 09:49:25 -04:00
Jarrod Johnson
7a6b03097b Fixup Ubuntu 22 ARM support 2024-03-18 12:24:25 -04:00
Jarrod Johnson
46edd8a49a Add a stub backdoor replacement 2024-03-15 17:11:12 -04:00