- Apr 12, 2010
-
-
Iustin Pop authored
Currently the backend parameters are not exported automatically, but only a few directly in the '[instance]' section. Hypervisor type and hypervisor parameters are not exported at all. This patch creates two separate sections for the be and hv parameters, and stores the parameters (including ones that come from the cluster defaults, but not the hypervisor globals for example) in the export. The import code is not changed yet. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The patch tries to export all params (based on the dict defined in constants), using None for missing keys. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This fixes an old 'FIXME' entry. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
This patch makes sure that the Ganeti RAPI credentials are setup, if any, on cluster init time. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@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>
-
Guido Trotter authored
Under squeeze pylint reports the following errors: ************* Module ganeti.serializer E1103:155:LoadSignedJson: Instance of 'False' has no 'get' member (but some types could not be inferred) ************* Module ganeti-masterd E1103:166:ClientRqHandler.handle: Instance of 'False' has no 'get' member (but some types could not be inferred) E1103:167:ClientRqHandler.handle: Instance of 'False' has no 'get' member (but some types could not be inferred) ************* Module gnt-instance E1103:431:BatchCreate: Instance of 'False' has no 'keys' member (but some types could not be inferred) For the first two cases it's actually wrong: we had checked before that the variable on which "get" is called is actually a dict. In the third case though such check doesn't exist, so we add it. Then we silence the error all three times. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This is to keep same naming across all tests (modules separate with dot, followed by _unittest.py). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Since the actions are potentially destructive, we should try to get a consistent view of the cluster, so it's better to get the most coverage possible. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch changes the coverage parameter to allow specification of max coverage (via -1), versus auto-computation (default, 0) and manual specification. Unittests are updated for this case too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 08, 2010
-
-
Iustin Pop authored
The patch changes significantly the watcher man page, as it was very simplistic. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch changes the watcher so that it maintains (on all nodes) the list of instances and DRBD devices by shutting down ones that confd daemons indicate should not be running on this node. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This will be used to conditionally enable the watcher node maintenance feature. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This new callback simply stores (without calling any lower-level callback) the last result; coupled with the filtering callback, this ensures that it has the 'best' response after all have been received. The result can then be retrieved via the GetResponse method. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently, there is no way for a user of the confd client library to know how many replies there should be, whether all have been received, etc. This is bad since we can't reliably detect the consistency of the results. This patch attempts to fix this by adding a synchronous WaitForReply function that will wait until either a timeout expires, or until a minimum number of replies have been received (interested users should add similar functionality for the async case). The callback functionality will still do call-backs into the user-provided code during the wait, but after this function has returned, we know that we received all possible replies. Note: To account for the interval between initial send of the request, and calling of this function, we modify the expiration time of the request. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently the requests are tracked in _request and in _expire_requests. This is conventient, but it restricts the ability to extend the request tracking, e.g. via packet stats and/or extension of expiration time. This patch introduces a new simple class _Request that holds all properties of pending requests; it then uses instances of this class as values in _request instead of tuples, and removes the _expire_requests. The only drawback is the change in behaviour of _ExpireRequests: previously, it used to scan the list only up to the first non-expired request, after which it aborted. Now it will scan the entire dict, which (depending on workload) could change the time behaviour. I don't think this is a problem, as: - deleting from the head of a list is very expensive (list.pop(0); list.append() is an order of magnitude more expensive than deleting an element from a dictionary and re-adding it) - we should have more than tens or hundreds of pending requests; in case this assumption changes, we could introduce a no-more-often-than-X expiration policy, etc. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- 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>
-
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)
-
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
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>
-