2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 17:43:14 +00:00
Commit Graph

164 Commits

Author SHA1 Message Date
Jarrod Johnson
1311146637 Add some likely aliases for 'show'
If someone starts thinking of it as a filesystem, be obliging.
That means some people might want to 'dir', some people might
want to 'cat' things.  Make it tend to do the right thing.
2014-02-10 19:46:35 -05:00
Jarrod Johnson
5c0d64d17a Try unix socket by default in confetty
If the unix socket is available and nothing specified, try to use that
2014-02-10 19:44:43 -05:00
Jarrod Johnson
0d425f1f9f Add cli support for 'show'
confetty interactive mode can now do 'show' (aka read, retrieve, whatever) on
more abritrary resources.
2014-02-10 19:36:18 -05:00
Jarrod Johnson
2e2451a638 Rename 'powerstate' to 'state' in the /power/state resource.
Embracing a scheme where the primary attribute name of a resource
is named the same as the resource as it makes sense.
2014-02-10 18:38:15 -05:00
Jarrod Johnson
ca87aacaf2 Support console exit and dedicated console mode
Have confetty assume that a plain nodename is a requset for console.
If a console session is started from interactive mode, return to
interactive mode on ctrl-e, c, . rather than exiting.
2014-02-10 18:28:45 -05:00
Jarrod Johnson
de06cb1c34 Fix problem where sockapi enablement broke http api 2014-02-10 10:00:10 -05:00
Jarrod Johnson
3fc39531f4 If a node is specified on the CLI, go straight to console 2014-02-10 09:50:17 -05:00
Jarrod Johnson
0985a717cd Fix SO_PEERCRED auth on unix socket
This allows non-privileged users to be authenticated by SO_PEERCRED.
In the case where the user is not a known confluent user, they are
given a chance to use a name/password.
2014-02-10 09:41:08 -05:00
Jarrod Johnson
fe81465d23 Fix super unix socket access to work
When root or the process owner comes into unix socket, they should
be treated as always authorized.
2014-02-10 09:19:22 -05:00
Jarrod Johnson
563a96f87f Add 'start /node/<node>/console/session' to confetty 2014-02-10 09:16:29 -05:00
Jarrod Johnson
b2d54bf2f5 Correctly detect invalid requests for a particular node 2014-02-09 19:30:46 -05:00
Jarrod Johnson
5aa6e6a26c Further make the sockapi and confetty client fleshed out
Here, fix a few mistakes with how relation objects got messaged out.
Add the ability to cd and ls in the confetty interactive mode
2014-02-09 19:26:48 -05:00
Jarrod Johnson
abab0e5cae Flesh out the confetty interactive console slightly 2014-02-09 17:35:49 -05:00
Jarrod Johnson
51229d8185 Fix socket api double send of auth failure notification
The loop was sending failure back after an iteration of the loop
that fails to authenticate and then again at the beginning of the next iteration.
Remove the end iteration sending so that there is only one iteration of the
message
2014-02-09 14:00:06 -05:00
Jarrod Johnson
15c9f841f0 Have confetty detect disconnect cleaner once more. 2014-02-09 13:45:01 -05:00
Jarrod Johnson
70fad4335a Advance state of the socket interface
Properly implement authentication and switch the protocol over to the tlv
based protocol.  Abandon all thought of the socket being directly accessible.
Any CLI semantics will be in confetty and an appliance wishing to expose that CLI
directly should use standard ssh stuff with a shell of confetty.  The unix domain
authentication support makes this feasible (requires user creation push name into
confluent repository at the moment..)
2014-02-09 10:43:26 -05: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
3dc0128e73 More pep8 cleanup
Clean up the httpapi source to be pep8 friendly and correct
some things noted by flake
2014-02-06 14:21:11 -05:00
Jarrod Johnson
feff4e41c5 Fix mistakes in console interface base class 2014-02-06 14:08:56 -05:00
Jarrod Johnson
9aa73718b9 Manipulate code to make it conform to pep8 2014-02-06 14:04:02 -05:00
Jarrod Johnson
d2d7f04f49 Further simplify ipmi plugin
With the threading complications removed from worry,
continue making the ipmi plugin more straightforward
to read, maintain, and evolve.
2014-02-06 11:08:55 -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
131e64ef0e Fix cval assignment exception
For SOL sessions, the queue could be touched without anything in ipmiq.
Have cval be set to something benign in those cases to avoid a trace in
debug.
2014-02-01 19:43:28 -05:00
Jarrod Johnson
9749c173ac Have command errors raised in the context of the calling code
Errors were not being raised in a manner to actually affect the request
threads.  Address it by having the exceptions raise in the correct context.
2014-02-01 19:41:15 -05:00
Jarrod Johnson
170e7934ca Restructure ipmi plugin logon errors
Make it so that logon errors are raised in the context
of the request(s) that actually care.
2014-02-01 19:28:31 -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
086c18c641 Have ipmi plugin print out traceback data when exceptions would be encountered
For now, see the errors even as they are tolerated.  This allows problems to be fixed
as best as possible.  Ultimately, this will be logged.
2014-01-30 09:47:06 -05:00
Jarrod Johnson
b944677f85 Fix ipmi events if pyghmi spins in an eventloop
If circumstances inside pyghmi cause it to be looping in
an event loop, confluent was getting work done, but
the code to wake up the eventlet greenthreads wouldn't get tickled.
Address this by also waking up waiters in the function that is
invited to the pyghmi event loop party.
2014-01-29 22:08:48 -05:00
Jarrod Johnson
285b1df3a5 Fix problem where plugins could be called twice for same data
If a plugin has a default and is also explicitly defined,
the pluginapi would call the code twice.  Correct this by avoiding
calling the default if specific info not specified already
2014-01-29 17:44:41 -05:00
Jarrod Johnson
55ef78fc64 Correct issues in trying to keep ipmi worker alive 2014-01-29 12:52:57 -05:00
Jarrod Johnson
0e84935876 Report on bad session ids
If an authorized user tries to use a session id that isn't recognized
(for example, a laptop coming out of suspend), cleanly return error
rather than traceback.
2014-01-29 09:12:06 -05:00
Jarrod Johnson
1b6c258934 Last change made exit fail badly, correct that 2014-01-28 17:48:59 -05:00
Jarrod Johnson
7709a52eda Better isolate faults in the ipmi plugin
Previously, one ipmi failure would tank all consoles and commands.
Now, at least console failures are isolated.

