2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-17 05:10:52 +00:00

33 Commits

Author SHA1 Message Date
Jarrod Johnson
659c4e4217 Avoid trace on deleted node
If a node is deleted, act similar to if it were defined with no console.method, to avoid
superfluous trace output.  In the future, it may make sense to filter out nodes with no
console.method earlier, since a fair amount of startup work is done that is ultimately ignored
for situations where console is not enabled.
2017-08-02 10:00:16 -04:00
Jarrod Johnson
8126ec3791 Implement 'memory' console.logging scheme
Provide way for VT to be maintained without log to file.
2017-06-26 09:18:30 -04:00
Jarrod Johnson
e0cc67f57a Implement Lenovo Thinksystem and discovery support 2017-06-20 14:56:24 -04:00
Amanda Duffy
9d86ffee92 Add exception check if passvalues is empty 2016-09-22 16:58:00 -04:00
Jarrod Johnson
d19fdad0ba Avoid double-disconnect behavior
Do a better job of cleanly handling scenarios
where disconnect would come from a session currently
disconnected.  Inside the ipmi plugin, suppress a
disconnect event if one has been sent.  Inside
consoleserver, surpress logging a disconnect when
already disconnected.

Originally was going to skip the reconnect, but that would
mitigate recovery.  Hopefully supressing the duplicate
disconnect in ipmi plugin, and some fixes in pyghmi will
avoid a 'double connect' scenario.
2016-09-12 14:35:27 -04:00
Jarrod Johnson
f85ee82df3 Revert last portion of attempt at console auto-health
For now, it's causing more problems than it solved.  Back out until
a more appropriate time to investigate.
2016-05-25 13:09:10 -04:00
Jarrod Johnson
20abffdbee Revert "After 60 seconds of 'connect' limbo, kick a connection attempt"
This reverts commit e4aa8731413b736584e282470b41b35afd75a25d.
There may be some memory consumption issues with this feature.
2016-05-25 10:59:22 -04:00
Jarrod Johnson
e4aa873141 After 60 seconds of 'connect' limbo, kick a connection attempt
Occasionally it was observed that systems would be just stuck in 'connect',
provide a backup system to detect and forcibly kick the console in such a case.
2016-05-19 15:39:04 -04:00
Jarrod Johnson
ec02097b52 Explicitly check IPMI console health
In theory, pyghmi should be doing a self-health check.  It has been discovered at scale that
this self-health check may encounter issues.  For now, try to workaround by having another
health check at the confluent level, deferred by console activity.  It's also spaced far apart
so it should not significantly add to idle load (one check every ~5 minutes, spread out).
2016-05-19 14:44:28 -04:00
Jarrod Johnson
d9e47824a4 Backoff automatic reconnect interval
Previously, offline nodes would be rechecked automatically on average every 45 seconds.  Extend this
to on average 180 seconds, to reduce ARP traffic significantly when there are a large volume of
undefined nodes.  The 'try to connect on open' behavior is retained, so this would mean a longer loss
of connectivity only in a background monitored session.
2016-05-11 13:33:36 -04:00
Jarrod Johnson
58bf72d5aa Do not remove databuffer on close
If exiting from a shell session, the databuffer will contain needed info for the client
to work properly.  Preserve databuffer existence.  Responsibility for deleting the
object should be in the hands of the caller.
2016-03-16 09:09:24 -04:00
Jarrod Johnson
8bf7a55b68 Prevent double firing of event in consolesession
There is a timing scenario where an event could be double fired.
Prevent by clearing the event when sent.
2016-03-05 15:42:17 -05:00
Jarrod Johnson
64751bccee Add closesession request to term sessions
This provides a method for client to request session be closed down.  This provides more
immediate responsiveness to the client count when closing such a terminal.  With this
both closing a single window and doing a 'logout' immediately impacts clientcount.
2016-02-28 14:15:08 -05:00
Jarrod Johnson
029c06cc66 Have polling consoleserver sessions more robustly clean up
If anything goes wrong or a session was exited, no destruction of the
session would be scheduled.  Always have a reaper scheduled for that.
2016-02-27 13:37:10 -05:00
Jarrod Johnson
2419d95b74 Rework session to console relationship
Previously, was using counters to track the relation, also had distinct tracking of users versus
callbacks.  Unify the callback and user into a single 'session' attach and then use the size
of the set of sessions and their declared users rather than trying to maintain a counter on the side.

