QA: replace ping with fping
This allows a lot of simplification in the TestIcmpPing, as fping cantake multiple arguments so we don't need anymore to create manycommands joined with &&.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
QA: also run gnt-cluster verify-disks
The bug recently reported by Apollon Oikonomopoulos was missed becausewe don't test this command at all.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Rename OpPrepareExport and LUPrepareExport
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>
Fix docstring for "cmd" in qa_utils.GetSSHCommand
Docstring indicated "cmd" should be a list, when it's expected thatit'll be a string.
Also, converted docstring to current epydoc-style list of functionarguments.
Signed-off-by: Adeodato Simo <dato@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>
QA: Remove 'oob_program=default' on gnt-cluster modify
On cluster level there's no 'default' because it's the highest cascadinglevel. Due to this 'default' is a valid value and doesn't mean to removethe value from the dict like it does on the other levels. To overcome...
QA: Adding new cluster verify cases
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
QA: Fix out-of-band tests
- Handle situations with no non-master node- Expand node name to make test work when configuration just has short names (e.g. “node1” instead of “node1.example.com”)
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Fix QA for “list-fields” commands
The list of fields is not only sorted, but sorted in a nice way.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
ganeti-qa: Wrap lines longer than 80 chars
Adapt QA for change in behaviour
As we can't test this on master anymore (if we flag the node offline wewould change master role on master) we use the first non master node wefind in the configuration
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
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: Allow upload of string data
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...
Add the "alloc_policy" attribute to node groups
This can be set at group creation time and via OpSetGroupParams. The defaultis "preferred", and existing node groups from previous Ganeti version willget the attribute set to this value.
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...
Introduce constant for the name of the initial node group
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...
Make rpc.call_lv_list() VG-aware
Changes to backend.GetVolumeList():- now accepts a list of VGs instead of one VG- returns LV names in the form "vg_name/lv_name"
Corresponding changes are done in: VerifyDisks, VerifyNode,LUCreateInstance (for both disk creation and adoption cases)...
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...
QA: Fix upload of RAPI users file
After moving the users file to a directory, we must ensure thedirectory exists.
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: check that doubly modifying an OS state is OK
This would have prevented the bug fixed in the previous patch :(
Merge branch 'devel-2.2' into devel-2.3
Conflicts: lib/cmdlib.py (reverted & applied manually the change)
Signed-off-by: Iustin Pop <iustin@google.com>...
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>
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.
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 RAPI: Test HTTP 404 and 501
This tests the HTTP Not Found and Not Implemented errors.
QA: Add test for “gnt-node modify”
Brown-bag fix for leftover comment
I did forgot this in the original patch. Sorry!!!!
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
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:...
Merge branch 'devel-2.2'
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...
Merge branch 'devel-2.2' into master
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....
RAPI QA: Override MAC address when moving instance
This will make this test work again.
QA: Enable all tests by default
This patch enables all tests by default, unless when they'reexplicitely disabled in the config file. This will make surenewly added tests are run even when an old configuration fileis used.
A comment is also added qa-sample.json....
qa_config: Use ganeti.serializer for loading config
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
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: Test more tag operations via RAPI
This ensures tag operations work via RAPI. Also print requested URI tostdout for debugging.
qa_rapi: Fix indentation error
If no function to verify the result was specified, qa_rapi._DoTestswouldn't return the result.
Revert "Don't provide --no-ssh-key-check for QA"
This reverts commit dc092ece1bd07e9fa6ed97de8b4a3f360b26725e.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Don't provide --no-ssh-key-check for QA
My last setup-ssh patch series removed this option. Though, this isjust a temporary fix as a patch series is coming which revert thatbehaviour to the old state
QA: Run simple job queue test
Support for IPv6 QA
Signed-off-by: Manuel Franceschini <livewire@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
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
Rename masterfailover to master-failover
Most (all?) of our commands use dash-separator: replace-disks,verify-disks, add-tags, etc. “gnt-cluster masterfailover” is an oldexception to this rule.
The patch replaces it with master-failover, add a compatiblity alias,...
QA: add tests for the reserved lvs feature
Use reserved documentation IPs and domains
Use RFC 5737 IP addresses and RFC 2606 domain names in allunittests, docs, qa and docstrings.
Add oper_vcpus instance status field
This introduces a new instance status field, named "oper_vcpus".It contains the actual number of VCPUs an instance is using asseen by the hypervisor.
Signed-off-by: Balazs Lecz <leczb@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
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....
Add a QA option to disable reboots during burnin
Since we have seen cases where (repeated) reboots are not supported(e.g. Xen 3.4+), we need to be able to control this in the QAconfiguration.
Merge branch 'stable-2.1'
Remove rapi-user and rapi-pass from qa-sample.json
After commit 725ec2f10019c35bafeb1aabfce6f14174bf4f46 they are unused.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
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: fix gnt-instance modify -t drbd
We need to pass the secondary node name, not a dict, which is an invalidvalue.
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>
Update a comment in qa-sample.json
Fix the sentence to say what it means.
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.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
RAPI changes for instance moves
Two new resources are added:- /2/instances/$name/prepare-export- /2/instances/$name/export
The documentation for the existing resource for creating instances is updatedfor remote imports. The RAPI client is extended for the new resources....
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>
QA: Test instance creation/deletion via RAPI client
RAPI QA: Use RAPI client
QA: Add function create temporary backup file
QA: Restore RAPI cert after “gnt-cluster renew-crypto”
The RAPI tests will depend on the certificate.
RAPI QA: Test instance creation/removal via RAPI
RAPI QA: Support for request body
- Add support for sending JSON-encoded body to RAPI daemon (required to test more complex resources)- Expand names when testing resources against config
qa: enable early release during parallel burnin
With this, the burnin sequence on big clusters should be (much?) faster.The patch also fixes the parallel setting (before it was alwaysenabled).
Conflicts: lib/utils.py: Trivial
qa: Use qa_utils.UploadFile to upload rapi_users file
Just using “echo” would use whatever umask is set in the shell,in addition to potentially showing the password in the processlist.