- 30 Jan, 2013 12 commits
-
-
Dato Simó authored
harep(1) detects certain kind of problems with instances and applies the allowed set of solutions. See doc/design-autorepair.rst. Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dato Simó authored
In particular: - make ArHealthy take an optional AutoRepairData; this allows to represent the situation where a repair completed successfully, and hence there's an associated tag we might want to know about. - add an 'arTag' member to AutoRepairData to store the exact tag this data was derived from; this allows for easier removal of the tag when its associated state is superseded. It also stores the tag that will be written to the cluster when a new AutoRepairData record is created. - change the default sort order of AutoRepairResult to reflect the precedence used when reading tags from an object (a failure, if present, is always the resulting state; a success overrides an ENOPERM). - (trivial) make AutoRepairStatus and AutoRepairData derive Eq and Show. Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dato Simó authored
Instead of waiting 15 seconds every iteration of the waiting loop, start with 0.5 seconds and increment exponentially until a certain maximum is reached. Keep the maximum at 15 seconds. Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dato Simó authored
This new 'execJobsWaitOk' returns "Bad" not only if an error occurs, but if any of the submitted jobs doesn't succeed. Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dato Simó authored
This new 'submitJobs' function doesn't wait for job completion, it just returns the job IDs immediately. Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dato Simó authored
Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Helga Velroyen authored
This removes the check for conflicts from the Haskell version of the OpCode NetworkDisconnect. This alignes the Haskell code with the patch "Force conflicts check in LUNetworkDisconnect" (which is currently under review). I will submit these patches together then. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Helga Velroyen authored
Make _UnlockedLookupNetwork() raise OpPrereqError (instead of returning None) in case it does not find the requested network. Remove useless and duplicate code such as: if net_uuid is None: raise... Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Helga Velroyen authored
Until now if one disconnects a network with --no-conflicts-check and then remove it, there is a possibility to leave instances with NICs referencing non-existing networks. This causes network queries, instance removal and modification to fail. This patch allows a network to be disconnected from a nodegroup, only if instances residing in the nodegroup do not have NICs attached to the network. Otherwise OpPrereqError is raised. The --no-conflicts-check option is removed from the gnt-network disconnect command as well. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Split retrieving supported features into a dedicated function which can be mocked. Tests are added for both “_ProbeTapVnetHdr” and “_GetTunFeatures”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
* devel-2.7: hv_kvm: Original error message, keyword parameter CLI.hs: fix double spaces in option help strings Add new NIC parameter to man page of 'gnt-instance' Fix spelling issue in hroller.rst Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
- Include original error message when creating TAP interface failed - Pass keyword parameter as such Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- 29 Jan, 2013 5 commits
-
-
Michael Hanselmann authored
Add two tests for hypervisor constants. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dato Simó authored
Some help strings with continuation backslashes ('\') were providing a space both before and after the backslash, resulting in double spaces in help output. Provide it only after the backslash, which fixes the issue and is consistent with the rest of the file. Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Helga Velroyen authored
This adds the fields 'inst_cnt' and 'inst_list' to the Haskell implementation of the network queries. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Helga Velroyen authored
So far, a couple of helper function for the network queries resided in Config.hs. I figured it makes more sense to move them to Query/Network.hs, since they are very tailored to that purpose. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Helga Velroyen authored
According to doc/design-network.rst, there is a new NIC parameter 'network', which can be used to link an instance to a network. This was so far undocumented in the man page of 'gnt-instance'. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- 25 Jan, 2013 17 commits
-
-
Helga Velroyen authored
This adds more fields to the network queries: - group_cnt, free_count, reserved_count, and map Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Benjamin Kerensa authored
'explicitly' was spelled the wrong way Signed-off-by:
Benjamin Kerensa <bkerensa@ubuntu.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
* devel-2.7: kvm: fix bug while fetching -device list Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Commit 3d942d8b broke instance migration (“self._cmd” was set to None). This patch fixes that issue, refactors “MigrateInstance” for testing and adds those tests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
_GetKVMOutput expects the command to succeed, but unfortunately on some versions of kvm "-device ?" will output a correct list of devices, while exiting with an error code. To fix this we accept failure in that case (note that this doesn't change the situation when this command is not supported, as in that case the output will still not contain the correct string). This patch also updates the docstring, adding the parameter types and description. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Test functions for retrieving instance and node information. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Test stopping an instance, and ensure the configuration file still exists after an instance couldn't be stopped. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Test starting an instance in normal mode, in paused mode, and in case of failure. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Check whether doing so raises an exception. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Test success and failure. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Test whether any existing configuration file named after the instance is removed from Xen's “auto” directory. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
There are two separate Xen hypervisors (HVM and PVM), as well as two different Xen commands (xl and xm). This already provides four different combinations and future changes might bring even more. For this reason the test classes for the Xen hypervisor are not defined manually, but rather generated at module load time. Doing so makes it possible to keep using the standard unit test infrastructure provided by the “unittest” module. Using “super”, which we try to avoid in other places, is necessary to call functions provided by other classes. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Test error handling while writing Xen configuration files. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
This tests “unknown” values of “constants.XEN_CMD”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Instead of using the “XEN_CMD” constant in multiple places, that is now all in a single place and can easily be changed for unit tests (through a parameter given to the constructor). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
* devel-2.7: hv_xen: Remove config after shutdown was successful Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- 24 Jan, 2013 6 commits
-
-
Helga Velroyen authored
This way, it is easier to make it call the haskell implementation of the network queries. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Helga Velroyen authored
This is the beginning of the implementation of network queries. This includes establishing all infrastructure to run the network queries and implement querying of some simpler fields and the node group listing. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
When displaying query results of type Maybe, one could use the function rsMaybe. Unfortunately, this function maps 'Nothing' values to RSNoData which gets displayed as '?' in the list of query results. These semantics do not fit if the result is of a Maybe type, because it is an optional field, because in this case 'Nothing' is not an error (like for example the consequence of an RPC error), but a legitimate result and as such should be displayed as '-' in the result list. For this purpose, this patch introduces another version of rsMaybe, which is called rsMaybeUnavail to be used for optional fields. For consistency, rsMaybe gets renamed to rsMaybeNoData. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
For network queries to work, we need to extend the general config type to include all available networks. Additionally, we add UUIDs to the network type itself. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
If stopping an instance failed, the configuration would already be gone and other operations depending on it (e.g. migration) would no longer work. With this patch the configuration file is only removed once the instance was succesfully stopped or destroyed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-