- Jul 30, 2010
-
-
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:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 29, 2010
-
-
Iustin Pop authored
If we call burning with only existing instance, then it will fail to create any of them, and thus in the removal phase it won't have anything to remove. Since calling luxi.SUBMIT_MULTIPLE_JOBS with an empty job set is an error (and will raise an exception), this creates a very strange error in burnin (which is unfortunately hidden by ExecJobSet()). As such, we modify CommitQueue to return immediately if it has an empty op queue. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
By changing it to a normal parameter, which must be a sequence, we can start using keyword parameters. Before this patch all arguments to “AddTask(self, *args)” were passed as arguments to the worker's “RunTask” method. Priorities, which should be optional and will be implemented in a future patch, must be passed as a keyword parameter. This means “*args” can no longer be used as one can't combine *args and keyword parameters in a clean way: >>> def f(name=None, *args): ... print "%r, %r" % (args, name) ... >>> f("p1", "p2", "p3", name="thename") Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: f() got multiple values for keyword argument 'name' Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 23, 2010
-
-
Iustin Pop authored
This is breakage from the original 'live' parameter changes. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jul 21, 2010
-
-
Manuel Franceschini authored
Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jul 20, 2010
-
-
René Nussbaumer authored
This prepares the remote node to be joined into a cluster Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jul 12, 2010
-
-
Michael Hanselmann authored
Just calling utils.SafeEncode on the log message failed when it wasn't of the type ELOG_MESSAGE and not a string. Now non-message log entries are formatted using repr(). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 07, 2010
-
-
Iustin Pop authored
After some more investigation, only the soft reboot type fails for Xen 3.4 (due to the reboot/uptime time counter). As such, it's better to allow selective testing, since we do want to test in general these opcodes/the command line script. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Luca Bigliardi <shammash@google.com>
-
- Jul 01, 2010
-
-
Michael Hanselmann authored
Currently the RAPI client uses the urllib2 and httplib modules from Python's standard library. They're used with pyOpenSSL in a very fragile way, and there are known issues when receiving large responses from a RAPI server. By switching to PycURL we leverage the power and stability of the widely-used curl library (libcurl). This brings us much more flexibility than before, and timeouts were easily implemented (something that would have involved a lot of work with the built-in modules). There's one small drawback: Programs using libcurl have to call curl_global_init(3) (available as pycurl.global_init) while exactly one thread is running (e.g. before other threads) and are supposed to call curl_global_cleanup(3) (available as pycurl.global_cleanup) upon exiting. See the manpages for details. A decorator is provided to simplify this. Unittests for the new code are provided, increasing the test coverage of the RAPI client from 74% to 89%. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 29, 2010
-
-
Michael Hanselmann authored
This is needed in a new test script for cfgupgrade where it's better to only use the minimum parts necessary for testing cfgupgrade. Including full configuration data to ensure verification doesn't fail would make maintenance difficult. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
In the condition for checking the configuration directory, one “or” should have been an “and”. This bug was in cfgupgrade since commit 95e4a814 (June 2008). Found thanks to a test script. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Since configuration changes are now usually done in the configuration writer class, cfgupgrade's only task is to change the config version. This means we can easily support upgrading from Ganeti 2.0 and 2.1 to 2.2. This patch also brings a couple of small cleanups. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Three constants were no longer user after commit 11c31f5c, which removed support for upgrading from Ganeti 1.2. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 28, 2010
-
-
Guido Trotter authored
This makes it compatible with the python builtin, and we can even use the builtin when running under the right version of python. The all and any functions are renamed to _all and _any, so that they can be tested, and (non)existing unittests are updated (translation: there are no unit tests, so none are updated). This patch also moves the code deciding which partial to use next to the definition of the _partial function, rather than after TryToRoman. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jun 23, 2010
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This is not yet complete, as it lacks proper support for instance import. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 09, 2010
-
-
Michael Hanselmann authored
This is necessary to allow cfgupgrade to work on a non-standard directory. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 01, 2010
-
-
Michael Hanselmann authored
Until now, move-instance used different status variables: “success”, “abort” and “error_message”. With this patch, everything is changed to use “error_message” only. This simplifies the code a bit. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@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
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>
-
- May 03, 2010
-
-
Iustin Pop authored
Since utils.WriteFile requires an absolute path, cfgupgrade needs to normalize the directory it is given. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 21, 2010
-
-
Michael Hanselmann authored
utils.py, where they were before, is already huge. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
The patch adds selection of hypervisor in burnin (on multi-hypervisor clusters, we always used the default) and optional hypervisor parameters, and skips migration if the hypervisor doesn't support it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
In master, the function GenerateSelfSignedSslCert has been moved to utils. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Apr 20, 2010
-
-
René Nussbaumer authored
Additionally also move to the RunWhileStopped method for the configuration merger. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Apr 15, 2010
-
-
Iustin Pop authored
This patch updates the docstrings in tools/ (mostly in lvmstrap, which is very very old code-base) and then enabled the tools in this directory for 'make apidoc' too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
2.1's cfgupgrade doesn't support upgrading from 1.2, only from 2.0. However, it's trivial to forward-port the 2.0 cfgupgrade to work with 2.1, thus providing an upgrade path for 1.2 users directly to 2.1, without the intermediate step of installing 2.0. The new cfgupgrade12 file has just a few trivial changes from 2.0, and skipping the load of the config file. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This can be used for two purposes: - safety copy of the config file, with just the secrets changed - cleanup of the config file (full randomization), so that (e.g.) users could send a broken config file to the devel-list Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Commit 43575108 added bootstrap.GenerateclusterCrypto and commit 7506a7f1 changed cfgupgrade to use it. However, this lost the functionality of upgrading in non-default DATA_DIR. To fix this, we enhance bootstrap.GenerateclusterCrypto to accept custom file paths for the three files it modifies. If more files will be needed in the future, we could just pass in modified DATA_DIR, but for now it suffices. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Apr 13, 2010
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Apr 09, 2010
-
-
Guido Trotter authored
Currently burnin, if proceding in parallel, will remove all instances which were passed, even if they failed to add. This is bad because it will also remove instances which existed before burnin started. By adding the instances to the removal queue only if their creation was successful (passing the action as a post processing action to ExecOrQueue) we guarantee pre-existing instances are saved. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
If a post-process function is passed to ExecOrQueue it is executed if and only if the job is successful. This happens immediately if we're proceding iteratively, and at the end, when we collect all job results, if we're proceding in parallel. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
In order to later add an optional parameter we transform the variable ops argument list in an explicit list. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 06, 2010
-
-
Iustin Pop authored
Most creation of confd clients will do the same steps: read MC file, parse it, read HMAC key, etc. We abstract this functionality so that we don't duplicate the code. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 23, 2010
-
-
Guido Trotter authored
Abstract the growable disk types in a ganeti constants, and only run disk grow, from burnin, on them. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 18, 2010
-
-
Guido Trotter authored
Just a few queries are checked, but this should give us confidence that at least the basic confd framework is working properly. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 17, 2010
-
-
Michael Hanselmann authored
Information exchanged between different clusters via untrusted third parties (e.g. for remote instance import/export) must be signed with a secret shared between all involved clusters to ensure the third party doesn't modify the information. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 15, 2010
-
-
Michael Hanselmann authored
Currently, the ganeti-confd's HMAC key is called “cluster HMAC key” or simply “HMAC key” everywhere. With the implementation of inter-cluster instance moves, another HMAC key will be introduced for signing critical data. They can not be the same, so this patch clarifies the purpose of the “cluster HMAC key” by renaming it. The actual file name is not changed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-