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

468 Commits

Author SHA1 Message Date
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
Jarrod Johnson
6a3025837b Batch nodes to plugin calls
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.
2015-03-17 11:05:28 -04:00
Jarrod Johnson
735cc268d1 Have confetty better handle noderange output
Have confetty print_result make a reasonable assumption to
have noderange based output show relevant node and output.
2015-03-16 10:15:27 -04:00
Jarrod Johnson
a4f3366a57 Fix numerous issues with noderange calls
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.
2015-03-16 09:46:03 -04:00
Jarrod Johnson
41cccb01f6 Bring noderange somewhat to life
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.
2015-03-13 17:12:31 -04:00
Jarrod Johnson
1be6486df0 Refactor core
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.
2015-03-13 14:13:11 -04:00
Jarrod Johnson
50274f745e Fix range operator not validating nodes
When a node that doesn't exist is implied by a noderange, correctly indicate failure when
config verification is engaged.
2015-03-13 14:11:54 -04:00
Jarrod Johnson
9f16375b14 Make noderange attribute pass through API better
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.
2015-03-12 15:59:25 -04:00
Jarrod Johnson
0515acd054 First part of hooking noderange into configuration
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.
2015-03-12 15:38:50 -04:00
Jarrod Johnson
7a346ed0d3 Bring noderange up to mostly working order
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).
2015-03-11 17:02:26 -04:00
Jarrod Johnson
6dc2ec20a0 Address shellmodule management issues
shellmodule plugins could fall over in unfortunate
ways inducing confusing.  Mitigate that risk to
some degree.
2015-03-05 14:06:35 -05:00
Jarrod Johnson
22c1e73599 Fix whitespace in sockapi.py
A hardtab was in sockapi.py, making it unable to build on my system.
Make the indentation match the rest of the project.
2015-02-27 16:26:27 -05: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
57e39a31c5 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/confluent 2015-02-27 11:55:47 -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
Victor Hu
1f7a0e77d6 On SLES operating systems, hit an error on the shutdown of
confluent when we call tcgetattr() with the following:
   termios.error: (25, 'Inappropriate ioctl for device')

Before calling tcgetattr, check that the file descriptor
is a tty.
2015-02-10 17:18:16 -05:00
Victor Hu
3756ee129a Checking for ppc64 and setting the SO_PEERCRED to 21.
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.
2015-02-10 17:16:10 -05:00
Victor Hu
2f65612b71 Removing the confluent_xcat subdirectory
After some discussion with the team, let's keep the xcat
related "glue" out of the confluent project, for now.
This will give me more time to figure out how things will
come together and integrate for xCAT3.

For xCAT2, a xCAT-confluent RPM is added to xcat-core project to
be consistent with how xCAT2 is packaged today.
2015-02-04 14:06:52 -05:00
Jarrod Johnson
d06f5cc966 Provide seamless behavior for non-console activity
When submitting an interactive command and encountering error,
have confetty attempt to self heal and resubmit command.
2015-02-03 13:28:21 -05:00
Jarrod Johnson
a009f4c6d1 Change PAM behavior for authorization
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.
2015-02-03 11:04:32 -05:00
Jarrod Johnson
ae1e3f2b8d Fix tab completion in middle of command
When doing tab completion, ignore content after the current index.
This was confusing the tab completion routine.  Also silently
ignore traces by default
2015-02-03 11:01:05 -05:00
Jarrod Johnson
6d73eb023b Add gitignore
Prevent client from trying to add local IDE content
2015-02-03 10:16: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
Victor Hu
00a33b05b7 Create a new subdirectory for xcat related glue code which produces
a confluent_xcat RPM.  This holds the related pieces that xCAT requires
to use confluent and allows confluent to be standalone install.
The confluent_xcat rpm has a dependency on confluent_server.

The structure of confluent_xcat directory follows the other directories
under the confluent project. (_server,_client,_common)
2015-02-02 16:47:27 -05:00
Victor Hu
54491e3832 On successful builds, clean up the generated directories and files
created during the build so generated files are not accidently
commited to git.  Print a error message when rpmbuild fails
2015-02-02 16:41:37 -05:00
Victor Hu
888e7a71b8 Add the symlinks for confluent_client for buildrpm
and makesetup pointing to the scripts under confluent_server
2015-02-02 16:39:15 -05:00
Jarrod Johnon
98a3f6fcdc Relay target unreachable condition to client
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.
2015-01-22 13:56:16 -05:00
Jarrod Johnon
bd108d62ce Merge branch 'master' of ssh://git.code.sf.net/p/xcat/confluent 2015-01-22 11:58:19 -05:00