History | View | Annotate | Download (21 kB)
QA: Clean up after "instance-remove-drbd-offline" test
This test used to leave a node with orphan logical volumes and unused DRBDminors. Now, the expected leftovers are cleaned up after the test, andcluster-verify is run.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>...
QA: Run instance tests with different cluster configurations
Instance tests are run with or without the exclusive-storage flag set. Moreconfigurations can be added easily.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
QA: Use lists of nodes as argument to instance tests
Some instance test functions took two node arguments, some took one, andsome took two but the second argument could be None. This patch makes suchfunctions uniform by using a list of nodes as an argument. This simplifies...
QA: Refactored launching of the various instance tests
The code launching instance tests for "plain" and "drbd" templates has beenunified. In this way it's easier to add more templates, and to re-use the sametests with different configurations.
QA: Run cluster-verify after instance tests
We want to make sure that instance operations don't leave the cluster in abad state. The "instance-remove-drbd-offline" test leaves some debrisbehind, so it's been moved to the last position.
QA: Added exclusive_storage to qa_config
QA configuration now tracks the state of the exclusive_storage flag atcluster level. This will be used to selectively enable tests according tothe configuration.
Also, it's now possible to specify the initial value of the...
QA cleanup: Removed instance-disk-failure test
The test was broken, out of sync with the rest of the code, and prone tocrashes. Until someone does a better job, it's better to remove thetest. This simplifies further refactoring.
QA: Cluster-verify reports shared PVs with exclusive storage
Exclusive storage forbids sharing PVs between unrelated LVs. This is a testthat cluster-verify correctly report such cases.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>...
QA: Templates incompatible with exclusive storage reported
Cluster-verify should report instances whose disk template is notcompatible with the exlusive storage setting.
QA: Uniformity check for exclusive_storage in cluster-verify
Cluster-verify should report nodes in the same nodegroup with differentvalues of the exclusive_storage flag.
QA: Test for basic features of exclusive storage
Check that creation of instances doesn't trigger any error.
Merge branch 'devel-2.6'
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
QA: Use instance name for rename test
Reported in issue 341. In some setups the instance live in a differentnetblock from the cluster. Therefore a the configuration-global “rename”name shouldn't be used for them. Instead another instance name is used....
QA: TestAssignNodesIncludingSplit can be disabled
The test can now be enabled/disabled with the "group-rwops" flag.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
QA: never put a master node offline
Before, it could happen that the master node was chosen to be set offlinein the "instance-remove-drbd-offline" test. Also changed a finally clauseto make sure that an exception while making the node online doesn't break...
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Fix warnings/errors with newer pylint
To help developing Ganeti on newer distributions, let's try to fixpylint warnings/errors. I'm using pylint from current Debian wheezy:pylint 0.25.1, astng 0.23.1, common 0.58.0, and we have 3 things thatneeds fixing....
Fix decorator uses which crash newer pylint
Pylint version:
pylint 0.25.1, astng 0.23.1, common 0.58.0
crashes when passing the fully-qualified decorator name with:
File "/usr/lib/pymodules/python2.7/pylint/checkers/base.py", line 161, in visit_function...
Bump pep8 version to 1.2
Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:
- bump version in the docs- silence some new checks that are wrong due to our indent=2 instead of 4- fix lots of errors in the code where the indentation was wrong by 1...
Merge branch 'stable-2.6'
Add a simple QA test for gnt-node list-drbd
This will be run only if 'haskell-confd' QA configuration has beenenabled.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Agata Murawska <agatamurawska@google.com>
QA updated to test instance removing when sec. is offline
Added test checking that it is possible to remove an instance with drbddisk when non-primary node is offline.
Signed-off-by: Agata Murawska <agatamurawska@google.com>Reviewed-by: Iustin Pop <iustin@google.com>...
QA: Added test for gnt-instance recreate-disks
The test is disabled by default, as it takes a long time.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
QA: add toggle for fewer common instance tests
Currently, the "common" instance tests (shutdown, rapi stoppedconsole, stopped modify, startup, rapi shutdown, rapi startup, list,info, modify, rapi modify , console, rapi console, reinstall, rename,rapi rename, rename and back, rapi rename and back, grow disk, reboot,...
QA: stop logging SSH arguments for each invocation
Currently, this is how the QA log looks like:
Command: ssh -oEscapeChar=none -oBatchMode=yes -l root -t -oStrictHostKeyChecking=yes -oClearAllForwardings=yes -oForwardAgent=yes -oControlPath=/tmp/ganeti-qa-multiplexer.DMzkuH -oControlMaster=no node14 exit...
QA: Cleanup after commit 5fa0375e4a
Some tests had wrong assumptions on the instance status and someneeded explicit start or stop commands.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
QA: Decorate tests with instance checks
Start using “InstanceCheck” decorator where appropriate. Use direct callfor check in places where the instance status changes during the test.
The parameters of “TestInstanceImport” had to be re-ordered to have the...
QA: Support passing keyword arguments to test functions
Until now this wasn't possible.
QA: Fix shutdown for reinstall/rename tests
The “RunTestIf” uses an AND association between the passed test names,so the instance would be be shut down if both rename and reinstall wereenabled. Since this is not necessarily the case, OR must be used.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Add grow-disk tests in QA
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Convert listing exports to query2
This solves one case where locks are acquired during LUXI queries.Pretty late into the transition I noticed that OpBackupQuery had a“use_locking” parameter for a long time, but didn't use it. Sincemost of the other changes were already and this allows exports to...
QA: Add tests for “gnt-job list”
OpInstanceSetParams: Merge {off,on}line_inst parameters
Instead of having two separate parameters, a single boolean parameter isused. Unfortunately we need a third state to say “no change”, so thevalue can be None, True or False (similar to other parameters). There...
Fix gnt-cluster modify check of passed options
… and add the disk_templates/vcpu_ratio new entries. Since the defaultispecs_* are dicts, we can't compare them to none.
Additionally, add a QA test for this case (empty cluster modify).
Signed-off-by: Iustin Pop <iustin@google.com>...
Rework instance rename QA tests
After looking again at the QA speeds, it turned out that instancerename was run 12 times via the command line and 12 times via RAPI;outside of start/stop which we need for maintenance during QA, this isthe most used test....
qa: fix disk parameters tests
Fix an error in the disk parameters tests (the arguments to gnt-clusterwere not passed correctly) and move them to separate functions.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add QA test for “gnt-debug delay”
This would have caught a bug introduced with the recent RPC changes.
RAPI: Fix resource for replacing disks
Commit d1c172deb4f inadvertently changes the“/2/instances/[instance_name]/replace-disks” resource to use bodyparameters. There were no QA tests and the issue wasn't noticed.
This patch re-introduces support for query parameters and adds a QA...
QA: Add tests for instance start/stop via RAPI
This would have detected the issue fixed in the previous patch.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
PEP8 for QA
- Makefile.am: added QA directory to the paths checked by pep8- qa/: fixed the reported errors- Makefile.am: also, added qa_group.py to qa_scripts
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
DeprecationWarning fixes for pylint
In version 0.21, pylint unified all the disable-* (and enable-*)directives to disable (resp. enable). This leads to a lot ofDeprecationWarning being emitted even if one uses the recommendedversion of pylint (0.21.1, as stated in devnotes.rst)....
Most boring patch ever
s/'/"/ in (hopefully) the right places.
Implement instance failover via RAPI
No idea why this was missed before.
Merge remote branch 'origin/devel-2.4'
Switch QA over to using instance stop --no-remember
Instead of hardcoded Xen commands. This will make it work for allhypervisors, instead of duplicating hypervisor functionality in QAitself.
The timeout has been removed as gnt-instance stop itself will make...
QA: Add tests for node group tags
QA: Adding a config option to disable cluster epo
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
QA: also run gnt-cluster repair-disk-sizes
So that we don't happen again to break this forever without realisingit.
The patch also replaces one ' with ".
QA: run the redist-conf command
This was (AFAICS) completely missing from the QA suite.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
QA: Add tests for queries via RAPI
QA: Improve tests for gnt-os
- Test OS lists via command line and RAPI- Test “gnt-os diagnose” and “gnt-os info”
QA: Rename OS state test for clarification
Also add an additional check to ensure the OS does not exist.
gnt-cluster master-failover: Undrain queue
- Move functions for drain status (tracked via file) from jqueue to jstore- Undrain queue on master failover if necessary- Add QA test
Introducing gnt-cluster epo
This is a convenience command to do an automated EPO in the possible limits ofGaneti.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Add QA rapi test for instance reinstall
This tests at least the basic case, unfortunately there is no way tocheck all possibilities using the provided rapi client, as that will usethe new method unless the cluster doesn't support it.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
Add RAPI resource for instance console
Small QA fixes: groups via RAPI, cluster OOB
Add “cluster-oob” to sample configuration file. Don't run RAPI grouptests if disabled.
Run pylint over QA code too
Right now, the QA code is not covered by pylint, and this shows atleast one low-impact bug.
This patch does the necessary changes to make QA pylint-clean, and thechanges the makefile to run pylint for it.
Notable changes:...
QA: use a persistent SSH connection to the master
The recent additions to QA (many more tests) make QA slow if themachine on which the QA runs is not very close to the tested nodes —or in general, when the SSH handhaske is costly.
We discussed before about using a persistent connection, and here is...
QA: Fix duplicated OOB tests
Patch f55312bd added the OOB tests to TestClusterVerify, which is notactually a test for cluster verify, but a runner for cluster verifythat is called multiple times, for each instance type, etc. This ledto running the OOB commands multiple times, which is painful...
Add QA tests for OpAssignGroupNodes
Signed-off-by: Adeodato Simo <dato@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
qa_group.py: reimplement query tests with qa_utils
Now that group queries use query2 infrastructure, update the QA tests touse the generic functions in qa_utils.py.
Signed-off-by: Adeodato Simo <dato@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
ganeti-qa: Wrap lines longer than 80 chars
Merge branch 'devel-2.3'
Conflicts: lib/cmdlib.py: Trivial qa/ganeti-qa.py: Trivial...
QA: Run cluster-verify as part of all instance tests
“gnt-cluster verify” looks at some per-instance information as well, soit should be run for each instance type QA tests.
QA: Fix typo and add “not”
QA: Add some basic OOB tests
QA: Extend unittests for query operations, add tests for list-fields
More QA tests for group operations
This adds QA tests for the SetGroupParams operation, both for CLI andRAPI. Additionally, it adds tests for add/rename/remove groups via RAPI,which had not been included in a previous patch series. Finally, it alsotests setting "alloc_policy" (and, for the CLI, "ndparams") at group...
QA: Improve tests for instance/node list
- Query all known fields- Random combinations (using a PRNG with a fixed seed) of fields- Order of result names
qa: test same-name instance rename
Use the simplified command and rapi version to perform an instancerename to the same name. This is performed anytime the rename test isenabled, while the "other-name" rename is performed when also analternative name is provided....
Simplify instance rename qa test
The current instance rename qa testing function can only performback-and-forth renames, both for command line and rapi. In order to beable to perform same-name rename tests we change it to be able toperform simple renames, and then we change qa to call it to perform both...
Group operations: add QA tests for add/remove/rename
This is a single function that tests all of of the following:
- creating groups - creating groups that exist fails - renaming an empty group - renaming a group with nodes - renaming to a name that already exists fails...
Querying node groups: add QA tests
This adds QA tests for both CLI and RAPI.
Signed-off-by: Adeodato Simo <dato@google.com>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Further cleanups on QA
This is more of an RFC. The patch attempts to address two issues:
- running conditional tests is ugly right now- we don't know what tests we skipped
By using the new RunTestIf, we solve both. But a significant number oftest decisions are more complex than just “is test enabled”, so those...
Merge branch 'devel-2.2' into devel-2.3
Conflicts: lib/cmdlib.py (reverted & applied manually the change)
QA: add tests for gnt-cluster modify -B
QA: Run “gnt-cluster verify” while DRBD instance exists
This tests some parts of the disk information collection.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Luca Bigliardi <shammash@google.com>
LUExportInstance: Accept instance already shut down
To remove the instance after an export it needs to be stopped. This canbe achived using the parameter “shutdown”, or by explicitly shuttingdown the instance before exporting. The latter would still require the...
QA: Allow job queue test to be disabled
On my machine it takes over 30 seconds, disabling it canspeed up the QA.
Fix QA mixup of node/instance tests
There are two node tests that are run from RunCommonInstanceTests, which is thebad place—it causes these node tests to be run three times instead of once.
QA: Add test for “gnt-node modify”
Brown-bag fix for leftover comment
I did forgot this in the original patch. Sorry!!!!
Rework QA interaction with the watcher
The interaction with cron-launched watcher is a well-known failure mode of QA:
---- 2010-10-14 06:54:55.464839 time=0:00:56.764827 Test tools/move-instance
For the following tests it's recommended to turn off the ganeti-watcher cronjob....
Change QA log output
Currently, the logging in QA doesn't show the duration of the varioussteps, and if it is needed one has to perform log manipulation. Thispatch changes the output so that the log informatio is line based (asopposed to block-based), such that it's easy to grep for all log lines:...
Try again to fix the inter-cluster move QA test
This time, we re-establish the old pri/sec nodes corretly. Unfortunately thiswill require now a 3-node cluster at least for drbd instances, hence it'ssomewhat suboptimal, but… The other option would be to move it simply from p:s...
QA: Fix instance move tests
The instance move tests were moving the instance from node pair (A,_) to(B, A), and left it there. This patch makes sure that the first stepmoves the instance to (B,A) but the second one back to (A,B), so thatthe instance is left on the same primary node....
Add some trivial QA tests for the new OS states
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
QA: Run simple job queue test
RAPI client: Support modifying instances
gnt-backup: Don't show confusing message w/o target node
“gnt-backup export” requires the target node. Until now, the masterdaemon would complain that the “parameter'OP_BACKUP_EXPORT.target_node' fails validation”. With this patch,an additional check is done in the client program....
QA: Test renaming instance via RAPI
QA: Test instance migration via CLI and RAPI
QA: add tests for the reserved lvs feature
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Merge branch 'stable-2.1'
RAPI client: Switch to pycURL
Currently the RAPI client uses the urllib2 and httplib modules fromPython's standard library. They're used with pyOpenSSL in a very fragileway, and there are known issues when receiving large responses from a RAPIserver....
qa: shutdown instance before trying disk convert
Because we have to. :)
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
qa_rapi: Test inter-cluster instance move script
This test moves an instance on the same cluster and, if successful,moves it back. While not testing a real move between two clusters,this is certainly better than nothing.
Merge branch 'devel-2.1'
Conflicts: daemons/ganeti-noded lib/daemon.py lib/rapi/baserlib.py lib/rapi/rlib2.py lib/utils.py
Signed-off-by: Luca Bigliardi <shammash@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>