History | View | Annotate | Download (17.3 kB)
QA: Factorize retrieving non-existent groups from config
Also add a check to make sure there are enough groups defined.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Remove some unused Python code
This patch removes code which is no longer used due to refactoring:
- http.InitSsl, last usage removed in commit 33231500 (“Convert RPC client to PycURL”)- rapi.baserlib.MakeParamsDict, last usage remove in commit 4e5a68f8...
Fixes and improvements to comments
Some fixes, added more information in a few points, removed a stale (5+year old) TODO comment.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
qa_utils: Stop hardcoding path to /etc/hosts
- Simplified shell command for adding hosts, too- The exception handling is also improved by re-raising any exceptions instead of swallowing qa_error.Error
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
QA: stop logging SSH arguments for each invocation
Currently, this is how the QA log looks like:
Command: ssh -oEscapeChar=none -oBatchMode=yes -l root -t -oStrictHostKeyChecking=yes -oClearAllForwardings=yes -oForwardAgent=yes -oControlPath=/tmp/ganeti-qa-multiplexer.DMzkuH -oControlMaster=no node14 exit...
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: 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.
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 QA failures with "gnt-job list"
Jobs have no “name” field.
Fix wrong option names in QA and cluster-merge
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.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
QA: Add utility to ensure item is not in sequence
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...
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....
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...
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>...
Fix QA for “list-fields” commands
The list of fields is not only sorted, but sorted in a nice way.
QA: Allow upload of string data
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
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 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)...
Change qa_utils.ResolveInstanceName to take name
… instead of an object. Allows it to be used in places whereonly the name is available.
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.
QA: Add function create temporary backup file
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>
QA: Remove dry run mode
It didn't work as planned because some commands depend on the returnvalue or output of some operations.
Reviewed-by: iustinp
QA: Use pseudo-tty via SSH
This gives continous output instead it being buffered.
Reviewed-by: ultrotter
Copy qa_utils.AssertIn from 1.2 branch
Apparently it was forgotten when import the remote API QA tests.
Reviewed-by: schreiberal
Remove QA hook functionality
To my knowledge they're used nowhere and it's at least slightlyconfusing to people adding new QA checks.
Code style updates for QA code.
Add comment about PEP 318 to qa_utils.py.
List loading hooks in QA.
Implement hooks infrastructure.
Cleanup colouring functions.
Make the code somewhat smaller. Disable disk failure test for master for now.
Implement disk failure QA test.
Testing failure on the primary node is currently disabled due to drbd problems.
Don't take unused parameter in qa_utils.py:Print{Info,Error}.
Test “gnt-node evacuate” and “gnt-node failover” in QA.
Colours and warnings.
- Implement colours in qa_utils.- Print warning for cron script.
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.