Commit Graph

1245 Commits

Author SHA1 Message Date
Ali Maredia
59568e59ed cmake: encode-decode-non-regression.sh passing in cmake
Replaced relative paths in encode-decode-non-regression.sh
to work with CEPH_FOO environment variables set in
cmake.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-04-14 20:48:19 -04:00
Ali Maredia
e0f400fdef cmake: test-ceph-helpers working
Moved all the libraries in CMAKE_BINARY_DIR/lib
and all the binaries in CMAKE_BINARY_DIR/bin. Set
various environment variables for test-ceph-helpers.
Put those variables throughout
qa/workunits/ceph-helpers.sh.

NOTE: This is a very rough draft of these fixes.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-04-14 20:48:19 -04:00
Josh Durgin
6956da8c0c Merge pull request #8511 from dillaman/wip-15436
librbd: IO deadlock when dynamically enabling/disabling features

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-04-14 08:58:57 -07:00
Jason Dillaman
a33ee34fcf qa/workunits/rbd: switch qemu test script shell to bash
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-04-09 12:59:00 -04:00
Greg Farnum
f6209798f8 Merge remote-tracking branch 'github/wip-fs-lockouts' into greg-fs-testing
Protect a number of unstable/experimental features behind durable flags

https://github.com/ceph/ceph/pull/8383

Reviewed-by: John Spray <john.spray@redhat.com>
2016-04-07 17:07:16 -07:00
Greg Farnum
ea1b276e7e test: update tests for new flag requirements
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2016-04-07 16:40:23 -07:00
Sage Weil
82e9f94523 Merge pull request #8428 from liewegas/wip-rest-mds
ceph-rest-api: fix fs/flag/set
2016-04-06 16:10:53 -04:00
Erwan Velu
c5fa83f586 tests: Avoiding a fixed 10sec sleep in test_mon_cephdf_commands()
The current code was waiting 10s to expect the file being put.
If the file was put in a shorter time than 10s, the test just waits for
nothing reducing the execution speed of that test.

This patch simply check if the file is actually available every second
during 10sec to exit prematurely.

This patch saves exactly 10 sec on a local system, surely a little bit
less on an infra but still saves time.
Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
62bdde2cd2 tests: Optmizing sleep sequence in cephtool/test.sh
The actual code double the wait time between two calls leading to a
possible 511s of waiting time which sounds a little bit excessive.

This patch offer to reduce the global wait time to 300s and test more
often the rados status to exit the loop earlier. In a local test, that
saves 6 secs per run.
Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
8a49a86901 tests: Moving sleep call after action in ceph_watch_wait()
ceph_watch_wait() is doing a sleep _before_ doing the test which could
stop this loop.

It's better doing the action first as it could exit immediately and
avoid a useless sleep.

That's a minor optimization but everything count when trying to get
something smooth.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
0d254d8916 tests: Reducing sleep time for osd to be up
OSDs are taking some time to be up but waiting 10 secs seems execessive
here between two loops. In the worst case, we can be in a situation of
waiting 10secs for nothing as we are just a few microsecs after the osd
is up.

This patch simply reduce the sleep from 10 to 1 seconds.
Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
0eea2436d9 tests: Optimizing kill_daemons() sleep time
It could sounds like nothing but the actual sleeping rampup is counter
productive.

The code does : kill <proc>; sleep 0; kill <proc>; sleep 0; kill <proc;
sleep 1; and then it grows up 120 seconds by a smooth rampup.

But actually there is almost no chance the process dies so fast meaning
that by default we switch to the sleep 1.

Moving from sleep 0 to sleep 1 doesn't seems a big win but as
kill_daemons() is called very often we can save a lot of time by then
end.

This patch offer to sleep first a 1/10th of second instead of 0 and then
1/20th of second instead of 0.

The sleep call is also moved after the kill call as it's not necessary
waiting before executing the command.

This patch makes the running time of a test like osd-scrub-repair.sh
dropping from 7m30 to 7m7.

Saving another ~30seconds is an interesting win at make check level.
Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
84197f1641 tests: Optimizing wait_for_clean()
wait_for_clean() is a very common call when running the make check.
It does wait the cluster to be stable before continuing.

This script was doing the same calls twice and could be optimized by
making the useful calls only once.

is_clean() function was checking num_pgs & get_num_active_clean()
The main loop itself was also calling get_num_active_clean()

This patch is inlining the is_clean() inside this loop to benefit from a
single get_num_active_clean() call. This avoid a useless call of (ceph +
xmlstarlet).

