History | View | Annotate | Download (22.2 kB)
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>
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...
Switch job IDs to numeric
This has been a long-standing cleanup item, which we've alwaysrefrained from doing due to the high estimated effort needed.
In reality, it turned out that after some infrastructure improvements(the previous patches), the actual job queue-related changes are quite...
QA: Fix modification of HV parameters via RAPI
This is basically another case of commit d488adb.
QA: Add configuration options for static MAC address
In some QA environments static MAC addresses must be used.
QA: Ignore tags using regular expression
In some QA environments external scripts may add tags. With this patch aregular expression can be used to ignore them during QA runs.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
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...
Fix RAPI QA with exports via query2
Fix further QA failures due to query changes
Hopefully these will be the last ones…
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@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: 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>
Fix wrong headers and licences
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Stephen Shirley <diamond@google.com>
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.
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.
QA: Add tests for node group tags
Fix QA breakage caused by 3fd7f6524
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”
TestRapiInstanceRename use instance name
Currently the QA rename job wrongly passed the whole info dict to theclient.
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
Rename OpPrepareExport and LUPrepareExport
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@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:...
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>...
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>
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>
QA RAPI: Test HTTP 404 and 501
This tests the HTTP Not Found and Not Implemented errors.
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....
RAPI QA: Override MAC address when moving instance
This will make this test work again.
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.
RAPI client: Support modifying instances
QA: Test renaming instance via RAPI
QA: Test instance migration via CLI and RAPI
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>
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_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....
QA: Test instance creation/deletion via RAPI client
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
RAPI QA: Use RAPI client
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: Make the rapi credential handling less involving
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Adding QA RAPI tests for activate-disks and deactivate-disks calls
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Fix RAPI QA, broken by NIC parameters changes
This also adds the new nic.links query field.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Move rapi to GetDaemonPort
Currently rapi is the only daemon which accepts a port option, ratherthan querying its own port from services, and failing back to thedefault if not found. Changing this to conform to what other daemons do.
Also update the ganeti-rapi(8) manpage...
Get rid of constants.RAPI_ENABLE
This constant is unused, except in qa. Removing it since it's always True.
This patch also removes the unused qa_rapi.PrintRemoteAPIWarningfunction, and removes a comment about temporary constants "until we havecluster parameters"....
Fix one more RAPI QA test
This was skipped in the previous QA patch.
Reviewed-by: imsnah
QA: switch RAPI to https
Since we by default now use SSL for RAPI, we need to switch the QAtests to SSL too.
Reviewed-by: amishchenko
Revive RAPI QA tests for 2.0-style RAPI
This patch fixes the RAPI QA tests to work with today's RAPI code andalso does some other minor improvements: - QA: only create the cluster if so configured (‘create-cluster’ key), this allows running parts of the QA suite against existing clusters...
Whitespace fixes for remote API QA checks
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.
Migrate RAPI QA to trunk.