- May 28, 2010
-
-
Michael Hanselmann authored
Instead of passing around many variables for building the executed command, they're now kept as instance variables. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Balazs Lecz authored
This patch adds a new boolean hypervisor parameter to the KVM hypervisor, named 'use_chroot'. If it's turned on for an instance, than KVM is started in "chroot mode": Ganeti creates an empty directory for the instance and passes the path of this dir to KVM via the -chroot flag. KVM changes its root to this directory after starting up. It also adds a "quarantine" feature for moving any unexpected files to a separate directory for later analysis. Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Balazs Lecz authored
Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 25, 2010
-
-
Guido Trotter authored
* devel-2.1: Test for errors during inotify callback SingleFileEventHandler: Remove try/except blocks ErrorLoggingAsyncNotifier daemon.GanetiBaseAsyncoreDispatcher 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
* devel-2.1: TestSingleFileEventHandler: abstract notifier type Mainloop: handle SIGINT as well (and terminate) SingleFileEventHandler: update comments Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
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
-
-
Michael Hanselmann authored
For exports to/imports from the same machine, compression will not be used anymore. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
The X509 key name and CA are passed from cmdlib all the way to the backend import/export daemon. With the addition of an option to choose the compression method, another parameter would have to be passed all the way. By moving these options to a separate object, adding new ones will become much easier. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
For example, exports on the same node shouldn't be compressed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
* devel-2.1: Add asyncnotifier unittests Make ConfdInotifyEventHandler a library function Comment on AsyncNotifier upstream's availability Remove errors.ConfdFatalError TestMainloop: test scheduler priorities as well Fix race condition in mainloop unittest TestMainloop.testReRun Add AsyncUDPSocket tests Add initial mainloop unittests devel/review: make the range argument optional 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:
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
-
-
Michael Hanselmann authored
This is a first version of the instance move tool and it supports moving 1..N instances from one cluster to another. When moving a single instance, the instance can be renamed, allowing for moves within the same cluster (not really useful in practice, but good for testing). Documentation is updated to describe this new tool and its usage. The “move-instance” tool uses the workerpool to support parallel moves of instances. Supporting them was simple as threads were required anyway due to the synchronous RAPI client. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Two new resources are added: - /2/instances/$name/prepare-export - /2/instances/$name/export The documentation for the existing resource for creating instances is updated for remote imports. The RAPI client is extended for the new resources. 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>
-
Michael Hanselmann authored
To prepare a remote export, the X509 key and certificate need to be generated. A handshake value is also returned for an easier check whether both clusters share the same cluster domain secret. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
* devel-2.1: Abstract the LUXI eom into a constant KVM: vhost net acceleration support Conflicts: lib/luxi.py - trivial Signed-off-by:
Guido Trotter <ultrotter@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
Importing/exporting an instance to a remote machine creates X509 certificates which expire after some time. They need to be removed from the nodes as they become useless. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
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
* devel-2.1: ganeti-cleaner: Write log file with removed files RAPI client: Handle urllib2.HTTPError and raise GanetiApiError Signed-off-by:
Michael Hanselmann <hansmi@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
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Until now, the instance was always removed (if asked for by the user). In case of export errors however, it shouldn't. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-