- Jun 01, 2010
-
-
Iustin Pop authored
Since the current start_timestamp opcode attribute refers to the inital start time, before locks are acquired, it's not useful to determine the actual execution order of two opcodes/jobs competing for the same lock. This patch adds a new field, exec_timestamp, that is updated when the opcode moves from OP_STATUS_WAITLOCK to OP_STATUS_RUNNING, thus allowing a clear view of the execution history. The new field is visible in the job output via the 'opexec' field. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
Some confusion arose handling EINTR on this function: in python 2.6 socket.error is an IOError, and thus: - It's an EnvironmentError - It has an .errno member In 2.4 and 2.5 it's not, and so its errno variable must be extracted from the args tuple. This patch fixes both the function, and the unittests. This is a cherry-pick of master commit 965d0e5b with the portions not relevant to 2.1 removed (changes to the RetryOnSignals function). Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 31, 2010
-
-
Tom Limoncelli authored
Signed-off-by:
Tom Limoncelli <tlim@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Apollon Oikonomopoulos authored
Introduce 2 new hypervisor options, migration_bandwidth and migration_downtime and implement KVM migration bandwidth and downtime control. migration_bandwidth controls KVM's maximal bandwidth during migration, in MiB/s. Default value is 32 MiB/s, same as KVM's internal default. This option is a global hypervisor option. migration_downtime sets the amount of time (in ms) a KVM instance is allowed to freeze while copying memory pages. This is useful when migrating busy guests, as KVM's internal default of 30ms is too low for the page-copying algorithm to converge. This is a per-instance option, with a default of 30ms, same as KVM's internal default. Signed-off-by:
Apollon Oikonomopoulos <apollon@noc.grnet.gr> Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
Balazs Lecz authored
EnsureDirs() should create directories with the exact mode requested in the arguments, but it currently applies the umask. This patch makes it independent from the umask. Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- May 27, 2010
-
-
Iustin Pop authored
If the instance crashes between backend.InstanceReboot checks the list of running instances and the execution of hv_xen.RebootInstance, ini_info will be None. And if the instance doesn't reboot fast enough, new_info will be None. Both cases lead to “TypeError: unsubscriptable object”. Too bad pylint doesn't detect such cases. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 25, 2010
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
- Create a new _MyErrorLoggingAsyncNotifier class which registers error counts, rather than logging them - Add an additional ERR notifier to test with - Check that no error was returned, for tests that weren't supposed to - Add a new test case for a callback that's supposed to raise an exception Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Since now we use the SingleFileEventHandler together with an error handling asyncore dispatcher, we don't need the internal try/except anymore. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This mixes AsyncNotifier with GanetiBaseAsyncoreDispatcher to provide an AsyncNotifier which will log errors, rather than bail out. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Abstract a few common functionalities between all ganeti asyncore dispatchers: - Handle errors by logging them, and then continue - By default check sockets only for readability Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 24, 2010
-
-
Guido Trotter authored
Rather than hardcode that we have two notifiers, and notifier 0 is the terminating one, we abstract this with class level constants. This makes it easier to add more, with different features. The only real change is that now the callback class takes as input the whole test object, rather than just the notified array, to have access to those constants. The rest is just replacing of hardcoded 0s and 1s with self.NOTIFIER_TERM and self.NOTIFIER_NORM, and of notifier_count with len(self.NOTIFIERS). Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
- May 22, 2010
-
-
Guido Trotter authored
This is needed if daemons are in the foreground, and get ctrl+c-ed by the user. Also add unittests to make sure the correct signals terminate the mainloop. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
The comments in the SingleFileEventHandler are still confd-specific. Update them to make them generic for any single-file monitoring. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- 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>
-