This patch does move all the 'timer reset' conditions into an else
avoiding spawning other ceph+xmlstarlet call while we already know we
should reset the timer.

The last modification is to reduce the sleeping time as the state of the
cluster is changing very fast.

This whole patch could looks like almost not a big win but for a test
like test/osd/osd-scrub-repair.sh, we drop from 9m56 to 9m30 while
reducing the number system calls.

At the scale of make check, that's a lot of saving.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
b3f7392d9d tests: Reducing commands in get_num_active_clean()
get_num_active_clean() is called very often but spawn 1 useless process.
The current "grep -v | wc -l" can be easily replaced by "grep -cv" which
do the same while spawning one process less.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
d8f07c3ff6 tests: Killing daemons in parallel
The current code of kill_daemons() was killing daemons one after the
other and wait it to actually die before switching to the next one.

This patch makes the kill_daemons() loop being run in parallel to avoid
this bottleneck.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
db31cc6cbc tests: Adding parallelism helpers in ceph-helpers.sh
This commit introduce two new functions in ceph-helpers.sh to ease
parallelism in tests.

It's based on two functions : run_in_background() & wait_background()

The first one allow you to spawn processes or functions in background and saves
the associated pid in a variable passed as first argument.

The second one waits for thoses pids to complete and report their exit status.
If one or more failed then wait_background() reports a failure.

A typical usage looks like :

 pids1=""
 run_in_background pids1 bash -c 'sleep 5; exit 0'
 run_in_background pids1 bash -c 'sleep 1; exit 1'
 run_in_background pids1 my_bash_function
 wait_background pids1

The variable that contains pids is local making possible to do nested calls of
thoses two new functions.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
f47e06b907 tests: Fixing broken test/cephtool-test-mon.sh test
Since the merge of pr #7693, 'ceph command' to get the help is invalid.
As a result, 'test/cephtool-test-mon.sh' test was broken

This patch simply change the 'ceph command' by a 'ceph --help command'

Since this change the test is passing again.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-04 16:58:58 +02:00
Sage Weil
77aee99835 Merge pull request #8393 from jcsp/wip-15309-2
qa: update rest test cephfs calls (part 2)

Reviewed-by: Sage Weil <sage@redhat.com>
2016-04-04 09:42:57 -04:00
Sage Weil
1de73d7ec8 qa/workunits/rest/test.py: fs flag set enable_multiple true
This lets us run against a vstart cluster.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-04 09:39:03 -04:00
Jason Dillaman
f812199f72 qa/workunits/rbd: qemu tests need to wait for image to be created
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-04-03 10:29:38 -04:00
Josh Durgin
c9ca7692e4 Merge pull request #8325 from trociny/wip-rbd-mirror-test-misc
test: rbd-mirror: script improvements for manual testing

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-04-01 09:55:20 -07:00
Mykola Golub
4e1e81a2a7 qa/workunits/rbd: use cluster1/2 instead local/remote as cluster names
After adding tests that start daemons in both clusters, local/remote
names look confusing.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-03-31 14:17:58 +03:00
Mykola Golub
2226019037 qa/workunits/rbd: add helper to determine rbd-mirror local cluster
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-03-31 14:16:21 +03:00
John Spray
d034539c52 qa: update rest test cephfs calls (part 2)
"mds stat" now gives fsmap output rather than
mdsmap.  Update the rest api test's expectations.

Fixes: http://tracker.ceph.com/issues/15309
Signed-off-by: John Spray <john.spray@redhat.com>
2016-03-31 11:28:43 +01:00
Mykola Golub
70b1303a08 qa/workunits/rbd: improvements for manual testing
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-03-31 11:42:13 +03:00
Sage Weil
d6569bfe58 Merge pull request #8372 from jcsp/wip-15309
qa: update rest test cephfs calls
2016-03-31 01:15:38 -04:00
Sage Weil
052fa90eb7 Merge pull request #7062 from wonzhq/scrub-prio-pool
osd: add the support of per pool scrub priority

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-30 08:24:43 -04:00
Sage Weil
325520824e Merge pull request #8210 from liewegas/wip-12814
osd: add 'proxy' cache mode

Reviewed-by: Samuel Just <sjust@redhat.com>
2016-03-30 08:23:05 -04:00
John Spray
557955a233 qa: update rest test cephfs calls
Since the ceph task was already creating filesystems
during setup, I presume that these calls only ever
worked when they were using the same names as
the existing filesystem.

