- May 21, 2010
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Cut&Paste, plus the following changes: - The class is renamed to SingleFileEventHandler - The monitored filename must be passed in and doesn't default to the ganeti cluster config file - A small docstring is added to the class - Pylint disables for except: and method names are added This makes it possible to write unittests for this class. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Since we contributed AsyncNotifier back to the upstream pyinotify project, we'll be able, one day, to remove the ganeti version of that code. For now we still need it to support older distributions, but having a note about when we'll be able to remove it is nice. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This exception is caught, but never thrown. It became useless when we moved confd from on/off to enabled/disabled, but always running on all nodes. Removing its definition and the code catching it can do no harm. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 20, 2010
-
-
Guido Trotter authored
By using enterabs we can schedule events at the same time, which will then be sorted by priority. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Currently, in testDeferredCancel if the self._CancelEvent are entered more than 0.3 seconds after the _SendSig have been entered, the test could fail. This is unlikely but may happen. To avoid it we use enterabs, to use absolute times. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Currently we never do that, but it's nice to know we can restart the mainloop, after termination. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Rather than calling devel/review with from..to target we can just use target, and assume target..HEAD as the range. This makes it a lot easier, as now you just have to say something like "devel/review devel-2.1" if you're already on the branch you want to commit, and want to commit it to devel-2.1. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 18, 2010
-
-
Guido Trotter authored
Currently the EOM terminator is hardcoded on the server side, and is customizable in the Transport object (with the default being the same as the value found in the server), but not in the luxi client. With this patch we move the value to constants, and remove the "fake" customizability, which would just break client/server communication. If we ever need to have a luxi transport with a different terminator it's easy enough to add it back. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This will only work on patched or newer (>= 2.6.34) kernels and with a patched version of qemu-kvm. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Logfiles can be useful for debugging. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This allows users of the RAPI client to catch GanetiApiError for all HTTP errors. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 17, 2010
-
-
Michael Hanselmann authored
Currently they return a 500 Server Error, not really useful for detecting nonexistent items. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Ganeti errors should also be logged with a backtrace. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Inter-cluster instance moves need the disk template. As they run LUQueryInstanceData to get an instance's details, the disk template must be returned. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
GetInstanceInfo should return the resource /2/instances/$name/info, but so far it returns /2/instances/$name. The same applies to GetNodeInfo, which returns /2/nodes/$name. Both names are stripped of their “Info” suffix and a new method, GetInstanceInfo, is added for /2/instances/$name/info. There's no equivalent for nodes. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This also updates a comment in the unittest for utils.py. We unittest the new function for two things: correct reporting on real case (for localhost), and correct reporting with a mocked-out TcpPing that returns false. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 14, 2010
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Luca Bigliardi <shammash@google.com>
-
Guido Trotter authored
Remove duplicate code between a couple of asyncore related function by having a function in charge of handling EINTR errors. Unittests included. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
By overriding the default asyncore handle_error (which closes the socket) with our own version, which logs what happened but tries to proceed, we can get rid of a couple of try/except blocks. The resulting churn is deindentation of the internal code. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
While mlock on noded is definitely good in most situations, there are some - namely my laptop - where it has no benefit, and uses precious non-swappable memory. To avoid this we make it optional, with a new --no-mlock option. Note that only the main node daemon and its http children are affected: the powercycle node child still uses mlock, which doesn't harm, since it's a short lived process happening just before node reboot anyway. The manpage is updated. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Luca Bigliardi <shammash@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Luca Bigliardi <shammash@google.com>
-
- May 13, 2010
-
-
Luca Bigliardi authored
Disable warnings for: - except Exception, - use of __errno_location, - redeclaration of handleError() Signed-off-by:
Luca Bigliardi <shammash@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Luca Bigliardi authored
Fix this pylint warning: [W6501, Mlockall] Specify string format arguments as logging function parameters Signed-off-by:
Luca Bigliardi <shammash@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Luca Bigliardi authored
Fix typo spotted by pylint: E1101:2095:LogFileHandler.handleError: Module 'logging' has no 'Filehandler' member Signed-off-by:
Luca Bigliardi <shammash@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Currently this only supports the new instance creation request data format version 1, but support for the old version can be easily implemented. Most arguments are optional and documented in the RAPI documentation. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
As mentioned in commit d975f482, the current way of creating an instance via RAPI is not very flexible. With this patch, a new instance creation request data format is introduced and documented. Support can be detected by checking the list of features returned by the /2/features resource for the value "instance-create-reqv1". Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Also add a separate function to retrieve body parameters. Having it separate (independent of a class instance) will make it easier to unittest users of this function. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
The /2/features RAPI resource can be used to detect optional features implemented by the RAPI server. This will be used to recognize servers implementing a new request format for instance creation requests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Luca Bigliardi authored
Node daemon logs will be printed on system console if writing on the log file fails. Signed-off-by:
Luca Bigliardi <shammash@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Luca Bigliardi authored
Signed-off-by:
Luca Bigliardi <shammash@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Luca Bigliardi authored
Add a parameter to SetupLogging to use LogFileHandler (default is off) Signed-off-by:
Luca Bigliardi <shammash@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Luca Bigliardi authored
Add a log handler class which logs to /dev/console in case of logging errors. Signed-off-by:
Luca Bigliardi <shammash@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-