- Apr 07, 2010
-
-
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>
-
- 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)
-
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
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 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
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
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
-
-
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
This function allows receiving socket data synchronously. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
- Rename WaitForSocketCondition to SingleWaitForFdCondition - Avoid potentially infinite loop, if we continue to get interrupted - Handle eintr correctly - Avoid the poller try/finally, as the poller object gets destroyed anyway - Provide a new WaitForFdCondition - Using retry, guarantee to continue checking until the timeout expires - Needs an extra helper class, as it uses retry in a very custom way (no sleep happens, because the poller sleeps by itself) 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:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
This new confd callback counts received replies for the registered queries. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
By sending requests with async=False, and receiving replies with ReceiveReply we can more easily use confd from a synchronous client. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
@keyword was used inappropriately. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
This basically implements read handling, without catching all exceptions. When using the socket in synchronous mode, it's useful to avoid losing exception data (which, in an async daemon, can only be logged) Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
If any or all are already defined (because we're using a new version of python) just link them inside "utils" rather than redefining them. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 17, 2010
-
-
Michael Hanselmann authored
Certificates and keys generated using these functions will be used for inter-cluster instance moves. As per design, the private key should never leave the node. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
- Pass keyword parameter as such - Replace “not x == y” with “x != y” Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This patch introduces the option “--use-replication-network” for the cluster copyfile functionality, which is useful if the primary and secondary network are significantly different (see issue 32). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch allows GetOnlineNodes to return the secondary IPs instead of the node names, and to provide filtering of the master node (required to be done in this function in case we return the secondary IPs). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-