Commit Graph

19 Commits

Author SHA1 Message Date
Sridhar Seshasayee
328271d587 qa/tasks: Enhance wait_until_true() to check & retry recovery progress
With mclock scheduler enabled, the recovery throughput is throttled based
on factors like the type of mclock profile enabled, the OSD capacity among
others. Due to this the recovery times may vary and therefore the existing
timeout of 120 secs may not be sufficient.

To address the above, a new method called _is_inprogress_or_complete() is
introduced in the TestProgress Class that checks if the event with the
specified 'id' is in progress by checking the 'progress' key of the
progress command response. This method also handles the corner case where
the event completes just before it's called.

The existing wait_until_true() method in the CephTestCase Class is
modified to accept another function argument called "check_fn". This is
set to the _is_inprogress_or_complete() function described earlier in the
"test_turn_off_module" test that has been observed to fail due to the
reasons already described above. A retry mechanism of a maximum of 5
attempts is introduced after the first timeout is hit. This means that
the wait can extend up to a maximum of 600 secs (120 secs * 5) as long as
there is recovery progress reported by the 'ceph progress' command result.

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
2021-06-02 14:19:48 +05:30
Patrick Donnelly
42270a5338
Merge PR #38443 into master
* refs/pull/38443/head:
	qa: set "shell" to False for run_ceph_w()
	vstart_runner: make "shell" a default argument

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
2021-03-22 20:00:46 -07:00
Rishabh Dave
df88ec3822 qa: set "shell" to False for run_ceph_w()
Setting shell to True in call to run() in LocalCephManager.run_ceph_w()
leads to a crash when self.subproc.communicate() is executed for the
process created by running "ceph -w".

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-03-12 09:03:13 +05:30
Sebastian Wagner
340281fe76 qa/tasks: some type annotations
Mostly for making my IDE aware of things

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2021-03-10 15:02:41 +01:00
Venky Shankar
8334bea5a6 test: optionally create a backup filesystem on startup
Also filter out client-id's starting with "mirror" when
cleaning leftover auth-ids since teuthology would be
configured to create client.mirror and client.mirror_remote
clients before executing mirroring tests.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
2021-01-19 01:08:10 -05:00
Tiago Melo
a7ca0631d6 qa/mgr: Remove _wait_for_expected_get_result
Fixes: https://tracker.ceph.com/issues/47793

Signed-off-by: Tiago Melo <tmelo@suse.com>
2020-10-08 15:58:06 +00:00
Patrick Donnelly
dbc44e5e34
qa: add exception for test timeouts
To make this easier to catch. It is still a RuntimeError so it should
not affect current tests by default.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-08-06 11:21:54 -07:00
Patrick Donnelly
8729281121
qa: manage config changes through mons
This provides a generic framework for modifying Ceph configuration
changes in tests through the monitors rather than the asok interface or
local ceph.conf changes. Any changes are reverted during test teardown.

A future patch will convert existing tests manipulating the local
ceph.conf or admin socket.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-02-13 07:51:09 -08:00
Patrick Donnelly
4ef0310742
qa: note timeout in debug message
Some tests set this to a dynamic value, it'd be helpful to know how long
a test is planning to wait.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-16 15:59:25 -08:00
Kyr Shatskyy
50b1823fac qa: get rid of iteritems for python3 compatibility
Fixes: https://tracker.ceph.com/issues/42267
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2019-10-15 11:27:39 +02:00
Patrick Donnelly
1071f73c76
qa: use skipTest method instead of exception
This is the recommended method to skip a test according to [1]. It also lets us
avoid an unnecessary import.

[1] https://docs.python.org/2/library/unittest.html#unittest.TestCase.skipTest

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-04-24 09:38:52 -07:00
Volker Theile
b9177e43c0 mgr/dashboard: Add UI to configure the telemetry mgr plugin
Fixes: tracker.ceph.com/issues/36488

Signed-off-by: Volker Theile <vtheile@suse.com>
2019-02-12 16:36:56 +01:00
John Spray
e5fb5a1ddd qa: generalise REQUIRE_MEMSTORE
Move it up into CephTestCase so that mgr tests can
use it too, and pick it up in vstart_runner.py so
that these tests will work neatly there.

Signed-off-by: John Spray <john.spray@redhat.com>
2018-12-18 13:30:54 -06:00
Volker Theile
95746ecce9 mgr: Add ability to trigger a cluster/audit log message from Python
Fixes: https://tracker.ceph.com/issues/36194

Signed-off-by: Volker Theile <vtheile@suse.com>
2018-10-04 13:33:18 +02:00
Ricardo Dias
86264d4b02
qa/tasks/mgr: move test initialization to setUpClass method
With this change, we avoid the disabling/enabling of the ceph-mgr module
being tested for each test function declared in each test case. Now
the ceph-mgr module being tested is disabled/enabled only once for each
test case.

Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:18 +00:00
Douglas Fuller
c85562c94a qa/ceph_test_case: support CephFS recovery pools
Add support for testing recovery of CephFS metadata into an alternate
RADOS pool, useful as a disaster recovery mechanism that avoids
modifying the metadata in-place.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-08-30 09:02:44 -04:00
John Spray
0613d411aa qa: update wait_for_health for new health json syntax
Fixes: http://tracker.ceph.com/issues/20890
Signed-off-by: John Spray <john.spray@redhat.com>
2017-08-03 23:46:41 +01:00
Sage Weil
25717f7e84 qa/tasks/ceph_test_case.py: update health check helpers
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-12 12:52:03 -04:00
Sage Weil
c01f2ee0e2 move ceph-qa-suite dirs into qa/ 2016-12-14 11:29:55 -06:00