Switch QA to tty-less mode
This makes ssh generate much less noise when QA is run itself withouta tty, as otherwise we get thousands of lines of:
Pseudo-terminal will not be allocated because stdin is not a terminal.
in the QA logs (which are already big enough)....
qa_utils: Factorize code for getting entity name
This reduces code duplication and provides better error messages ifsomething is incorrect while getting a node or instance name.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
qa_utils: Accept string as instance for check
Some tests don't have access to an instance dictionary.
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...
QA: Infrastructure for hook script to check instance status
This script can be used to check if an instance is running or stopped atvarious points during a QA run. Environment variables are used to passthe most essential information.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
QA: Support passing keyword arguments to test functions
Until now this wasn't possible.
Add missing qa/__init__.py file
The file was there and listed in Makefile.am, but I forgot to add it tocommit a0c3e7264a.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
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.
QA: Enable use of OR conditions in test checks
Until now “TestRunIf” and “TestEnabled” could only handle AND. With thispatch a new class named “Either” is added to “qa_config” and allows OR.The name “Either” was chosen instead of “Or” as the latter is very close...
Add grow-disk tests in QA
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
QA: Add default setting for tests
Commit 1010ec70b1 enabled all tests by default. In some scenarios wherethe configuration is static one may not want newly added tests to berun.
Fix RAPI QA with exports via query2
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...
Fix further QA failures due to query changes
Hopefully these will be the last ones…
Fix QA failures with "gnt-job list"
Jobs have no “name” field.
Merge branch 'devel-2.5'
QA: Add tests for “gnt-job list”
EPO: Pass the no_remember parameter to preserve state
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
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...
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>...
Fix wrong option names in QA and cluster-merge
qa: perform burnin with max/min mem from config
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-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-sample.json: Fix a typo
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
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>
QA: Make the ispec values configurable
QA: init cluster changes ispecs
Signed-off-by: Agata Murawska <agatamurawska@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
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: add gnt-cluster tests related to disk params
qa: use maximum and minimum memory
test modification of either parameter, but also both at once.
Add QA test for “gnt-debug delay”
This would have caught a bug introduced with the recent RPC changes.
QA: Add test for setting node's secondary IP address
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Andrea Spadaccini <spadaccio@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.
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)....
Remove WATCHER_STATEFILE constant
ganeti-watcher: Split for node groups
This patch brings a huge change to ganeti-watcher to make it aware ofnode groups. Each node group is processed in its own subprocess,reducing the impact of long-running operations.
The global watcher state file, $datadir/ganeti/watcher.data, is replaced...
Add new watcher constants
WATCHER_STATEFILE will be removed at the end of thispatch series.
Merge branch 'devel-2.4'
Add support for cluster/OS parameters in QA
Currently there is no way to QA with (for example) an initrd becausethe QA only inits the cluster with the default parameters. This makesit impossible to QA using anything but the default parameters, whichdoesn't always work....
Add a QA constant for cluster verify command
This seems to be used and reused multiple times, let's abstract it…
Fix QA OS API failure
The patch changing the OS api in QA to 20 was not complete, sorry.
QA: test using OS API v20
v20 is (mostly) a superset of the other versions, so testing with itshould be better than with V10. This detects properly the breakagefixed by the previous patch.
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
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>
gnt-instance migrate: Adding --allow-failover option
Fix QA breakage caused by 3fd7f6524
QA: Add tests for queries via RAPI
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...
QA: Improve tests for gnt-os
- Test OS lists via command line and RAPI- Test “gnt-os diagnose” and “gnt-os info”
QA: Add utility to ensure item is not in sequence
QA: Rename OS state test for clarification
Also add an additional check to ensure the OS does not exist.
QA: Use constants instead of hardcoded numbers
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-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
gnt-instance reboot start instance if not yet started
This patch starts the instance when gnt-instance reboot is invoked on ainstance already stopped.
Introducing gnt-cluster epo
This is a convenience command to do an automated EPO in the possible limits ofGaneti.
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>...
Remove force_master support from LUOobCommand
As per discussion on the man-page1 update, this functionality should beremoved and replaced by just give the command to run if the user insistsof power cycle/power off the master and refuse to operate.
[1] http://groups.google.com/group/ganeti-devel/browse_thread/thread/95d4879a747cc295...
Modify gnt-node power to support multiple nodes
This also has the sideeffect of presenting a table with the result
Make it possible to disable tty in qa_utils.GetCommandOutput
The tty can have strange side effect as it seems to replace \n with\r\n. In case of simply catting a file and compare it's output thiswill break. This patch adds the possibility to disable tty if needed....
Adding support for the new option flags in gnt-node power
Adding gnt-node health
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.
Merge branch 'devel-2.3' into devel-2.4
Fix bug in “gnt-node list-storage”
LVM PV storage units would always show as allocatable, even when theyweren't. For some reason I have not been able to determine, the functionparsing the attributes (“_GetAllocatable”) was not even called and thelist opcode simply returned the attribute string as the value (e.g....
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 &&.
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
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”)
Fix QA for “list-fields” commands
The list of fields is not only sorted, but sorted in a nice way.
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
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