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

20 Commits

Author SHA1 Message Date
Jarrod Johnson
be552cc446 Fix the session reconfiguration automatic response
Previously, it would register 2**x attribute watchers by mistake.  Exponential
growth of threads trying to talk to one BMC is evidently a bad thing.  Fix
this by correctly tracking and cancelling previous attribute watchers.
Additionally, mask a harmless exception brought on by the death of orphaned
pyghmi console objects by having them yell into the endless void rather
than trip on an exception.
2014-04-04 20:45:48 -04:00
Jarrod Johnson
4f2b15dc8e First pass at automatic reconfiguration enablement
The ipmi plugin, at least, is not yet quite right.  Need to
continue debugging having a console session open, then changing
the bmc to a bad address, then changing it back.  I fixed some of
the easier exceptions, but it is clearly still getting quite confused
to the point where 3 or 4 cycles guarantees the console can not easily heal.
2014-04-04 18:40:45 -04:00
Jarrod Johnson
e2e2d884b7 Remove 'null' workaround to UEFI not resetting appmode
Firmware fixes obsolete the need.  The bad behavior on older firmware
is sufficiently tolerable that code to workaround that could have bad
side effects can reasonably be abolished.
2014-04-03 15:01:51 -04:00
Jarrod Johnson
f57060a314 Send clients notifications about changing numbers of clients connecting 2014-04-02 15:48:31 -04:00
Jarrod Johnson
15fefe6d1e Convert states from a number to a string
Remote clients are presented the data as-is rather than trying to coordinate
the meaning of abstract numbers.
2014-04-02 15:14:56 -04:00
Jarrod Johnson
fcf8a36659 Begin tracking disconnected/connecting/connected state in console server
This also has failed connection attempts causing a 30-60 second retry.  Said retry
is done early if a user session attaches in the meantime.
2014-04-02 13:29:04 -04:00
Jarrod Johnson
f7321f4e70 Rename nodes and groups collections
It has been expressed that plural form for collection names are preferred.  Additionally, tab
completion is nicer if names do not share so much leading characters.
2014-03-28 14:59:37 -04:00
Jarrod Johnson
28a9c9b900 Attempt to read in recent state/data from log
The attempt seems to not work right at the moment, but it seems to be in the
right direction and also does grab terminal state.
2014-03-12 17:12:01 -04:00
Jarrod Johnson
2ba93379b7 Track some particularly key terminal states and replay them for new clients
ESXi requires a distinctly different keypad mode and 'shift in' character set.  Track
requests for those states.  Reset on 'null' character, which seems to only be emitted by UEFI
so far.  Ideally, things change such that we can remove that workaround.
2014-03-12 16:16:31 -04:00
Jarrod Johnson
12d3f91d59 Amend connection count to avoid oversized count
Since the log analysis merely needs to know if a connect/disconnect is redundant,
only report 0, 1, or '2' connections to indicate 2 or greater.  log analysis
then would want to seek out a connect with eventdata of '1' and disconnect with
eventdata of '0' and mostly ignore the '2' info.  Desire for more data
could be done by actually counting the connects and disconnects, this is
just to provide a fast path to finding the 'first connection' and 'last disconnect'
signatures.
2014-03-10 13:25:08 -04:00
Jarrod Johnson
bbbb88b2b2 Track how many times a user is connected on connect/disconnect events
For a log reviewer tool to unambiguously understand whether a given user is conceivably watching,
more data is needed.  It doesn't keep track of which disconnect goes with which connection, but
it at least provides a way of detecting whether user is truly disconnected or not.
2014-03-10 13:15:31 -04:00
Jarrod Johnson
466b37495e Implement preliminary console logging facility
Implement the bits and pieces that are at least required for conserver like logging.
This has a plaintext file and a binary metadata file.  The plaintext file basically
resembles a conserver log, while the binary file facilitates faster seeking to points
of interest with the file and much more precise timestamp information.
2014-03-09 20:34:39 -04:00
Jarrod Johnson
2f62e9e6bb Key console session objects by tenant and node
Previously, was just keying by node.  The problem of course being that
the first tenant to connect for a given node name dictates the console
object for everyone else.  Correct this by keying by the tuple of tenant and node together.
2014-02-07 18:59:32 -05:00
Jarrod Johnson
9aa73718b9 Manipulate code to make it conform to pep8 2014-02-06 14:04:02 -05:00
Jarrod Johnson
80d4518a49 Remove more vestiges of the thread support
Also, remove a required function from console interface.  Now a plugin
is only responsible for their thread behavior and never responsible
for the consoleserver mechanism requirement for helping user session
do polling IO.  This is additionally great because it means the
coordination is contained to each session object and many client connections
are not causing multiple calls to iterate the wait loop.
2014-02-06 09:27:38 -05:00
Jarrod Johnson
fd27835424 Remove thread aspect of ipmi.py
This is a work in progress, trying to make ipmi.py theoretically look better.
2014-02-05 09:20:39 -05:00
Jarrod Johnson
50891f235e Implement session loss recovery
When a console object reports disconnect, have mechanism to get back in.
2014-02-01 18:49:36 -05:00
Jarrod Johnson
dae131d40f Fix race condition on console connect
When data was coming in during logon, it was possible for
the handler to be called before rcpts member was initialized.
Correct by initializing rcpts prior to taking any other action.
2014-02-01 09:39:57 -05:00
Jarrod Johnson
c537a124cf Rework get_next_output
Use try/except to catch nonetype case.  For whatever reason, databuffer
could still be None, this should take care of that.
2014-01-28 17:11:55 -05:00
Jarrod Johnson
a8d0ec4c3c Renome current console to consoleserver and refactor 2013-11-02 13:25:56 -04:00