Command "confetty start /nodes/<node>/console/session" can
not work correctly. This patch aims to add condition judgement
for this command in confetty.
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.
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.
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.
There was a 5 second timeout to establish basic connectivity, but
was mistakenly extended beyond that. Re-establish default timeout
behavior after connectivity established.
Be more sparing with 'ok' and '()' in output. Many of the sensors
have no particular meaning if they are 'ok'.
For a sensor witohut a value, the states are no longer surrounded by
() to reflect that they are more first class rather than describing
a primary value.
nodesensors is not roughly at par with rvitals.
This means more complete handling and recognizing
some of the rvitals shortcuts as well as some mistakes
in the draft. Still lacking are interval/repeat queries.
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.
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.
When doing tab completion, ignore content after the current index.
This was confusing the tab completion routine. Also silently
ignore traces by default
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.
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
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.
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.
After implementing timestamps, error data was erroneously persisted. Address
by deleting the state once consumed in constructing the relevant status string.
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.
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
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.
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.