- Feb 27, 2013
-
-
Michael Hanselmann authored
Until now all tests depended on simple AND/OR conditions. With the introduction of virtual cluster support, some tests can only run if virtual clusters are not in use (e.g. not yet supported or not possible). Instead of introducing more logic for enabling/disabling tests, callable values are supported instead. “ht.WithDesc” should be used on them to continue to provide a readable description. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
If these new options are set, a virtual cluster is created and used. Virtual clusters consist of 1..N virtual nodes on a single physical (or virtual) node. The design of virtual clusters is described in “doc/design-virtual-clusters.rst”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Feb 20, 2013
-
-
Michael Hanselmann authored
Use a sort key function instead of using a comparing function (“cmp=…”). The latter is not supported in Python 3 and using a sort key function is easier. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Having a readable representation makes debugging easier. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Also make “used” a property. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Feb 12, 2013
-
-
Michael Hanselmann authored
Use a method on the instance object instead of going through “qa_config.GetInstanceTemplate”. This provides for better encapsulation. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Call the wrapped instance method directly. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Disk template names shouldn't be hardcoded. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Bernardo Dal Seno authored
Lines removed in devel-2.7 (250a9404) weren't removed in the merge with master. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
In some scenarios it can be useful to add more arguments to “gnt-cluster init”, such as “--no-drbd-storage”, if DRBD is not installed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Feb 11, 2013
-
-
Michael Hanselmann authored
These are no longer used. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
This is no longer needed now that instance/node objects in QA have attributes. Use a helper function instead to retrieve an entity's identifying attribute. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
The new objects support attributes. Item access (like a dictionary) is going away in a couple of patches. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
The new objects support attributes, which are cleaner than dictionary-style access. Item access (like a dictionary) is going away in a couple of patches. Also, pylint is better at checking attributes than dictionary entries. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Instead of having a module-level function in “qa_config” to release a node, a new method on node objects is used. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Bernardo Dal Seno authored
There's never been support for a configuration where nodes in the same node group have different values of the exclusive_storage flag. This patch disables the possibility to change the flag for individual nodes. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Up until now nodes were stored as a dictionary. The keys were hardcoded in a lot of places and entries modified directly. This patch introduces a new class for nodes in QA named “_QaNode”. It still supports accessing details via dictionary syntax, but that will be removed after a couple of patches changing all users. Unit tests for “qa_config.AcquireNode” are also included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Feb 08, 2013
-
-
Michael Hanselmann authored
Instead of having a module-level function in “qa_config” to release an instance, a new method on instance objects is used. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Up until now instances were stored as a dictionary. The keys were hardcoded in a lot of places and entries modified directly. This patch introduces a new class for instances in QA named “_QaInstance”. It still supports accessing details via dictionary syntax, but that will be removed after a couple of patches changing all users. Unit tests for “qa_config.AcquireInstance” are also included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Release instances directly from “ganeti-qa” instead of doing so in the three tests removing instances. This is in line with how nodes are released and makes it easier to find and debug double-release issues. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
The new configuration object for nodes will not support it anymore. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
This is a temporary solution until nodes and instances are converted to objects with attributes. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
The same code can be written in a single expression. The earlier patch named “Refactor storage of runtime exclusive storage flag in QA” provided the unit test. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
This is a follow-up for “qa_config: Remove exclusive storage flag from config”. Instead of storing the flag in a module-level variable it is now stored within the new QA configuration class and unit tests are provided. Wrappers in “qa_config” maintain the existing interface. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Ever since its introduction (sometime before commit cec9845c in September 2007), the QA configuration was stored in a dictionary at module-level in “qa/qa_config.py”. The configuration was loaded, verified and evaluated using module-level functions. Since then the configuration has become more complicated and more functionality has been added. This patch refactors handling the configuration to use a class and provides unittests. - The configuration is loaded through a class method which also verifies it for consistency - Wrapper methods are provided in “qa_config” to not change the interface - Unit tests are provided for the new configuration class - The configuration object is still stored in a module-level variable and can be retrieved using “GetConfig” (direct access should be avoided so an uninitialized configuration can be detected) Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Commit 6a0f22e1 added the ability to track the status of the cluster-wide flag for exclusive storage. It did so in a way which modifies the in-memory configuration dictionary. This patch changes the code to use a plain global variable as a temporary solution until a configuration object is added. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Feb 05, 2013
-
-
Iustin Pop authored
This enabled the redirection; QA output after this patch should become much much smaller (on a 'quick' QA, we are left with ~0.5MB output on stdout and 64MB redirected output). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Some QA commands generate non-trivial output: for a full QA, the gnt-* list commands generate more than 300MB of data. To make the QA logs more parseable by humans, we need support for redirecting output of commands to a different place. This patch adds a 'AssertRedirectedCommand' that does this, redirecting the output to a (fixed) log file in the Ganeti log directory. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch adds an optional kwarg that allows skipping the "Command: …" line in QA output. This is helpful if we only need to run some maintenance actions, that are QA-related and not Ganeti-related. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Feb 04, 2013
-
-
Bernardo Dal Seno authored
This test used to leave a node with orphan logical volumes and unused DRBD minors. Now, the expected leftovers are cleaned up after the test, and cluster-verify is run. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
It is only used in one place and not necessary. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Feb 01, 2013
-
-
Bernardo Dal Seno authored
Instance tests are run with or without the exclusive-storage flag set. More configurations can be added easily. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
We want to make sure that instance operations don't leave the cluster in a bad state. The "instance-remove-drbd-offline" test leaves some debris behind, so it's been moved to the last position. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
The code launching instance tests for "plain" and "drbd" templates has been unified. In this way it's easier to add more templates, and to re-use the same tests with different configurations. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
Some instance test functions took two node arguments, some took one, and some took two but the second argument could be None. This patch makes such functions uniform by using a list of nodes as an argument. This simplifies the following refactoring. No test logic has been changed. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
Instance test functions check the current configuration, and they will run the actual tests only if the configuration supports them. This will be used for refactoring in following patches. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
These make possible to simplify the logic of tests requiring more nodes. Used in the following patches. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
QA configuration now tracks the state of the exclusive_storage flag at cluster level. This will be used to selectively enable tests according to the configuration. Also, it's now possible to specify the initial value of the exclusive_storage flag in the configuration file. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-