This change simplifies the relationship, changes away the logging and clientcount counter for
a more robust strategy, and paves the way for the dependent ShellHandler to terminate connected
sessions when the shell session dies.
2016-01-08 14:44:49 -05:00
Jarrod Johnson
a332678312 Avoid double connect on shell start
When a shell session is initiated, it registers
a recipient at the same time it would be trying
to establish session for not being a 'wait for
recipient'.  Aggressively mark the state as connecting
to avoid the recipient erroneously thinking things have
not be set into motion yet.  Additionally, have the ssh
plugin avoid a traceback when disconnecting before completing
connection.
2016-01-08 14:44:39 -05:00
Jarrod Johnson
5695bf5288 Fix misuse of console log for shell sessions
console logging assumptions are not valid for shell sessions.
Correct by modifying the buffer init code to be conditional
and adding a stub 'log' to the ShellHandler class.
2016-01-08 14:44:32 -05:00
Jarrod Johnson
ff857bce14 Retrofit consoleserver and make shellserver
Provide a common 'shellserver' capability cloned off of 'consoleserver'.
This will enable the concept of per-user shells with option for multiple
shells per.  Each user will have their own set of shell sessions rather
than shared across users.  Can revisit in future if sharing between
users is desired.
2016-01-08 14:44:25 -05:00
Jarrod Johnson
9868e55958 Handle unicode string from a console plugin
If a console plugin feels like outputting data
in a unicode string, accept that data by encoding
to utf-8.
2015-10-21 13:24:41 -04: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
48b73f6857 Better handle random exceptions in console plugins
If a console plugin raises some unrecognized exception,
handle it more gracefully with trace log capture and moving
on.
2015-02-27 12:17:28 -05:00
Jarrod Johnson
5137f1881a Try to avoid going into negative client count
The root cause for negative has not been determined,
however reduce the hypothetical exposure to the issue
in the hopes of filtering out extraneous problems.
2015-02-27 12:10:24 -05:00
Jarrod Johnson
9530f76af3 Avoid attempting to log negative client count
If another bug causes client count to go negative,
at least avoid sending that mistake to log, except
as part of a trace log.
2015-02-27 11:54:43 -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
87ed69265a Add missing time import
consoleserver.py failed to import time to support new
buffer age functionality
2014-10-28 16:49:25 -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
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 Johnon
37549481b6 Fix double connect on logging change
When logging was changed from none to full, it would always
start and immediately abort connecting to start again.
Change this by deciding which connection liveness strategy
to use based on how many settings changed.  If just logging
changes, then connect only if not connected or connecting.
If more changes, then skip that kinder strategy and go straight
to reconnecting.
2014-09-30 11:21:01 -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
276ba4abd7 Correct behavior of various paths when node does not exist 2014-08-26 14:03:15 -04:00
Jarrod Johnson
a7398198d4 Fix shell execution on node removal 2014-05-29 10:28:04 -04:00
Jarrod Johnson
5bcde84e14 Fix cpu churn when web sessions open and idle
It turns out that eventlet.green.threading.Event() doesn't behave very efficiently in this context for whatever reason.
Use eventlet.event.Event() instead.  It was not used before due to lack of timeout and clear, but that is overcome by
disposing of it rather than reusing and using with eventlet.Timeout() to add timeout to wait that doesn't have built in timeout.
2014-05-15 16:22:28 -04:00
Jarrod Johnson
c5cb5649d5 Begin reorganizing content for packaging 2014-05-06 13:37:31 -04:00