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.
Signed-off-by: Adeodato Simo <dato@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
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
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
Signed-off-by: Adeodato Simo <dato@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
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 :(
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
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
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
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.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
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.
QA: fix reimporting instance with different name
Since the original instance still exists, we need to use a different MACfor its NIC.
QA: Make the rapi credential handling less involving
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Merge remote branch 'devel-2.1'
QA: Make sure RAPI credentials are setup on cluster init
This patch makes sure that the Ganeti RAPI credentials are setup,if any, on cluster init time.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Adding QA RAPI tests for activate-disks and deactivate-disks calls
Add cluster domain secret
Information exchanged between different clusters via untrustedthird parties (e.g. for remote instance import/export) must besigned with a secret shared between all involved clusters toensure the third party doesn't modify the information....
Merge remote branch 'origin/devel-2.1'
Conflicts: lib/bootstrap.py: Trivial lib/constants.py: Trivial
Rightname confd's HMAC key
Currently, the ganeti-confd's HMAC key is called “cluster HMAC key” orsimply “HMAC key” everywhere. With the implementation of inter-clusterinstance moves, another HMAC key will be introduced for signing criticaldata. They can not be the same, so this patch clarifies the purpose of the...
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.
Implement replacing cluster certs and keys via “gnt-cluster renew-crypto”
Recent changes to “gnt-cluster verify” made it complain on expiring SSLcertificates. While it was possible to replace the SSL certificates andother cluster secrets manually before, doing so was cumbersome. Cluster...
Adding qa tests for gnt-os modify
This adds basic qa tests for gnt-os modify
Add command line options for instance removal on export
Implement instance rename QA tests
QA: improve usability with cluster-init: False
When not initialising the cluster, consider all nodes are added, so thatmulti-node tests (e.g. export, replace) work correctly (if there arenodes, of course).
Add QA test for “gnt-node {list,modify,repair}-storage”
Replace all xrange() with range()