History | View | Annotate | Download (24.3 kB)
qa_instance: Virtual cluster support for instance list
Use path of virtual node when retrieving ssconf's instance list.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
QA: Set disk template directly via instance object
Use a method on the instance object instead of going through“qa_config.GetInstanceTemplate”. This provides for better encapsulation.
Remove qa_config.GetInstanceNicMac
Call the wrapped instance method directly.
QA: Use constants for disk templates
Disk template names shouldn't be hardcoded.
QA: Convert instances from items to attributes
The new objects support attributes. Item access (like a dictionary) isgoing away in a couple of patches.
QA: Convert nodes from items to attributes
The new objects support attributes, which are cleaner thandictionary-style access. Item access (like a dictionary) is going awayin a couple of patches. Also, pylint is better at checking attributesthan dictionary entries....
QA: Release instances through method
Instead of having a module-level function in “qa_config” to release aninstance, a new method on instance objects is used.
QA: Release instance in ganeti-qa
Release instances directly from “ganeti-qa” instead of doing so in thethree tests removing instances. This is in line with how nodes arereleased and makes it easier to find and debug double-release issues.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
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: Instance tests check the configuration before running
Instance test functions check the current configuration, and they will runthe actual tests only if the configuration supports them. This will beused for refactoring in following patches.
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 fix: TestInstanceExportWithRemove() updates configuration
When the instance is removed from the cluster by this test, it's also freedin the QA configuration.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
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: Added disk template to config
The disk templates used by the instances are tracked in the QAconfiguration. This will be used to selectively enable tests according tothe configuration.
Fix QA for --offline semantics modification
The previous patch series made it simpler to deal with ERROR_up offlineinstances, but didn't fix qa, that had the old expectations. This fixesthat, and adds more testing about the expected behavior.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
Add a small QA check in instance renames for tags update
We also need to change the signature for _GetInstanceInfo, since wedon't have access to the instance dictionary in the rename instancetest.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Add option to disable iallocator use in QA
By default some QA tests use iallocators. It is now possible to disableiallocators in QA, so that QA doesn't force having iallocators set up.The affected tests have now alternatives pathways.
Merge branch 'devel-2.6'
Fixed QA for replace-disks
Bug introduced in commit cc4b14f07: Part of a statement was missing. Thismakes pylint-qa fail.
Instance QA uses default iallocator
QA for recreate-disk and replace-disks now run also with the defaultiallocator.
gnt-instance reinstall: Don't always exit with success
If one or more jobs failed the exit status should be set accordingly.
Always_failover doesn't require --allow-failover anymore
If an administrator sets always_failover, it means that there is no needfor another explicit approval to failover instead of migrating.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>...
Migrate qa/*.py from constants to pathutils
File system paths moved from constants to pathutils.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
QA for instance migration made more compact
Also, the value of always_failover is not hard-coded any more, and it'spossible to disable changing the always_failover parameter, if needed.
QA for allocator in recreate-disks
QA for recreate-disks called it twice with a list of node; the first callnow uses an allocator.
Signed-off-by: Adam Ingrassia <api@google.com>Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Merge branch 'stable-2.6'
Ensure that --wait-for-sync is used in QA
We don't have a specific test for activate disks, so let's add it inthe cases where we run (incidentally) activate-disks.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Fixed doclint warning
Two blank lines are needed between functions.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: René Nussbaumer <rn@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 function do destroy disks
This is useful to simulate HW problems during QA.
QA: Test some instance parameters depending on hypervisor
For example, the “initrd_path” parameter is only available with xen-pvm,whereas “boot_order” is only available with xen-hvm.
Fixed typos, formatting, etc and added a comment
This patch only touches comments and man pages.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Fix QA import of existing instances
Commit f346a7d9 broke the TestInstanceImport test in QA, since itdropped the "always generate" parameter for backup import. We add anoverride mac parameter so that, no matter what is defined in theconfig file, imported instances (can) have a different MAC....
QA: Add configuration options for static MAC address
In some QA environments static MAC addresses must be used.
QA: Cleanup after commit 5fa0375e4a
Some tests had wrong assumptions on the instance status and someneeded explicit start or stop commands.
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...
Add grow-disk tests in QA
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...
LUInstanceSetParams: Allow no-op change of instance offline status
With this patch marking an instance already marked offline (or online)as offline/online again becomes a no-op. Also removed the unusedINSTANCE_UP variable.
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...
Merge branch 'devel-2.5'
Fix wrong option names in QA and cluster-merge
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....
Add tests for parameter "always_failover"
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
qa: use maximum and minimum memory
test modification of either parameter, but also both at once.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@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.
gnt-instance migrate: Adding --allow-failover option
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
TLReplaceDisks: Add check if disks are activated
Previously we failed later with a rather useless error message. Thispatch fixes this and tells the user to activate-disks if replace-disksis in the need of activated disks rather than abort with a cryptic error...
LUInstanceRename: Fail if renamed hostname mismatch
There's a problem if you run gnt-instance rename with a non FQDN and therenamed LU tries to resolve the hostname to make it FQDN. It could bethat this resolved hostname was just a CNAME to another name which leads...
gnt-instance reboot start instance if not yet started
This patch starts the instance when gnt-instance reboot is invoked on ainstance already stopped.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
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: Extend unittests for query operations, add tests for list-fields
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
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
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...
Simplify QA commands
Currently, 95% of the QA commands are executed in the same way: on themaster, based on a command list and with expectancies for succes:
AssertEqual(StartSSH(master['primary'], utils.ShellQuoteArgs(cmd)).wait(), 0)...
QA: Test ssconf_instance_list file on rename and creation
This test would've caught the bug fixed in the previous patch.
Change qa_utils.ResolveInstanceName to take name
… instead of an object. Allows it to be used in places whereonly the name is available.
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
Merge branch 'devel-2.1'
Conflicts: qa/qa-sample.json (trivial) qa/qa_cluster.py (trivial)
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Luca Bigliardi <shammash@google.com>
QA, burnin: allow selection of reboot types
After some more investigation, only the soft reboot type fails for Xen3.4 (due to the reboot/uptime time counter). As such, it's better toallow selective testing, since we do want to test in general theseopcodes/the command line script....
Merge branch 'stable-2.1'
qa: fix gnt-instance modify -t drbd
We need to pass the secondary node name, not a dict, which is an invalidvalue.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
QA: fix reimporting instance with different name
Since the original instance still exists, we need to use a different MACfor its NIC.
Merge remote branch 'origin/devel-2.1'
Implement QA tests for disk template changes
The new test depends on the drbd type tests being enabled, and testconversion to plain and back to drbd.
Add command line options for instance removal on export
Implement instance rename QA tests
Fix QA and documentation about no initrd case
In Ganeti 1.2, “none” was used to signify no initrd. In 2.0 we havechanged to “no_” as a prefix (i.e. “-H no_initrd_path”) and thus wedocument in the manpage this.
The QA suite is changed accordingly.
Signed-off-by: Iustin Pop <iustin@google.com>...
Update QA scripts to new cluster parameters
There are still issues, especially with "gnt-instance modify" andresetting values. However, this is a start.
Reviewed-by: ultrotter
Remove QA hook functionality
To my knowledge they're used nowhere and it's at least slightlyconfusing to people adding new QA checks.
Forward-port: Fix two problems in QA scripts
- Failover back to original node in instance failure test- Exclude secondary node from list of potential nodes in replace-disks test
Reviewed-by: iustinp
Forward-port: Add QA tests for “gnt-instance reboot”
Forward-port: Add QA test for “gnt-instance replace-disks”
Add QA test for “gnt-instance console”
Remove the option to create md/drbd7 instances
This patch removes the options that allow to create local_raid1 orremote_raid1 instances. It also modifies the documentation and removesthese disk templates from burnin and from qa.
Reviewed-by: imsnah
Some changes on disk failure tests
Change comments to printed information, some cleanup. These changesare from November 2007. The test is not perfect yet.
Code style updates for QA code.
Add QA tests for gnt-instance modify
This patch adds QA tests for most of the possible parameters in theinstance modify operation (exception being the MAC), and modifies thesample QA file to run this test.
It also tests the no-modification test, but that is a weak one: we only...
Remove qa tests for gnt-instance start/stop
Those tests were added in the wrong place. This patch removes them. One daywe'll implement proper command line regression testing and they should go inthere.
Test start/stop aliases in qa
This tests both that those two aliases have not been removed and also thataliases handling hasn't been broken.
Various code style fixes for strings.
- When line wrapping is needed, move spaces to the next line.- Remove embedded line breaks from error messages.
Reviewed-by: schreiberal
Add basic QA tests for DRBD 8.
Fix --node option for “gnt-backup list”.
Insert hook calls.
Adapt QA tests for removed --secondary-node option.
Cleanup colouring functions.
Make the code somewhat smaller. Disable disk failure test for master for now.
Cleanup QA scripts.
- Split main() function into several small ones.- Current work on disk failure tests. This is not yet finished.- Fix small typo in qa_node.py.
Implement disk failure QA test.
Testing failure on the primary node is currently disabled due to drbd problems.
Add more QA tests.
Added tests:- “gnt-cluster getmaster”- “gnt-cluster version”- “gnt-instance list”- “gnt-instance reinstall”
Enhance QA.
- Test “gnt-backup export” and “gnt-backup import”.- Move “ResolveInstanceName” to qa_utils.py.- Fix tests for “ganeti-watcher”.- Make instance shutdown and startup configurable.
Split QA script into different modules.