2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 19:40:12 +00:00
Commit Graph

496 Commits

Author SHA1 Message Date
Jarrod Johnson
97c928350c Provide for configuration file specification of http listen
Establish a config file for certain configuration parameters that
control service startup and things that are best managed via out
of band configuration file and easiest to do with a restart.  For
now, implement control of http service binding.

From Lucio Seki
2015-07-02 13:23:48 -04:00
Jarrod Johnson
2d9df67272 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/confluent 2015-07-01 15:14:28 -04:00
Jarrod Johnson
e11a749fa4 Mandate that all http collections return children as list
Currently, an empty collection has no 'item' entry, a singleton value, or
a list depending on whether it has 0, 1, or more children.  Modify this so
that at least 1 and more children are consistent.
2015-07-01 15:14:04 -04:00
Jarrod Johnson
186929d217 Only conditionally import readline
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.
2015-06-26 15:26:44 -04:00
Jarrod Johnson
86f66e9795 Implement a resource to decode alerts
This allows a standalone trap handler to request
decode from confluent via API interfaces.
2015-06-26 15:20:24 -04:00
Jarrod Johnson
5a610f23ca Fix numerous issues with the key protection
The passphrase protection had a number of issues and this corrects them.
2015-06-11 17:43:48 -04:00
Jarrod Johnson
3d5fa74f4f Add 'record_id' field to events
Provide method for plugins to pass through through an event identifier for
entries in the log.
2015-06-11 09:35:52 -04:00
Jarrod Johnson
fefe1dc9e8 Add alert destination configuration
Alert destination configuration is now added.  This depends on
an as yet unreleased pyghmi capability.
2015-05-29 17:04:25 -04:00
Jarrod Johnson
7b02954da8 Reorder core resource list in alphabetical order
Clean up ordering to be in (roughly) alphabetical order
so it's a tad easier to follow.
2015-05-29 11:17:44 -04:00
Victor Hu
6ab1ae0c38 Implemented functions for start() and stop(). The restart case will
call the stop() and start() functions.

Impemented the status case so that 'service confluent status' will
return the state of confluent daemon.
2015-05-18 14:00:35 -04:00
Jarrod Johnson
6a1da9e84f Merge branch 'master' of ssh://git.code.sf.net/p/xcat/confluent 2015-05-15 16:52:14 -04:00
Jarrod Johnson
c6d0d87ca9 Add event log to interface
Add a draft event log interface along with an ipmi implementation.
This requires current git master of pyghmi.  Release of pyghmi will
be done before this commit lands in a confluent release.
2015-05-15 16:49:52 -04:00
Victor Hu
bfc7ea2b51 Add "shutdown" as a valid InputPowerMessage to prevent this Bad Request Error:
Error: Bad Request - shutdown is not one of reset,on,boot,off
2015-05-06 11:55:07 -04:00
Victor Hu
7baec5a69f In load_plugins, check for __init__.py files and avoid adding
them into the pluginmap
2015-05-05 16:36:04 -04:00
Jarrod Johnson
7cda6f7d6e Add support for fetching single component inventory
Like sensors, ipmi plugin now supports fetching individual component information.
2015-04-28 10:37:47 -04:00
Jarrod Johnson
2ab2fbda27 Make ipmi inventory more closely resemble sensors
Have the inventory data enumerate in one list rather
than a bunch of distinct lists.
2015-04-27 17:16:45 -04:00
Jarrod Johnson
6204628f43 Add support for inventory
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.
2015-04-27 16:57:52 -04:00
Jarrod Johnson
b97cd79c3a Fix unhelpful timeout message
ipmi plugin was incorrectly constructing the message about timeout causing
the client having no idea what actually failed.
2015-03-26 16:13:54 -04:00
Jarrod Johnson
d2f400d982 Fix messaging about configuration
A mistake was made in the messaging layer consistency fixes.  This caused the attributes plugin to fail
with unexpected errors.
2015-03-26 15:28:52 -04:00
Jarrod Johnson
46b7550a41 Fix confetty live reconnect behavior
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.
2015-03-26 14:03:56 -04:00
Jarrod Johnson
a28b67e9aa Have confluent log sessions out at exit
While the native perl threading object will do join() on exit,
eventlet's variant does not.  Fix this by manually hooking join() in
via atexit.  Since this is an eventlet specific thing, it makes sense
to work the issue in code that patches in eventlet rather than in pyghmi
itself.
2015-03-26 13:46:45 -04:00
Jarrod Johnson
4090dac50c Fix client having too short a timeout in remote TLS usage
There was a 5 second timeout to establish basic connectivity, but
was mistakenly extended beyond that.  Re-establish default timeout
behavior after connectivity established.
2015-03-26 13:27:57 -04:00
Jarrod Johnson
c98d2e32d3 Have socket API shrug off client disconnect
If a client fails to stick around for data, shrug it
off rather than adding to stderr log.
2015-03-26 10:59:51 -04:00
Jarrod Johnson
2fe0425191 Have confluent client commands quietly exit on Ctrl-C
Pythons default handling of Ctrl-C is not in line with most command line utilities.
Wrap the exception and imitate more conventional behavior.
2015-03-26 10:38:44 -04:00
Jarrod Johnson
27437048a6 Fix nodehealth silently ignoring errors
nodehealth command did not act on errors.  Add a clause
to handle that data.
2015-03-26 10:17:03 -04:00
Jarrod Johnson
17b5d5a816 Fix issue where ipmi plugin would continue despite error
In changing to do multi-node, some flow was altered.  Where it would
formerly cease execution, the changes made it continue.  Add return
statements to match everywhere that return statements were effectively
removed.
2015-03-26 09:53:34 -04:00
Jarrod Johnson
26a969c41a Fix silent feedback to client in some ipmi scenarios
Provide specific feedback to client when possible.  When not possible,
at least get condition into the correct trace log and notify client of
condition.
2015-03-26 09:24:23 -04:00
Jarrod Johnson
093e9faec4 Fix various client issues
Usage messages when no noderange, consistent use of the environment variables for login,
fix nodehealth when a troublesome sensor has a value.
2015-03-25 17:19:58 -04:00
Jarrod Johnson
0d893f8887 Packaging fixup in preparation for 1.1 release cycle
Fix email addresses, fold common into client, add pyparsing dependency.
2015-03-25 13:52:59 -04:00
Jarrod Johnson
802ac6fa66 Add nodeidentify command
Provide xcat-style access to confluent identify capability (rbeacon-alike)
2015-03-25 10:57:57 -04:00
Jarrod Johnson
d53c4dce58 Natural sort of group names when collection queried
Keeping with the theme of natural sort, apply it to '/nodegroups/' requests.
2015-03-25 10:01:44 -04:00
Jarrod Johnson
1c6430bf3f Allow noderange pagination of all nodes
When a noderange starts with '<' or '>', use the set of all nodes as basis for pagination.
Additionally, provide better feedback to client on noderange parsing issues.  Also
implement natural sort in various places after doing it for the pagination.
2015-03-25 09:57:25 -04:00
Jarrod Johnson
ca4c1673a5 Implement noderange pagination
Noderange syntax now has:
<number : skip first number of nodes matching noderange
>number: provide only number of nodes matching noderange