Fixes: http://tracker.ceph.com/issues/15309
Signed-off-by: John Spray <john.spray@redhat.com>
2016-03-30 11:43:22 +01:00
Jason Dillaman
ded7a77931 qa/workunits/rbd: add basic failover/fallback test case
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:26 -04:00
Sage Weil
359d8324a3 qa/workunits/cephtool/test.sh: fix cache mode tests
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-28 16:57:42 -04:00
Loic Dachary
fa450896ac Makefile-env.am: set a default for CEPH_BUILD_VIRTUALENV (part 2)
The new default must be taken into account by make check scripts
otherwise they fail.

Followup of 5b3da26.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-27 22:28:50 +02:00
Sage Weil
a0e5aa5c8a Merge remote-tracking branch 'gh/jewel' 2016-03-25 15:49:23 -04:00
Gregory Farnum
6bbc6b50bb Merge pull request #7901 from jcsp/wip-pycephfs-fixes
libcephfs: fix python tests and fix getcwd on missing dir

Reviewed-by: Yan, Zheng <zyan@redhat.com>
2016-03-23 17:05:22 -07:00
Loic Dachary
eb583cbbbf build/ops: in jessie virtualenv is in package virtualenv
The python scripts are not yet compatible with python3, yet it is the
default on jessie. Force the creation of the virtualenv to use python2.7
instead. The wheelhouse is already explicitly populated for both python3
and python2.7 by install-deps.sh, regardless of the default interpreter.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-23 19:56:11 +01:00
Sage Weil
df6570c2bd Merge pull request #8222 from SUSE/wip-14984
systemd: set up environment in rbdmap unit file

Reviewed-by: Boris Ranto <branto@redhat.com>
2016-03-23 12:33:39 -04:00
Samuel Just
3156ebf9ed Merge pull request #8266 from athanatos/wip-test-exit-value
Test exit values on test.sh, fix tier.cc

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-22 11:24:53 -07:00
Samuel Just
926f8ed77b qa/workunits/rados/test.sh: check subprocess return values
Fixes: #15165
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-03-22 11:23:48 -07:00
Nathan Cutler
0effb9e385 qa: test_rbdmap_RBDMAPFILE.sh workunit
Before a7a3658 the rbdmap script was logging bogus messages and not working
on systemd platforms because the unit file was not defining the RBDMAPFILE
environment variable.

This workunit asserts that the bug has been fixed.

http://tracker.ceph.com/issues/14984 References: #14984

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2016-03-20 22:50:47 +01:00
Jason Dillaman
f65cc6fc31 Merge pull request #8172 from trociny/fix-test-rbd-mirror-position
test: rbd-mirror: compare positions using all fields

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-03-19 16:33:36 -04:00
Jason Dillaman
f938586451 Merge pull request #8221 from jdurgin/wip-test-rbd-mirror
qa: add workunit to run ceph_test_rbd_mirror

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-03-19 16:18:19 -04:00
Sage Weil
5c5a50745f Merge pull request #8191 from liewegas/wip-15180
qa/workunits/rest/test.py: don't use newfs

Reviewed-by: John Spray <john.spray@redhat.com>
2016-03-19 09:13:23 -04:00
Josh Durgin
9f6ec704db qa: add workunit to run ceph_test_rbd_mirror
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2016-03-18 17:23:52 -07:00
Josh Durgin
62771e4a92 Merge pull request #8182 from trociny/wip-rbd-mirror-args
rbd-mirror: make remote context respect env and argv config params

Conflicts:
	qa/workunits/rbd/rbd_mirror.sh (asok command format changed)

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-03-18 15:03:33 -07:00
Josh Durgin
c6c4f6095a Merge pull request #8159 from trociny/wip-rbd-mirror-asok
rbd-mirror: use pool/image names in asok commands

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-03-18 14:58:58 -07:00
Jason Dillaman
d9017fb95c qa/workunits/rbd: new online maintenance op tests
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-18 14:33:20 -04:00
Sage Weil
811b8f5e3c qa/workunits/rest/test.py: don't use newfs
It doesn't work anymore.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-18 09:51:31 -04:00
Sage Weil
f6f9c00b33 Merge pull request #8121 from liewegas/wip-15136
mon: remove 'mds setmap'

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-03-18 09:44:05 -04:00
Mykola Golub
13c7ba4c67 test: rbd-mirror: different log and asok location for local/remote contexts
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-03-17 14:46:21 +02:00
Mykola Golub
b15ff2f419 test: rbd-mirror: compare positions using all fields
Comparing by only entry_tid may give false positives.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-03-16 23:07:07 +02:00