2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-19 20:16:04 +00:00

64 Commits

Author SHA1 Message Date
Jarrod Johnson
daef9fa60b Fix confusing nodeconfig error handling
Properly react to error conditions
2018-06-01 16:48:34 -04:00
Jarrod Johnson
22049002bb Fix exitcode references before use 2018-05-17 11:11:11 -04:00
Jarrod Johnson
6cba560f6a Fix nodeconfig handling of general errors
nodeconfig was not handling errors in results well, fix this by
refactoring the nodefirmware facility into it.
2018-05-16 11:21:26 -04:00
Jarrod Johnson
fc7b26eaf7 Remove __init__.py from tracking in client 2018-04-10 16:09:26 -04:00
Jarrod Johnson
91238f1dcb Clean up pure python packaging
Fix __init__.py redundancy, update requirements to current state
of affairs.
2018-04-10 16:06:37 -04:00
Jarrod Johnson
026a027603 Fix normalizing unicode in dicts with lists
If there's a list in a list, normalize that as well.
2018-03-15 12:55:32 -04:00
Jarrod Johnson
0f60fc6df7 Fix uninitialized self._prevdict
self._prevdict was referenced without initialization.
2018-03-07 10:21:35 -05:00
Amanda Duffy
b49531dfa5 Add previous option to nodepower command 2018-03-05 15:41:28 -05:00
Jarrod Johnson
d473d23725 Add ability to specify attribs from environment
This is of particular use for passing passwords safely
into nodeattrib/nodegroupattrib.
2018-02-22 09:55:46 -05:00
Jarrod Johnson
2bfa890faf Actually enable ^=
It was inadvertently omitted.
2018-02-08 19:50:19 -05:00
Jarrod Johnson
cc16aed27a Add ,= and ^= to group management
This greatly simplifies a common group membership task.
2018-02-08 19:30:06 -05:00
Jarrod Johnson
414572f626 Fix nodeattrib
nodeattrib was broken by the nodeconfig changes
2018-02-08 13:45:17 -05:00
Jarrod Johnson
7dbdf2a6aa Add ability to exclude settings
This permits nodeconfig to prune out less interesting pieces of data
2018-02-07 15:46:08 -05:00
Jarrod Johnson
d7322f013b Correct typo 2018-02-06 17:00:45 -05:00
Jarrod Johnson
024d37d633 Add support to show settings detail in nodeconfig
settings have lots of text, provide access through '-d' argument
2018-02-06 16:52:13 -05:00
Jarrod Johnson
8ef90a457a Add comparedefault to nodeconfig command
This allows gathering relevant settings that differ from default
2018-02-06 16:31:20 -05:00
Jarrod Johnson
0afd9beeac Fix nodeconfig error handling
Additionally, make more strong effort to sort the data.
2018-02-05 15:23:13 -05:00
Jarrod Johnson
b37ef7e90c Implement nodeconfig access to system settings
First draft
2018-02-02 17:17:02 -05:00
Jarrod Johnson
d69cca46d0 Rework check_globbing to reduce false positives
First, globbing can only be the cause of a mess up if the given
noderange is a file that matches.

With this we still have:
for node in $(nodelist compute); do nodepower $node; done
As a potential false positive if any node is a range.

For this, offer suggestion of changing directories.

Also, if it had been:
for NODE in $(nodelist compute); do export NODE; nodepower $NODE; done