Next stop is to isolate command failures, then fix up session recovery.
2014-01-28 17:41:01 -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
892b6b53dd Merge branch 'master' of /gsa/pokgsa/projects/x/xcat/git/confluent
Conflicts:
	confluent/httpapi.py
2014-01-28 12:41:29 -05:00
Jarrod Johnson
9608e782d0 Merge branch 'master' of /gsa/pokgsa/projects/x/xcat/git/confluent
Conflicts:
	confluent/config/attributes.py
	confluent/httpapi.py
	confluent/pluginapi.py
2014-01-28 11:23:36 -05:00
Jarrod Johnson
fe63b1421e Trim as-yet unused attributes.
Have RESTful access to creating nodes work
2014-01-28 11:18:00 -05:00
Jarrod Johnson
b35144e282 Clean up assemble html to be less odd looking 2013-11-26 09:13:22 -05:00
Jarrod Johnson
d8efb18034 Comment out as-yet unused attributes, bring them in as they become relevant 2013-11-25 13:14:41 -05:00
Jarrod Johnson
51f6a6995b Wire up delete buttons to actually work 2013-11-22 19:36:32 -05:00
Jarrod Johnson
7151797402 Have REST explorer provide delete controls where such a function would be supported 2013-11-22 19:19:28 -05:00
Jarrod Johnson
343600c2aa Rework the 'update' button for clearer use alongside other buttons 2013-11-22 18:27:15 -05:00
Jarrod Johnson
163f96177a Fix problem where root collection crashed after previous change 2013-11-22 17:58:38 -05:00
Jarrod Johnson
8913254191 Suppress 'put' for collections in api explorer 2013-11-22 17:57:02 -05:00
Jarrod Johnson
67642b7e19 Rework http json in the following ways:
-defer to document completion (all at once) for more straightforward code
-data only gets into arrays when there is a multitude
-at least for now, 'pretty print' the dumps in http interface
2013-11-22 17:15:46 -05:00
Jarrod Johnson
74da3d64e8 Change the html explorer to defer status code until end to allow for error code 500
to work
2013-11-19 10:22:36 -05:00
Jarrod Johnson
7752bbbc27 Enumerate nodegroups 2013-11-13 15:12:57 -05:00
Jarrod Johnson
5e406d6fa1 Have attribute set return some data
Handle html form arrays with blanks, removing blank values
(more complex usage requires JSON)
2013-11-13 14:52:32 -05:00