These operators are intended to be at the end of a noderange.  For example:
n1-n8<4>3

That will skip n1-n4 and provide only 3 (n5, n6, n7)
2015-03-24 17:03:08 -04:00
Jarrod Johnson
13962ec69d Implement '+' plus operator in noderange
+ operator generates an 'end node' from the nodename to the left
and adding the specified value to the number at the end.  This is
as restrictive as the xCAT 2.x perl implementation to ensure best
compatibility.
2015-03-24 16:12:23 -04:00
Jarrod Johnson
a85ffa8f8b Add regex names and attribute match to noderange
Enhance noderange to implement:
attribute.name==value (also attribute.name=value) -- strict equality match
attribute.name=~value -- regular expression match
attribute.name!=value -- strict negative match
attribute.name!~value -- negative regular expression match
~nameexpression -- search by node name using regular expression

This also goes a step further by intelligently limiting searches when found to the right of @ or ,-.
2015-03-24 14:47:38 -04:00
Jarrod Johnson
8b5d5b1f33 Remove development output from core
The enumerate_node_collection function had a stray print output.
Remove that output now that the function is baked.
2015-03-24 11:21:53 -04:00
Jarrod Johnson
27cdd7b623 Fix messages html handling of non node messages
Changes to accommodate noderanges broke the HTML
API explorer.  Fix the non-node html output.
2015-03-24 11:19:45 -04:00
Jarrod Johnson
e5c4b92134 Add a nodehealth command
nodehealth grabs the health summary of a node and provides some detail in 'not ok' condition.
2015-03-24 10:42:04 -04:00
Jarrod Johnson
5124802c9c Change nodesensors output
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.
2015-03-24 10:23:18 -04:00
Jarrod Johnson
c4510b6a25 Flesh out nodesensors command
Interval sampling, sample count, CSV and non-CSV all working now.
2015-03-24 09:55:35 -04:00
Jarrod Johnson
6a4642e9f5 Functional pass of nodesensors command
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.
2015-03-23 13:49:59 -04:00
Jarrod Johnson
4beef5bb25 Fix some error handling situations
The socket API was not wrapping enough output.  Also fix 'databynode' reporting
for noderange based commands and have the 'sensor not found' event fall in that
realm.
2015-03-23 13:48:39 -04:00
Jarrod Johnson
77284af60d Rework multiple node result data
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.
2015-03-23 09:38:56 -04:00
Jarrod Johnson
54d2d2dffa Draft nodesensors command
It's not functional yet, but this command will be the CLI
access to sensor data and collection
2015-03-20 17:09:30 -04:00
Jarrod Johnson
30d34c2527 Fix Unicode error on confetty pipe out
When unicode was encountered, it would through an *encode* error.
Fix that issue.
2015-03-20 17:08:53 -04:00
Jarrod Johnson
a31834910c Fix incomplete handling of UTF-8 data
If the json dumper sees utf-8 encoded strings that
it wants to join with other strings, it will not work.
Instead make all the data fully unicode to make json
dumper happy.  Then force it to encode to utf-8 to make
python's IO happy.
2015-03-20 15:39:51 -04:00
Jarrod Johnson
41698b2bad Include omitted changes from last commit
I did not include all intended changes in last
commit.
2015-03-19 15:06:31 -04:00
Jarrod Johnson
745679029c Implement xCAT-style short commands
While the confetty interface is explorable,
it is tedious.  Provide shortcuts to
expected capability in the style of
xCAT commands.
2015-03-19 15:05:28 -04:00
Jarrod Johnson
763ccf823f Improve error reporting by server
General errors were uncaught.  Provide a way
to relate unexpected situations more gracefully
to a client.
2015-03-19 14:55:40 -04:00
Jarrod Johnson
8d09fb4064 Rework ipmi plugin
IPMI plugin is simplified and able to do multi-node requests.
2015-03-17 17:04:32 -04:00