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

441 Commits

Author SHA1 Message Date
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
Jarrod Johnon
c60d25f0d1 Fix confetty PTY handling in oneshot mode
When asked to execute a command, do not mess with the terminal
in a way that would incur SIGTTOU when run in background.  This
means that a backgrounded confetty can actually exit rather
than block waiting to be run in foreground.  This won't work
with running a *console* in background, but that really doesn't
make any sense.
2015-01-22 11:52:50 -05:00
Victor Hu
98302088bd Merge branch 'master' of ssh://git.code.sf.net/p/xcat/confluent 2015-01-21 16:43:17 -05:00
Jarrod Johnon
cb32c18507 Correct 'selfself' mistake in last commit
Previous commit had a typo that required correction.
2015-01-21 16:39:00 -05:00
Victor Hu
78b5cb15ce Make ..confluent/plugins/console directory owned by confluent
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
2015-01-21 16:35:22 -05:00
Victor Hu
09acf04111 Add RPM dependency for PyPAM package 2015-01-21 16:31:08 -05:00
Jarrod Johnon
a9eab61567 Handle broken cookies from other sites in domain
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.
2015-01-21 16:20:55 -05:00
Jarrod Johnon
a366520670 Fix circular import problem
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.
2015-01-21 14:22:53 -05:00
Jarrod Johnon
14ce9970ad Fix unicode error on stdout piping
When confetty runs in a UTF-8 terminal, things are fine.  However python
assumes ascii only when piped.  Catch the situation and force utf-8
encoding rather than erroring out in such a circumstance
2015-01-20 16:11:16 -05:00
Jarrod Johnon
de383630cf Gracefully trap config change callback errors
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.
2015-01-19 17:05:29 -05:00
Jarrod Johnon
cfb9575a5e Fix configuration auto-fixup in ipmi
If a session was attempted but failed before creation, a trace was thrown.
Fix this by catching the scenario and passing, since the desired effect is
already there.
2015-01-19 16:32:30 -05:00
Jarrod Johnon
5ddc97603a Fix trace on unresolvable manager in ipmi
If hardwaremanagement.manager did not resolve, a trace
was generated.  Fix by properly indicating the endpoint
was unreachable.
2015-01-19 16:22:22 -05:00
Jarrod Johnon
dc28f962dc Add sensor support to the ipmi plugin
Manage collections of sensor resources as presented by ipmi devices
2015-01-19 14:49:23 -05:00
Jarrod Johnon
384baea038 Handle non-ascii unicode better
Clarify that the data is in UTF-8 where applicable.  It is expected
that clients are capable of handling UTF-8 for now.  Additionally,
the HTML api explorer handling of numeric data is fixed.
2015-01-19 14:45:24 -05:00
Jarrod Johnon
6acaac8644 Add one-call tracing to log-as-a-file
When a log object is used as a 'dumb' file target, show the origin of the
output.  The motivation here is that 'print' statements are intended to
be an unusual event that should be easily tracked down and eliminated
once their specific use has concluded.
In xcatd, running '-f' means a lot of mysterious output that is hard
to manage as they frequently print out variable contents without
searchable context.  For example, if in xcatd someone randomply prints out
a varibale with a nodename, we might see a stray:
n1
With this change (together with previous changes), the same statement
results in stdout log appearing like:
Jan 19 14:20:54   File "/opt/confluent/lib/python/confluent/plugins/hardwaremanagement/ipmi.py", line 364, in _dict_sensor
    print nodename: n1
2015-01-19 14:35:22 -05:00
Jarrod Johnon
8bc6477700 Implement plugin curated collections
A plugin is now allowed to define a collection.  The sensors
hierarchy is added as the first path to allow plugin curated
collections.  ipmi plugin updated to list items in those
collections
2015-01-15 11:28:22 -05:00
Jarrod Johnon
c86e1af750 Try to use socket to get SO_PEERCRED
Newer socket includes SO_PEERCRED.  Try to use that before resorting
to the 17 assumption.
2015-01-13 15:01:55 -05:00
Jarrod Johnon
fa2b845b55 Fix sign of SO_PEERCRED
SO_PEERCRED uses ucred, where pid is signed and the other two are not.
Accurately handle large uid/gid
2015-01-13 11:55:33 -05:00
Jarrod Johnon
09c5b90c57 Fix internal error on boot device mistake
Boot device not being str resulted in internal error rather than the
intended message.  Correct by forcing it to string representation.
2015-01-13 08:59:48 -05:00
Jarrod Johnon
10369decf8 Fix ipmi get boot device when uefimode is possible 2015-01-12 10:37:05 -05:00
jjohnson2
4dbb2ee395 Bump version number of server
Changes have occurred since 1.0, disambiguate from last release.
2014-11-25 14:16:50 -05:00
Jarrod Johnon
cbcfc9a0a4 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/confluent 2014-11-25 14:04:08 -05:00
Jarrod Johnon
f9b27eb426 Return '' for identify state on read ipmi
For exploring the api, a write-only attribute presents difficulty.  Address this by allowing
plugins to return a '' value and have ipmi plugin return that value to enable things
like the web api explorer.
2014-11-25 14:03:41 -05:00
Jarrod Johnon
a645e256eb Add identify support
In the course of adding identify support, also took the opportunity to address
a few mistakes and refactor some code for future ease of development.
2014-11-25 13:57:31 -05:00
jjohnson2
8a92450abc Bump version to 1.0
Release candidate.  If no further issues reported in test, this will be 1.0
2014-11-21 15:35:53 -05:00
jjohnson2
394d51a49e Update term.js to current upstream 2014-11-20 15:44:01 -05:00
jjohnson2
c4fcbd960e Remove jquery dependency for console demo
jquery is needless burden for this sort of application
2014-11-20 15:42:22 -05:00
jjohnson2
f6b68d8efe Remove jquery requirement from consolewindow widget 2014-11-20 14:43:10 -05:00