2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 03:19:48 +00:00
Commit Graph

48 Commits

Author SHA1 Message Date
Jarrod Johnson
d9ffa10422 Restore power query function
Implement it in a fashion that does not block confetty while long
running power query situations happen.
2017-11-06 10:24:32 -05:00
Jarrod Johnson
9c6b10a166 Sort output from confetty
Sorting can greatly improve the readability of some
confluent functionality.
2017-10-04 09:09:03 -04:00
Jarrod Johnson
563ee96879 Harden confetty to weird text strings
If it can't properly encode to printable, use repr instead.
2017-09-28 16:20:19 -04:00
Jarrod Johnson
9ff7829373 Fix typo in confetty
Strings do not have a startswitch method...
2017-08-16 15:06:48 -04:00
Jarrod Johnson
0393e55eb1 Implement API for reverse noderange
Provide reverse noderange through special
/noderange//abbreviate location.  This should enable
collate to abbreviate noderanges.
2017-08-14 14:41:43 -04:00
Jarrod Johnson
a3c06a00bf Fix confetty behavior when TERM not set
Particularly in non-interactive ssh, TERM is not set.
Assume empty string if TERM is not set.
2017-06-27 14:04:26 -04:00
Jarrod Johnson
e0cc67f57a Implement Lenovo Thinksystem and discovery support 2017-06-20 14:56:24 -04:00
Amanda Duffy
f4c191c280 Fix power off detection 2017-05-02 15:30:39 -04:00
Amanda Duffy
443b678d8a Add power off detection 2017-05-02 14:54:18 -04:00
Jarrod Johnson
43b51eec20 Be more friendly about shlex parsing errors
If user provides bad input, be more helpful and
less fatalistic.
2017-03-01 10:31:00 -05:00
Amanda Duffy
36bc81448e Fix missing ] and add entries to printed menu 2017-01-27 14:25:42 -05:00
Amanda Duffy
fdf74dbf11 Add power options for console commands 2017-01-27 13:44:12 -05:00
Jarrod Johnson
958be7d004 Fix 'cd' to /noderange/nr in confetty
The cd performance optimization caused a problem.  This
commit recognizes /noderange/ as special auto-vivifying
directory that must be 'gotten'.
2016-07-14 09:15:49 -04:00
Jarrod Johnson
16c7429900 Improve interactive performance of 'cd' to slow collections
Sometimes a collection will be slow.  Don't inflict the 'cd' with the slowness, defer until actually
asked to do something that would enumerate said collection.  Accomplish this by checking for
the 'cd' target in it's parent collection, rather than asking to list its contents.
2016-05-09 15:39:05 -04:00
Jarrod Johnson
7ff20e3e39 Close shell interface on remote disconnect 2016-03-13 18:48:58 -04:00
Jarrod Johnson
4442ce1c71 No longer break when prompting for name/password
In the confetty CLI, readline clear history was done as
part of login process.  Since readline is not a given
to accomodate scripting behaviors, no longer do the
clear_history().  The concern I had was that
the password might have gotten into history, but that
seems to not be the case.
2015-11-10 12:56:04 -05:00
Jarrod Johnson
b48cd8b685 Implement basic functionality under windows
Windows support by removing pid file, daemonizing, locking,
and other features.  Goal is to have a freezeable payload.
2015-09-23 11:48:17 -04:00
chenglch
fde68e1320 Fix 'start console session' command error
Command "confetty start /nodes/<node>/console/session" can
not work correctly. This patch aims to add condition judgement
for this command in confetty.
2015-09-08 22:58:44 -04:00
Jarrod Johnson
186929d217 Only conditionally import readline
If stdout is not a tty, do not import readline.  import
readline by itself can cause terminal control characters
to appear in the stdout.  Avoid this by only importing if
there seems to be a sign it is connected to a terminal.
2015-06-26 15:26:44 -04:00
Jarrod Johnson
6204628f43 Add support for inventory
Present 'inventory/hardware/all/' hierarchy.  Currently
only ipmi and 'all/all' works.  The data structure may be amended in
the very near future as well.
2015-04-27 16:57:52 -04:00
Jarrod Johnson
46b7550a41 Fix confetty live reconnect behavior
If on a remote socket, socket.error could be thrown.  A mistake was
made where the Python2.x behavior of ',' on an except clause without
parenthesis misinterpreted socket.error as a variable name to store
instance of socket.gaierror.  Put Parentheses in to declare the desired
behavior.
2015-03-26 14:03:56 -04:00
Jarrod Johnson
77284af60d Rework multiple node result data
Before there was some awkward ambiguity between top level
key names and node names.  For example a node named 'error'
would be tricky.  Address that by allocating a 'databynode'
top level container to clarify the namespace of keys is
nodenames specifically.  Use this to simplify code that
tried to workaround the ambiguity.
2015-03-23 09:38:56 -04:00
Jarrod Johnson
30d34c2527 Fix Unicode error on confetty pipe out
When unicode was encountered, it would through an *encode* error.
Fix that issue.
2015-03-20 17:08:53 -04:00
Jarrod Johnson
41698b2bad Include omitted changes from last commit
I did not include all intended changes in last
commit.
2015-03-19 15:06:31 -04:00
Jarrod Johnson
735cc268d1 Have confetty better handle noderange output
Have confetty print_result make a reasonable assumption to
have noderange based output show relevant node and output.
2015-03-16 10:15:27 -04:00
Victor Hu
1f7a0e77d6 On SLES operating systems, hit an error on the shutdown of
confluent when we call tcgetattr() with the following:
   termios.error: (25, 'Inappropriate ioctl for device')