Another clause can detect that, which has been added.
2017-11-27 10:04:23 -05:00
Jarrod Johnson
78dea26d06 Switch glob suppression to detection
The suppression was unable to be accomplished for bash without
somehow otherwise breaking the shell.  zsh and csh could be better at
one-off glob disabling though.
2017-11-13 11:49:40 -05:00
Jarrod Johnson
cc4950ef75 Opportunistically grab and sort by node
If output comes close enough together, make some effort to group it
so that it will have a higher tendency of looking orderly.  This of
course only does so when it does not interfere with quickly presenting
the data.
2017-11-06 15:47:59 -05:00
Jarrod Johnson
9f3fe01a49 Evolve the concept, it does not currently work 2017-11-02 17:07:44 -04:00
Jarrod Johnson
de6ecdab38 Start work on nodeconfig command
This reworks the client to reuse some bits of nodeattrib, and has
nodeconfig able to read values.
2017-11-01 16:48:17 -04:00
Jarrod Johnson
02018da187 Add aliases to the client library
Replicate for the sake of retrieving values by aliased names.
2017-11-01 13:33:57 -04:00
Jarrod Johnson
8694eca40b Error out a whole noderange if global error occurs
For example, nodeboot with invalid argument failed and then proceeded
to 'boot' phase.
2017-10-13 09:08:12 -04:00
Jarrod Johnson
dad86242a9 Performance optimize abbreviation
Don't abbreviate the same nodes twice when we don't have to.
2017-09-22 10:06:02 -04:00
Jarrod Johnson
a0802dd66e Add natural sort
For output groups with equivalent node counts, sort naturally
by the group text header.
2017-09-22 09:54:28 -04:00
Jarrod Johnson
2063436ccc Reduce context of collate diff
diff mode is less useful with superfluous context.
Suppress context to focus more on differences.
2017-08-15 16:11:38 -04:00
Jarrod Johnson
28259511ed Add abbreviate to collate
Also, perform natural sort on 'nodenames' when not abbreviating
2017-08-14 15:06:57 -04:00
Jarrod Johnson
a571faa215 Implement collate command
Also adjust output to be less buffered for sake of '-w' and other
pipe commands.
2017-08-09 17:08:52 -04:00
Jarrod Johnson
bc9a498683 Provide a library for compact text node data
Some processes (e.g. nodefirmware update) warrant a different sort of
strategy to try to abbreviate, where collation falls short.  For this,
provide a columnar output that changes to line by line if stdout is not
a terminal.
2017-07-26 15:09:56 -04:00
Jarrod Johnson
577456d999 Merge branch 'master' of github.com:jjohnson42/confluent 2017-07-20 11:05:19 -04:00
Jarrod Johnson
a922de2ed6 Have nodeboot continue on non-failed nodes
If even one of a noderange failed to complete the
set boot device step, none would progress.  Change
the behavior so that exit code still happens and
processing does stop on timed out nodes, but go
ahead and reboot those that were fine.
2017-07-18 14:17:46 -04:00
Jarrod Johnson
5a2e4a669b Add a library for confluent version of 'xcoll'
Add a diff function with colorized intra-line diff info
2017-06-29 16:58:02 -04:00
Jarrod Johnson
e0cc67f57a Implement Lenovo Thinksystem and discovery support 2017-06-20 14:56:24 -04:00
Allen Lin37
db15992894 Adding nodegroupattrib to update nodegroups 2017-04-12 10:36:27 -04:00
Allen Lin37
cfd8ac4c75 refactoring nodelist and nodeattrib to use common code 2017-04-06 11:30:08 -04:00
Jarrod Johnson
236d889d5d Fix error on 'isset' data
isset data is to be redacted.  This handles that
situation, and also provides a repr if all else fails.
2017-03-05 09:20:50 -05:00
Jarrod Johnson
f3cfe4ee26 Change strategy for stale data protection
Rather than assuming a global state, have the generator react to
GeneratorExit and clean itself up.
2017-02-15 10:58:08 -05:00
Jarrod Johnson
583e3474ac Do not yield data to discard 2017-02-10 11:37:56 -05:00
Jarrod Johnson
ffbe1ab156 Protect against stale data in new requests
If a caller (reasonably) broke out of a loop, a subsequent call would get old data.
Protect against this by discarding data not consumed if previously called.
2017-02-10 11:20:39 -05:00
Jarrod Johnson
ffd1bdfae3 Clean up nodepower
nodepower boot and reset output was misleading.
2017-02-02 17:00:09 -05:00
Jarrod Johnson
b5fbfe730d Add nodeinventory command
Provide a native confluent client alternative to 'rinv'.
Also add missing flags to nodesetboot.
2016-05-11 17:03:05 -04:00
Jarrod Johnson
bb0e256a98 Convert datetime objects to ISO8601 on the way out
If a plugin iterates a datetime object, decode to ISO-8601 string
on the way out.  This allows plugins to work directly with datetime
objects and allow the messaging layer to normalize it to ISO-8601
2016-04-20 16:51:01 -04:00
Jarrod Johnson
79b1268a75 Tolerate cp437 format text
UEFI output may still be cp437.  Tolerate through
attempting to use it.  UTF-8 continues to be preferred.
2016-03-26 10:02:16 -04:00
Jarrod Johnson
18280ccd8a Fix bad location of auth check
Auth check was erroneously in a place without
ability to check the authenticated state.  Move
the check up the stack.
2016-02-21 15:05:11 -05:00
Jarrod Johnson
a2445e7f65 Have client exit on auth issue
Without this, an auth error will leave client just
hanging without any feedback.  Correct this with
raising an exception for now.
2016-01-28 10:26:28 -05:00
Jarrod Johnson
52aaeef506 Have server avoid sending empty data
While the client can handle it now, have the server
avoid needless processing of '' data from a console
provider.  Address it at the deepest level (the
tlvdata implementation) and a place higher up the stack
to avoid hits to log and such.
2015-10-21 10:30:41 -04:00
Jarrod Johnson
be8d82c6c1 Client behavior fix when server sends 0 data
If the server sends zero data, client could hang as it does recv(0).  Fix this by
returning None in that scenario.
2015-10-21 10:22:49 -04:00
Jarrod Johnson
4090dac50c Fix client having too short a timeout in remote TLS usage
There was a 5 second timeout to establish basic connectivity, but
was mistakenly extended beyond that.  Re-establish default timeout
behavior after connectivity established.
2015-03-26 13:27:57 -04:00