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

84 Commits

Author SHA1 Message Date
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
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
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
Jarrod Johnon
059b448932 Cleanly handle stop/restart when not running
Previously some rather uncomfortable looking output would be emitted at someone trying to restart
confluent if not running.  Be nicer and recognize when service is not running and a stop attempt is made.
2014-11-18 17:02:54 -05:00
Jarrod Johnon
bf15f12a1c Manage the bootmode of nextdevice
Plugins may implement bootmode as appropriate.  Currently, the only
example usage is how IPMI can indicate BIOS style versus UEFI style
boot.

Additionally, limitations of the ChoiceMessage base object around
handling multi-parameter pieces of data are addressed.
2014-11-14 16:41:47 -05:00
Jarrod Johnon
7e2b6b6a85 More easily recognize application/json input in request data for POST
Browsers may include more data.  Tolerate by doing a substring search as is the case for form data.
2014-11-07 11:03:44 -05:00
Jarrod Johnon
6289e3ebfa Correct typo in httpapi
Consoles would not work due to a type of dictionary name, correct the mistake
2014-11-04 13:51:23 -05:00
Jarrod Johnon
af9a5c13c1 Modify to work better in a RHEL6/RHEL7 agnostic way 2014-11-04 13:34:26 -05:00
Jarrod Johnon
74a83a4502 Init script modifications for SLES 2014-11-04 12:49:31 -05:00
Jarrod Johnon
f2c7c8ace3 Increase version numbers for pre-RC testing 2014-11-04 10:13:09 -05:00
jjohnson2
185e94703b Modify build to avoid conflicting files
Multiple rpms want to own '__init__.py' files.  Suppress it in some
places.
2014-11-04 09:16:01 -05:00
Jarrod Johnon
d7f26efa3b Fix HTTP access to console sessions
A mistake was made in the coding of the timestamp capability.  Correct the mistake to restore console function.
2014-10-29 13:13:51 -04:00
Jarrod Johnon
87ed69265a Add missing time import
consoleserver.py failed to import time to support new
buffer age functionality
2014-10-28 16:49:25 -04:00
Jarrod Johnon
522280d6be Fix numerous issues with recent enhancements
The buffer age was not working as intended
The fix to exit on error exited overly eagerly
The log replay failed to report a third value if file did not exist.
2014-10-28 16:45:55 -04:00
Jarrod Johnon
f7fb9d6af2 Fixes around the confluent shutdown facility 2014-10-28 13:42:21 -04:00
Jarrod Johnon
57d0997d62 Have init script use previously added confluent capability 2014-10-07 11:19:13 -04:00
Jarrod Johnon
5012c9e401 For skipauth clients, allow a 'shutdown' verb
To facilitate a clean coordinated shutdown, create a verb so that a termination can be done
and know when it is completed.  Only allow for the 'special' case of 'skipauth', where unix domain
socket connection is in hand and only root or the service owner can access.
2014-10-07 11:14:22 -04:00
Jarrod Johnon
4443d67da6 Implement timestamp reporting
Have confetty include the vintage of incoming data so that user may know how likely the
data is relevant to now.
2014-10-06 15:13:09 -04:00
Jarrod Johnon
afb6f4296c Bump 'VERSION' file.
As it heads into RC, will start using the tags and
overly simplifying things in the same way xCAT
revs versions even without changes for the sake
of consistency
2014-09-30 11:35:33 -04:00
Jarrod Johnon
d4b8294ec9 Correct syntax error
Somehow a stray colon from an attempt to try locking persisted.  Remove that colon.
2014-09-30 11:35:11 -04:00
Jarrod Johnon
37549481b6 Fix double connect on logging change
When logging was changed from none to full, it would always
start and immediately abort connecting to start again.
Change this by deciding which connection liveness strategy
to use based on how many settings changed.  If just logging
changes, then connect only if not connected or connecting.
If more changes, then skip that kinder strategy and go straight
to reconnecting.
2014-09-30 11:21:01 -04:00
Jarrod Johnon
8728007d1e Fix DB corruption potential
Make sure that the dbm object is closed before another thread might come along.  Out of an overabundance of caution,
also join() existing cfgwriter thread to make sure that only one thread touches it at a time.  In theory, it should only possibly
be after the db is closed, but take no chances.
2014-09-23 12:08:13 -04:00
Jarrod Johnon
89ca5b412b Fix race condition on configuration writeback
If the sync thread had moved beyond the point of checking _writepending, but had not quite managed to trigger
isAlive() to be false, the sync cfg to file would transition to never work.  Address this by adding one lock and one boolean.
Inside the lock, the two booleans are manipulated to atomically mark the end of thread sync activity linked with
check for pending data to write.
2014-09-19 08:57:17 -04:00
Jarrod Johnson
e9ac1617a8 Add a 'reopen' capability to client
If client wants to force a reconnection, they can send ctrl-e, c, o, just as in conserver.
2014-08-28 13:58:31 -04:00
Jarrod Johnson
276ba4abd7 Correct behavior of various paths when node does not exist 2014-08-26 14:03:15 -04:00
Jarrod Johnson
6fc75d8394 Implement dump of cfg to JSON
Restoring data is not yet implemented, after restore backend implemented than a
utility can be furnished.
2014-08-19 15:06:28 -04:00
Jarrod Johnson
a0ae523768 Fix timeout on persistent IPMI session
If there is a persistent IPMI session and the first to notice was a user request
it would fail with unexpected error.  Correct the situation to expect the error
and report more precisely as to the cause.
2014-07-29 09:49:52 -04:00
Jarrod Johnson
230397c2a3 Fix unexpected error on bad authentication
When bad credentials were caught by pyghmi, the ipmi plugin was not specifically
characterizing it.  Address this shortcoming.
2014-07-29 09:24:02 -04:00
Jarrod Johnson
9b7d1d6c5b Change from 'passphrase' to 'password'. 2014-07-27 19:23:32 -04:00
Jarrod Johnson
291e90afcf Fix 500 instead of 401 on bad HTTP authentication
Code optimistically assumed that authentication would fill out data to
pass to authorization, which does not get filled out if authentication fails.
2014-07-25 15:40:26 -04:00