Before calling tcgetattr, check that the file descriptor
is a tty.
2015-02-10 17:18:16 -05:00
Jarrod Johnson
d06f5cc966 Provide seamless behavior for non-console activity
When submitting an interactive command and encountering error,
have confetty attempt to self heal and resubmit command.
2015-02-03 13:28:21 -05:00
Jarrod Johnson
ae1e3f2b8d Fix tab completion in middle of command
When doing tab completion, ignore content after the current index.
This was confusing the tab completion routine.  Also silently
ignore traces by default
2015-02-03 11:01:05 -05:00
Jarrod Johnson
0cd4ffcd3b Implement client reconnect on server restart
When the server restarts, clients should try to reconnect seamlessly.
Doing so allows maintenance without being overly disruptive to users.
2015-02-03 10:15:08 -05:00
Jarrod Johnon
c60d25f0d1 Fix confetty PTY handling in oneshot mode
When asked to execute a command, do not mess with the terminal
in a way that would incur SIGTTOU when run in background.  This
means that a backgrounded confetty can actually exit rather
than block waiting to be run in foreground.  This won't work
with running a *console* in background, but that really doesn't
make any sense.
2015-01-22 11:52:50 -05:00
Jarrod Johnon
14ce9970ad Fix unicode error on stdout piping
When confetty runs in a UTF-8 terminal, things are fine.  However python
assumes ascii only when piped.  Catch the situation and force utf-8
encoding rather than erroring out in such a circumstance
2015-01-20 16:11:16 -05:00
Jarrod Johnon
384baea038 Handle non-ascii unicode better
Clarify that the data is in UTF-8 where applicable.  It is expected
that clients are capable of handling UTF-8 for now.  Additionally,
the HTML api explorer handling of numeric data is fixed.
2015-01-19 14:45:24 -05:00
Jarrod Johnon
1e8aca1c26 Fix confetty exit on server stop/restart
When the behavior fix for exiting on error was put in, it caused it to fail
exiting when remote disconnects.  Address by showing that the console
is definitely not active as well as exit being required now.
2014-11-04 10:50:37 -05:00
Jarrod Johnon
9dab77e93c Correct confetty displaying stale error information
After implementing timestamps, error data was erroneously persisted.  Address
by deleting the state once consumed in constructing the relevant status string.
2014-11-04 10:12:37 -05:00
Jarrod Johnon
e0e6e36a82 Reference correct dictionary during confetty status update 2014-10-28 16:52:59 -04:00
Jarrod Johnon
522280d6be Fix numerous issues with recent enhancements
The buffer age was not working as intended
The fix to exit on error exited overly eagerly
The log replay failed to report a third value if file did not exist.
2014-10-28 16:45:55 -04:00
Jarrod Johnon
f7fb9d6af2 Fixes around the confluent shutdown facility 2014-10-28 13:42:21 -04:00
Jarrod Johnson
b2102bae30 Add facility for confetty to interact with external controller
For certain scenarios (e.g. wcons), having a path to get in and communicate data from the outside.
For starters, have a 'GETWINID' directive for wcons to use to fetch the unambiguous window id
to use for xwininfo tricks.  TODO includes concepts from xtcd.pl that enabled things like warr
2014-10-07 14:51:58 -04:00
Jarrod Johnon
a907da0532 Avoid trying to set title on incapable terminals
If running on a VC, for example, without benefit of tmux or anything, must suppress escape sequences.
2014-10-06 16:51:56 -04:00
Jarrod Johnon
cf6c32b055 Exit on console-only execution if an error is encountered
If console can not be established (e.g. the node doesn't exist), confetty would drop to interactive.
Address by exiting if the path falls that way.
2014-10-06 15:52:06 -04:00
Jarrod Johnon
4443d67da6 Implement timestamp reporting
Have confetty include the vintage of incoming data so that user may know how likely the
data is relevant to now.
2014-10-06 15:13:09 -04:00
Jarrod Johnson
e9ac1617a8 Add a 'reopen' capability to client
If client wants to force a reconnection, they can send ctrl-e, c, o, just as in conserver.
2014-08-28 13:58:31 -04:00
Jarrod Johnson
cb631ee40f Fix issue with client state corruption on errored console start
Previously, the console start path would bail out without consuming the '_requestdone' message.
Correct this by reading until requestdone is seen as required by protocol.
2014-08-27 14:29:53 -04:00
Jarrod Johnson
c70f365cd2 Add support for RPM builds
add supportfor pam authentication
2014-07-14 14:54:12 -04:00
Jarrod Johnson
426eeb209f Fix incorrect output on disconnect for cli mode
The '.' command would fail to exit the function, causing the 'help' output to occur.
Fix this by having the '.' command processed in the same manner as the rest.
2014-07-01 12:57:14 -04:00
Jarrod Johnson
2d0fde3f42 Provide more detail in invalidargument
invalidargument was not particularly helpful by itself
improve things by adding more helpful information in the error strings.
2014-05-09 17:18:17 -04:00
Jarrod Johnson
542da958db Have 'bad request' errors be more informative 2014-05-09 16:38:55 -04:00
Jarrod Johnson
2f5dede1b4 Add bits and pieces to facilitate pypi packaging 2014-05-06 15:01:35 -04:00