Commit Graph

20 Commits

Author SHA1 Message Date
Loic Dachary
7f6295d21f ceph-disk: make all must setup.py install
Refactor the test / virtualenv setup in the same way it was done for
ceph-detect-init.

All shell tests use ceph-helpers.sh which is modified to add ceph-disk /
ceph-detect-init virtualenv/bin to the PATH to ensure the source version
is used even if ceph is installed.

See "ceph-detect-init: make all must setup.py install"

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-02-04 14:38:08 +07:00
Ved-vampir
300c2f773b Compressor: compressor plugins unit tests
Signed-off-by: Alyona Kiseleva <akiselyova@mirantis.com>
2016-01-14 19:04:19 -05:00
Sage Weil
3aa9eb3518 Merge pull request #6900 from liewegas/wip-13988
mon: fix reuse of osd ids (clear osd info on osd deletion)

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-12-18 15:07:49 -05:00
Loic Dachary
c6cdc33432 tests: verify it is possible to reuse an OSD id
When an OSD id is removed via ceph osd rm, it will be reused by the next
ceph osd create command. Verify that and OSD reusing such an id
successfully comes up.

http://tracker.ceph.com/issues/13988 Refs: #13988

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-12-10 20:46:23 +01:00
Loic Dachary
5876829dc7 tests: kill_daemons uses TERM instead of KILL
When called to teardown a test, kill_daemon should use KILL to ensure
all leftovers are removed as quickly as possible to leave a clean state
for the next test. However, when kill_daemons is called to shutdown a
given daemon from within a test, it should use TERM by default so the
daemon has time to notify the MON that it goes down. For instance, if
KILLing an OSD, the mon will still report it as being up although the
calling function probably expects that it will be marked out.

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-12-10 17:34:32 +01:00
Loic Dachary
99bcc7cf16 tests: --osd-scrub-load-threshold=2000 for more consistency
In a test environment, consistency is more important than
performances. Effectively disable the test that would postpone a scrub
depending on the load average. It is assumed that a machine with a load
average higher than 2000 won't be useable anyway.

http://tracker.ceph.com/issues/14027 Refs: #14027

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-12-09 11:48:45 +01:00
Xinze Chi
ce2d3c73ba test: add pg_scrub for ceph-helpers.sh
Signed-off-by: Xinze Chi <xinze@xsky.com>
2015-12-01 11:10:10 +08:00
Loic Dachary
f79e28902f tests: fix race condition testing auto scrub
When testing auto scrub, waiting 20 seconds for the scrub to complete is
sometimes not enough and creates false negatives.

Split wait_for_scrub out of the repair helper so that it can be used to
wait for the scrub to happen instead of using a timer.

The scrub timestamp is obtained after removing the object, therefore
there is a chance for the scrub to be finished already. But since auto
scrub is scheduled every 5 seconds, it will only make the test wait an
extra 5 seconds and not hang forever.

http://tracker.ceph.com/issues/13592

Signed-off-by: Xinze Chi <xinze@xsky.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2015-11-29 12:17:16 +01:00
Loic Dachary
15b2aca3cd tests: ceph-helpers assert success getting backfills
Signed-off-by: Loic Dachary <loic@dachary.org>
2015-11-25 12:23:45 +01:00
Loic Dachary
f14144441b tests: port uniqueness reminder
When copy/pasting a tests, it is easy to forget (or not know) that the
port used must be unique to allow for multiple tests to run in
parallel (make -j8). Add a reminder next to each port.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-10-27 17:38:17 +09:00
Sage Weil
660ae5bcbb osd: always load erasure plugins from the configured directory
Ignore the profile 'directory' field.

This ensures that we can always find plugins even when teh cluster
is installed across a mix of distros.

Rename the option to have no osd_ (or mon_) prefix since anybody
may use the ec factory/plugin code.

We still hard-code .libs in the unit tests... sigh.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-21 16:03:30 -04:00
David Zafman
2869a8367a Merge pull request #5189 from athanatos/wip-recovery-defaults
config_opts: turn down default recovery tunables

Reviewed-by: David Zafman <dzafman@redhat.com>
2015-07-23 11:47:37 -07:00
Samuel Just
cd2d7d086f ceph-helpers.sh: don't test the osd_max_backfills value
This isn't a very meaningful assert since the default could
easily change.

Signed-off-by: Samuel Just <sjust@redhat.com>
2015-07-23 10:41:45 -07:00
Loic Dachary
96ec2a7444 tests: ceph-helpers.sh get_osds with no trailing whitespace
Trim the trailing whitespace of the get_osds output to help with
comparisons.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-07-08 16:14:23 +02:00
Loic Dachary
d791a722a7 tests: improve shell output readability
Modify the test traces to include the file name in addition to the
function and line name. It makes it easier to locate the faulty line
without going back to the test name.

Format the trace lines to be emacs friendly (filename:lineno) so that
C-x ` or C-c C-c jumps to the right file and the right line when running
the test with M-x compile.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-07-08 16:14:01 +02:00
Loic Dachary
aefcf6d385 tests: ceph-helpers.sh reduce kill_daemon verbosity
When a test fails, the script returns immediately and kill_daemon
function is called to cleanup. It is quite verbose and requires
scrolling hundreds of lines back to find the actual error
message. Turn off the shell trace to reduce the verbosity and improve
error output readability.

The kill_daemon cannot just turn off set -x because it may be called by
a test, not just at the end of the run. Instead the kill_daemon function
checks if tracing is activated and temporarily disables it.

Also get rid of the find standard error that commonly happens when
kill_daemon is called to verify there are no leftovers and the test
directory does not exist.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-07-08 13:58:10 +02:00
Sebastien Ponce
2409a90dcc tests: fixed environment for osd-class-dir
osd-class-dir was not set when activating osds in the test environment leading to failures with 'operation not supported' message when trying to lock objects

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
2015-06-23 13:04:21 +02:00
Loic Dachary
deb651b61c tests: implement erasure_code_plugin_exists in ceph-helpers.sh
Return 0 if the erasure code *plugin* is available, 1 otherwise.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-07 10:51:07 +02:00
Loic Dachary
64944d4105 tests: ceph-helpers.sh use expr instead of (( ))
Because (( timer++ )) is mistaken by set -e to not be a successful
command, use expr instead.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-31 18:33:20 +02:00
Loic Dachary
d2172b0e89 tests: move ceph-helpers.sh to qa/workunits
So that it can be used by scripts in qa/workunits that need it.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-31 18:33:17 +02:00