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.
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.
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.
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.
Provide specific feedback to client when possible. When not possible,
at least get condition into the correct trace log and notify client of
condition.
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.
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)
+ 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.
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 ,-.
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.
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.
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.
Every node was serialized in being passed to plugins. Fix this
by grouping the nodes by the handler function, and then calling
them by batch. This still serializes each plugin, but for now this should
suffice.
get_node_attributes would make a fatal mistake when more
than one node queried due to loop side effect. Also address
numerous issue with html-ification in the messaging module.
Noderange based operations are now online. Investigation required
to understand underwhelming performance (e.g. health/hardware)
and trace error when trying to show things on console-only nodes
(like power state). The html api browser handling of power/state and
similar needs a look (though json through http is fine) and confetty
client display of the data needs work still.
With the branches for node versus nodegroup and noderange a function was unwieldy.
Break it up to be more manageable. Also address a defect where client omission of traling '/'
would break nodegroup elements.
On the plugin front, add a one-off description for the 'noderange' attribute.
For the other pieces, make noderange more like any 'extensible' string value
rather than making it special.
Make expansion of groups and rejection of unrecognized elements work.
Additionally, implement dynamic groups. A group may have a 'noderange'
attribute. In this case it is considered to have 'dynamic' members. This
only has meaning in noderange expansion, not in deriving configuration data.
This does not yet add the search by attribute value capabilities and still
doesn't do the pagination or + operators.
Implement [] and - and :. Actually do better than xCAT NodeRange.pm about
multiple numbers in the non-[] sequential range case. Still need to do the things
that requiring wiring up to a config manager (the atom verification as well as
=, =~, and [0] being ~ or / for regex names).
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.
The socket.SO_PEERCRED seemed to work fine for my
ppc64 RHEL system, but testing today on little-
endian SLES 12 system threw that exception. So
checking if the arch is "ppc64" on the exception
case.
Previously, any PAM result was treated as good. This isn't
actually of practical value, since we need a user object to
really do authorization. Change strategy to give pam a chance
to deny anyone, but require the user to exist in confluent
even if pam says the user is a valid one.
If connectivity is lost in the midst of an interrogation,
relay the unreachable status to the client rather than
'Internal Error' that was occuring before.
xcathmc.sh is a xCAT console wrapper needed to be placed in the
confluent consoles plugin directory. Talking with Jarrod, it was
decided that confluent should stay stand-alone and xCAT should ship
this and related "glue" items in a separate RPM. The empty 'console'
directory should be owned by the confluent RPM
If a web application in a wider domain sets a cookie that python
doesn't like, a CookieError would be raised to ruin the whole request.
Address by subclassing SimpleCookie to catch the cookie error and
set an empty Morsel rather than fail out. This allows the errant
cookie to be ignored while still being able to check for the cookie
that we actually care about.
The change to allow configmanager to log traces
erroneously broke due to use of 'import .. as' in
circular imports. Skip 'as' and the problem does not occur.
When a change callback handler raises an exception,
log it and move on to next handler. This prevents
the handler from screwing up the caller or fellow
callback handlers. Unfortunately this means that
no one notices the issue until checking the trace
log file, but it produces more peculiar behavior
as it stands without this change.