2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-26 01:34:09 +00:00
Commit Graph

140 Commits

Author SHA1 Message Date
Jarrod Johnson 4c3f93765f Have async and traditional client
Since a lot of the traditional client did not need async,
make life easier by just having them in parallel for now.

The server must use the async client, but the client applications can
stick with the somewhat more straightforward synchronous client.
2024-05-29 12:23:05 -04:00
Jarrod Johnson fbdb35e33d Merge branch 'master' into async 2024-05-16 15:42:22 -04:00
Jarrod Johnson f6fc539df9 Remove disused recvmsg ctypes wrapper
Since going to builtin python recvmsg, remove
the ctypes wrapper.
2024-05-09 09:48:11 -04:00
tkucherera 930ff3e20d fix error message 2024-05-02 10:41:30 -04:00
tkucherera 39fb229ef1 check update args before setting anything 2024-05-02 10:29:20 -04:00
Jarrod Johnson afa0c0df5a Merge branch 'master' into async 2024-04-22 14:36:42 -04:00
Jarrod Johnson b606882327 Have collate preserve relative whitespace
The change to tolerate either a space or no space ended up
greedily consuming whitespace.  Do best possible in two cases:

For log, use the first line as a clue, and consistently pad or not pad
according to first line.  It won't catch different pad strategies, or
handle first line being indented but other lines not being indented.

For the textgroup variant, allow subsequent lines to revise the
pad downward, and accept any whitespace, not just space.
2024-04-19 08:22:32 -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 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 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 508adc8d03 Merge master into asyncio 2024-03-22 15:52:04 -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 da63543a70 Advance the state of asyncio port 2024-03-15 12:50:04 -04:00
Jarrod Johnson d42e8e0921 Further asyncio port of confluent
Advance state of basic clients to advance testing and soon start doing
deeper activity.
2024-03-06 16:50:34 -05:00
Jarrod Johnson 0a8ec96cdf Further progress toward asyncio
Basic operations can now happen with some async flows.
2024-03-04 16:18:55 -05:00
Tinashe 190ec2473b dump log to stfout with timestamps 2023-05-31 17:39:53 -04:00
Jarrod Johnson 34741cfaf2 Clear terminal after full draw
A resize may need cleanup below
the output.
2022-12-14 16:14:34 -05:00
Jarrod Johnson 9dce7d31ea Change screensqueeze to render in-line
Try to avoid clear screen and work within a logical
area under the command being run
2022-12-14 15:47:33 -05:00
Jarrod Johnson 511fbe987b Suppress redundant output when writing to non-tty 2022-12-12 13:41:48 -05:00
Jarrod Johnson 97c520db10 Make error message more clear 2022-07-19 10:16:48 -04:00
Jarrod Johnson af19e98ce8 Remove use of eventlet in client side
The client side does not use eventlet, so allow
fallback to the normal socket and select
to keep the client module whole in the
face of that missing.
2022-06-08 11:03:56 -04:00
Jarrod Johnson 739890471d Support newer python that removes fromstring
Python 3.9 does not understand the fromstring function anymore.
2022-06-06 11:37:39 -04:00
Jarrod Johnson c328fea49a Cleaner output on cli
Based on feedback, remove the added 'inlet_' from pdu
output.

Also, fix geist plugin to block unsupported
features for now.
2022-05-11 16:01:43 -04:00
Jarrod Johnson caba650143 Add nodepower arguments for PDU operations 2022-05-11 14:59:54 -04:00
Jarrod Johnson 5285691344 Correct fix for the python3 compatibility 2022-04-13 17:32:43 -04:00
Jarrod Johnson c533c973b1 Fix python3 compatibility with termhandler 2022-04-13 17:00:27 -04:00
Jarrod Johnson dfc9b0901d Improve feedback on no match found for log search 2022-04-08 12:59:36 -04:00
Jarrod Johnson 4b988e0633 Integrate logreader into nodeconsole as a feature 2022-04-08 12:29:45 -04:00
Jarrod Johnson 1ef0a61ed1 Move logreader to be a library in client 2022-04-08 12:12:02 -04:00
Jarrod Johnson e7b1791df3 Modify input in bandit-friendly way
bandit erroneously flags 'input' based
on possible python2-ism.  Avoid the
error by using 'getinput', making that
input or raw_input based on the python version.
2022-02-08 10:59:15 -05:00
Jarrod Johnson 2ef2e4d039 Fix gathered output with non-rectangular geometry
If we don't have a nice rectangular count of systems,
the last row must tolerate index error in column.
2021-11-16 06:37:59 -05:00
Jarrod Johnson 7b23ee9c7c Organize squeeze vertically
The web gui and ls on cli use organize output this way,
so squeezed node output should be same.
2021-11-15 10:25:00 -05:00
Jarrod Johnson 55fc3bda51 Fix nodersync with output redirection
Variables were left unitialized, use them only
in the tty path.
2021-11-15 09:20:31 -05:00
Jarrod Johnson e749f8f8d5 Prioritize columns over rows
Do not make columns when the noderange is too small
to warrant them
2021-11-04 12:44:47 -04:00
Jarrod Johnson 831b129899 Correct syntax error in confluent client 2021-07-15 12:39:38 -04:00
Jarrod Johnson f7a80c6ac0 Fix nodeattrib when a list member is 'broken'
If 'broken' was used as a group name, it would behave incorrectly.
Only check 'broken' for dict types.
2021-07-14 08:06:52 -04:00
Jarrod Johnson 83d92ecfcc Make file descriptor passing python2 friendly
python 2 did not have recvmsg/sendmsg,
so have to use ctypes to access
them through the c library.
2021-02-26 16:17:43 -05:00
Jarrod Johnson facd501100 Merge branch 'master' into passfilehandle 2021-02-19 15:44:55 -05:00
Jarrod Johnson 4c6f41ffb2 Have nodeconfig error on missing attributes per node 2021-02-19 14:36:51 -05:00
Jarrod Johnson 0b5c4f6f0f Progress client managed filedescriptor 2021-02-18 14:58:45 -05:00
Jarrod Johnson 3c6511a0e7 Actually have a file handle pass
Rely upon python 3 for now. When the dust settles, either convert to
python 2 friendly use of ctypes, or alternatively just block using
the pass filehandle function in older python.
2021-02-17 17:04:16 -05:00
Jarrod Johnson c525a08c17 Correct a number of mistakes in the draft commit 2021-02-17 14:34:45 -05:00
Jarrod Johnson edaaafa059 Begin work on passing filehandles for local cli
This would enable files to be uploaded/downloaded
using the client filehandles, overcoming awkward
difference in file privilege between client and
server.
2021-02-17 13:54:18 -05:00
Jarrod Johnson 6d8474a16a Fix node errors being swalled by print_error
Node specific errors were not processed, correct
that oversight.
2021-01-19 12:16:22 -05:00
Jarrod Johnson 814857a706 Update client side aliases to match configmanager 2020-08-20 10:53:21 -04:00
Jarrod Johnson 4a23ca3db1 Have blank values end with :
This is a bit more obvious for grep.
2020-07-10 08:28:28 -04:00
Jarrod Johnson b112cb0f16 Have unset and blank values look similar
This looks weird in collate otherwise
2020-07-09 17:00:44 -04:00
Jarrod Johnson b4b733a573 Fix attribute sort with python 3
For attributes without a sortid, sort was failing with python3
2020-01-22 14:24:10 -05:00
Jarrod Johnson c441739f68 Try a less jarring exit strategy
Have client not provide a developer looking trace on abort.
2019-10-23 14:41:57 -04:00