- Apr 07, 2010
-
-
Michael Hanselmann authored
* devel-2.1: Fix consistency checks in ConfdFilterCallback Fix utils.WaitForFdCondition inner retry loop Fix bug introduced in 76e5f8b5: mkdir mode utils: Move wrapper code around os.makedirs into separate function Fix unittest for the rapi client library Adding RAPI client library. Conflicts: test/ganeti.utils_unittest.py: Trivial Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Commit 49b3fdac added consistency checks, but these are wrongly triggered for old responses - we need to make sure to check that we have the same serial. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Commit dfdc4060 added WaitForFdCondition which uses utils.Retry without handling timeout exceptions. This breaks any nested retry loops. This patch fixes the above function, and also changes utils.Retry to detect and warn future similar cases. In addition, we add a few small unittests for utils.Retry. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
After commit 76e5f8b5, mkdir_mode in utils.RenameFile is no longer passed to Makedirs. This is fixed by this patch. 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
Wrong escape, so we make sure to use proper escapes (we want the backslashes to be embedded, not interpreted). Also change " to ' to be easier to read. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
- Apr 06, 2010
-
-
David Knowles authored
Signed-off-by:
David Knowles <dknowles@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Signed-off-by:
Iustin Pop <iustin@google.com> (modified slightly the unittest to account for missing httplib2 library)
-
Michael Hanselmann authored
* devel-2.1: Extend ConfdFilterCallback with consistency checks Abstract the confd client creation Remove unused import from test file kvm_flag hypervisor parameter Move the runas user at execution time Send "501 Not Implemented" back when method not found Adding QA RAPI tests for activate-disks and deactivate-disks calls SerializableConfigParser: Make Loads class indep Unbreak command line job submission Allow file storage to be grown Write grow support for file storage Watcher: fix some doc typos Watcher: do not warn for missing hooks dir Extend the hypervisor API with name-only shutdown Distribute list of enabled hypervisors in ssconf Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Note that users of the callback will have to manually check the attribute. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
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 31, 2010
-
-
Guido Trotter authored
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>
-
Guido Trotter authored
Everything still works the same way, but the user is calculated each time we start kvm, rather than stored in the config file. This makes it easier to implement the "pool" security model. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 30, 2010
-
-
René Nussbaumer authored
Before this was "400 Bad Request" and thus it didn't reflect the reality. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 26, 2010
-
-
René Nussbaumer authored
* This also adds support for authenticated RAPI calls * Other HTTP methods than GET/POST Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 25, 2010
-
-
Guido Trotter authored
Currently SerializableConfigParser.Loads is a static method that returns a SerializableConfigParser. With this patch we change it to a class method that returns a member of the class. This way a subclass calling Loads on itself will get its own member, rather than a bare SerializableConfigParser. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
- Mar 23, 2010
-
-
Guido Trotter authored
A change introduced in 5299e61f modified the contents of JobExecutor.jobs, missing a place where this tuple was deconstructed. This creates a traceback in gnt-* <any> --submit, fixed by this patch. 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>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
If the hooks dir does not exist, do not warn needlessly. This is similar to commit a9b7e346 (for backend.py). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Currently the ShutdownInstance method of the hypervisors takes a full instance object. However, when doing instance shutdowns from the node only, we don't have a full object, just the name. To handle this use case, we add a new ‘name’ argument to the method, which makes the shutdown not use/rely on the ‘instance’ argument. The KVM and fake hypervisors need a little bit of work, otherwise the change is straightforward. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This can be used by nodes to know which hypervisors they are supposed to support. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Guido Trotter authored
* devel-2.1: ganeti-confd: Call pyinotify flags correctly Fix burnin error when trying to grow a file volume Some epydoc fixes A rewrite of LUClusterVerify Introduce a bool CLI option type Fix backend.VerifyNode behaviour for VG problems Adding missing documentation to make the docs better Remove race condition in FileStorage.Create KVM: Check instances for actual liveness KVM: improve GetInstanceInfo docstring Revert "Only override any and all if not defined" Adding RAPI call to deactivate-disks for an instance Adding RAPI call for activate-disks on an instance Add a hint to masterd for inconsistent clusters SimpleConfigReader: add docstrings Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
The "apparently pylint was right" commit. Although the pyinotify constants work on old distributions, they fail on new ones, with new python. Fixing this by calling them in a way that works everywhere. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
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>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Per issue 90, current cluster verify is very very brittle. It's one of the oldest pieces of code, with only additions without cleanups over the last years. Among its problems: - data initialization interspersed with verification of RPC results, leading to non-initialized data for some branches - due to the above, we order strictly some checks and we have the case where a bad node time result will skip checking of node volumes - many many local variables, with each new check adding a new dict, leading to a spaghetti of dicts in the main Exec function - monolithic code, both Exec() and _NodeVerify() do a lot of independent checks This patch does an imperfect rewrite, but at least we gain: - a clear infrastructure for adding more checks (the new NodeImage class, with it's clear and documented fields), and removal of most per-node dicts from the Exec() function - the new NodeImage object should allow better type safety, e.g. by allowing pylint to check the actual object attributes rather than strings as dict keys - a-priori initialization of data fields, eliminating the need to introduce dependencies between checks - per-result-key status field, allowing elimination of duplicate error messages (where we want) - split of most independent checks into separate functions, for greater clarity The new code, being new will probably introduce for the short term more bugs than it removes. However, it should offer a much better way for extending cluster verify in the future. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This option type enforces its value to either True or False, relieving the scripts from manually parsing the values in each function. We also update the bash completion code to use the option type if possible. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
In case LVM is broken, backend.GetVolumeList will raise an RPC exception (as expected since it's a function exposed over RPC). Therefore we must be prepared to catch any such exceptions, so that we don't fail the whole verify call in this case. cmdlib is already prepared to handle string results for this response key. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
René Nussbaumer authored
Also fixed a typo I noticed. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 22, 2010
-
-
Guido Trotter authored
Rather than checking that the file doesn't exist, and then creating it, we create it with O_CREAT | O_EXCL, making sure the checking/creation is atomic. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Currently if we find a live process with the pid we saved we assume kvm is alive. What could happen, though, is that the pidfile has been reused. In order to avoid that we change the check to make sure, everywhere, that the process we see is our actual kvm process. In order to do so we open its cmdline, and check that it contains the correct instance name in the -name argument passed to kvm. 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>
-
Guido Trotter authored
This reverts commit bd561702. Turns out our and python's any/all are not compatible. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 18, 2010
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
All non-oneliner functions, after this patch, have their docstring. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
* devel-2.1: burnin: implement basic confd testing AsyncUDPSocket.process_next_packet WaitForSocketCondition: rename, handle EINTR move http.WaitForSocketCondition to utils ConfdCountingCallback ConfdClient: add synchronous features Replace @keyword with @param in confd client AsyncUDPSocket: abstract do_read function Burnin: don't add/remove routed nics Only override any and all if not defined Conflicts: lib/http/__init__.py trivial, double removal Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-