2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00
Commit Graph

235 Commits

Author SHA1 Message Date
Jarrod Johnson
43c6ed5c93 Amend the notification structure to better bind attributes to nodes 2014-04-01 14:10:30 -04:00
Jarrod Johnson
fda2dd08d1 First pass at configuration change notification
Add ability for code to add watchers on nodes and their attributes.  This is likely to
be reworked internally to better aggregate requests, but the code interface
is potentially complete.
2014-04-01 11:01:26 -04:00
Jarrod Johnson
9d8ff78716 Fix persistence of group data on node deletion. 2014-03-28 16:42:36 -04:00
Jarrod Johnson
f326a03d33 Fix attributes plugin for api rename 2014-03-28 15:29:48 -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
e96e4bd527 Fix bug with log replay without log
Without log, termstate was left as non-numeric None.  Correct
to set to zero if still None by the time return happens.
2014-03-18 16:30:37 -04:00
Jarrod Johnson
2742e83751 Fix order of text log reassembly
The facility was incorrectly reassembling the text records in reverse order.  With this change,
the set buffer from log function seems to be working as intended.
2014-03-12 19:50:42 -04:00
Jarrod Johnson
92210a9097 Only set most recent state
Before, it would delve back to set state if recent entries indicated to not
assert the tracked states.  Correct that behavior so only last entry counts.
2014-03-12 17:14:00 -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
83627938bb Fix problem on disconnect from console session
After refactor, some bad codepath was left behind in confetty.  Address the
shortcoming.
2014-03-06 19:49:46 -05:00
Jarrod Johnson
65af925b2d Add quick and dirty example of a command
'nodepower' is not yet 'rpower' like, but it's a quick
demonstration of using the python confluent client library.  It
only supports unix socket as written
2014-03-04 21:09:17 -05:00
Jarrod Johnson
a5504ec62f Refactor/rename code
confetty had a lot of stuff in it.  Factor out bits to a common library for
constructing purpose oriented commands.
2014-03-04 17:12:19 -05:00
Jarrod Johnson
04faa9fdfd Correct typo of 'nodes' as 'node' 2014-03-03 20:16:14 -05:00
Jarrod Johnson
9617d1f4a4 Implement dbm style backing for the configuration persistence
The pickling would get horrendously slow as total node count increased.  This meant very long time to sync
to disk for just one change out of 65,000.  This strategy changes things to more selective and only
do things for the dirty keys rather than everything.  Large changes to small amounts of nodes will take
more time (because more calls to dump pickle), but small changes to a small subset of nodes will take much
less time.
2014-03-03 20:01:13 -05:00
Jarrod Johnson
7595984cb9 Have socket api gracefully handle client disconnect
When client disconnected, an unsightly trace was incurred.
Properly handle that particular scenario and proceed as intended.
2014-03-03 16:03:10 -05:00
Jarrod Johnson
7caa9f741f Have sockapi stay alive through as-yet uncaught circumstances
Previously, the client would be left hanging.  Correct that by
keeping the session alive and notifying the client of the unexpected
condition.
2014-03-03 15:52:12 -05:00
Jarrod Johnson
3e1f90882f Fix confetty client behavior when trying to show something that is 404 2014-03-03 15:48:33 -05:00
Jarrod Johnson
79fc5faaf6 Fix problem where reordering groups did not affect inheritence
There was an optimization to skip examination of groups if it was determined
that the group membership had not changed.  However, this erroneously
masked the examination in the case of reordered groups.  Skip the
optimization to cover that case at the expense of at least some needless churn.
This only happens when something goes to change group membership in some way, so
this shouldn't be too expensive.
2014-03-03 15:35:08 -05:00
Jarrod Johnson
811ca61747 Fix problem where broken expressions were not gracefully handled
Now when expressions can not be completed, the reason is presented as 'broken'.
Additionally, when unsetting a value that would affect expressions,
perform appropriate changes.
2014-03-03 14:48:46 -05:00
Jarrod Johnson
c56d0ac5a1 Jot down notes about things to do 2014-03-02 13:05:19 -05:00
Jarrod Johnson
5773c3d237 Implement more robust input handling of attributes
Instead of naively looking for '{', use format() to thoroughly check and
support escaping { and } with {{ and }}
2014-03-02 13:01:19 -05:00
Jarrod Johnson
9bf68c1639 Fix expression detection with unicode strings
If data was coming in as unicode strings (as is the case in the json
parser), it failed to treat the data as equivalent to string.  Correct
by checking both str and unicode for now
2014-03-01 10:48:08 -05:00
Jarrod Johnson
96a7f197d6 Jot down some notes on bugs that need to be addressed 2014-02-27 12:28:45 -05:00
Jarrod Johnson
271e9076c1 Fix relative paths for non-collection resources in confetty 2014-02-24 11:02:09 -05:00
Jarrod Johnson
a8ee40250c Accept alternative javascript input for alternative terminal
implementation.
2014-02-23 21:48:01 -05:00
Jarrod Johnson
9292d89751 Avoid crashing out if someone does too many '..'.
If user tried to change to more parent directories than existed,
confetty would rudely shutdown.  Truncate such a case to '/' rather
than bail.
2014-02-22 22:15:41 -05:00
Jarrod Johnson
2578fd5817 More gracefully fail when client goes off the rails.
A client with certain URLs that go off the end of the valid world was
causing exceptions to be thrown not of the set of 'tame' errors.
Denote them as 404 since that is the nature of the failure.
2014-02-22 22:08:46 -05:00
Jarrod Johnson
5dc3bbcddd Theoretically add JSON support for data input to HTTP API
I have not yet tested this support to assure it works.
2014-02-22 21:58:21 -05:00
Jarrod Johnson
ea7d3a268c Implement 'unset' in confetty interactive cli.
Provide a means to clear node specific settings so that inheritance can be restored.
In JSON, send a null as a value for a parameter instead of a string or 'object'.
2014-02-22 21:53:34 -05:00
Jarrod Johnson
7c7754d319 If specifying an attribute as a resource, strip the path info to make it work. 2014-02-22 21:22:45 -05:00
Jarrod Johnson
f7c1dc8385 Have ipmi plugin recognize the rename to nextdevice 2014-02-22 21:14:55 -05:00
Jarrod Johnson
661d6b3eef Rename boot/device to boot/nextdevice
In order to make it more suggestive that the parameter means 'next one-time boot',
use different words.
2014-02-22 20:41:15 -05:00
Jarrod Johnson
3d3f820a7d Correct two protocol violations of TLV
One was the client going away without contemplating the done flag.
Another was the server sending two requestdone messages.
2014-02-22 20:38:33 -05:00
Jarrod Johnson
11138aa3de Fix confetty interactive behavior after set
After set, confetty client would fail to follow protocol and
end up leaving followup commands in an off by one state.  One
TODO out of this is to refactor send_request into a library function
2014-02-22 20:22:23 -05:00
Jarrod Johnson
387523f46b Implement 'set' in CLI
While testing set, it was noted that JSON loads does unicode.  Modified configmanager
to treat unicode like str type.
2014-02-22 20:10:13 -05:00
Jarrod Johnson
e236260c3b Have console assume ipmi if no data given, like hardwaremanagement 2014-02-22 19:28:41 -05:00
Jarrod Johnson
f6ed5b5e14 Have confetty interactive attribute show be more informative 2014-02-22 19:12:42 -05:00
Jarrod Johnson
70b7b62c0f Give messaging layer full info about attributes in attributes plugin.
Messaging layer was unable to contemplate adding info about inheritance and expressions.
2014-02-22 18:20:07 -05:00
Jarrod Johnson
7894a056e1 Remove some debug output 2014-02-22 18:13:21 -05:00
Jarrod Johnson
896159da4c Recognize expressions at node/nodegroup creation time 2014-02-22 18:12:21 -05:00
Jarrod Johnson
56ae101366 Disable beep on completion attempt
The beep on completion attempt was highly annoying, disable it.
2014-02-22 17:39:05 -05:00
Jarrod Johnson
a8f48c7955 Assure something that goes in as path to fullpath comes out as path 2014-02-22 17:31:08 -05:00
Jarrod Johnson
974902cc7b Advance state of tab completion in the interactive console
Fix relative tabbing
2014-02-22 14:43:12 -05:00
Jarrod Johnson
71f6199b2e Fix display of 'None' attributes
Previously, assumption was that the response data would be a dict.  This
is not always the case.  If None is encountered, treat it as a blank attribute.
2014-02-22 14:18:20 -05:00
Jarrod Johnson
499377271c Correct setsockopt call argument to correct protocol 2014-02-22 14:12:39 -05:00
Jarrod Johnson
d8619e76b9 Improve interactive latency
While typing in confetty console in blind test and confetty was using a TLS socket,
the confetty console was noticably chunkier.  The chunkiness could not be detected
on a UNIX socket.  Setting NODELAY on both sides of the socket seems to have eliminated
chunkiness so that at least I can't tell confetty from ssh+ipmitool anymore.
2014-02-22 14:04:43 -05:00