Commit Graph

1439 Commits

Author SHA1 Message Date
liuchang0812
14de3a1ee1 test: replace hard-code binary names with varibles
This test case couldn't run under customize env CEPH_BIN.

Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
2016-12-27 14:18:29 +08:00
Mykola Golub
11d6caf367 librbd: permit removal of image being bootstrapped by rbd-mirror
Fixes: http://tracker.ceph.com/issues/16555
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-12-20 20:07:51 +02:00
Sage Weil
5666fd61d6 qa/workunits: include extension for nose tests
When you have a relative path you have to include the extension.
Weird.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-19 14:08:11 -05:00
Sage Weil
904913b37f mon/OSDMonitor: remove 'osd thrash' command
This is a dev hack to generate a bunch of bogus osdmaps.  The maps are
all screwed up anyway (e.g., invalid addrs) and this is minimally useful.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-18 23:11:56 -05:00
Loic Dachary
c83d030d30 ceph-disk: do not create bluestore wal/db partitions by default
Fixes: http://tracker.ceph.com/issues/18291

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-12-17 20:55:36 +01:00
Sage Weil
cf294777ea qa/workunits: use relative path instead of wget from git
Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-15 15:10:28 -05:00
Sage Weil
61e592ad0b Merge pull request #12286 from dillaman/wip-18123
rados: optionally support reading omap key from file

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-12-15 10:00:47 -06:00
Samuel Just
c2c5dace33 Merge pull request #12268 from dzafman/wip-18113
osd: When deep-scrub errors present upgrade regular scrubs

Reviewed-by: Samuel Just <sjust@redhat.com>
2016-12-14 11:34:24 -08:00
Jason Dillaman
4314cb945a qa/workunits/rbd: use more recent qemu-iotests that support Xenial
Fixes: http://tracker.ceph.com/issues/18149
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-12-10 20:42:52 -05:00
David Zafman
64a7012e98 test: Add test for keeping deep-scrub information
Signed-off-by: David Zafman <dzafman@redhat.com>
2016-12-09 16:51:20 -08:00
Jason Dillaman
2c70df978d qa/workunits/rbd: removed qemu-iotest case 077
The test case is not stable due to racing console output. This
results in spurious failures.

Fixes: http://tracker.ceph.com/issues/10773
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-12-07 09:59:39 -05:00
Jason Dillaman
286ceb1e03 rados: optionally support reading omap key from file
Fixes: http://tracker.ceph.com/issues/18123
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-12-07 09:57:16 -05:00
Mykola Golub
6cb1ed485f rbd-mirror: make 'rbd mirror image resync' work after split-brain
Fixes: http://tracker.ceph.com/issues/18051
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-12-03 19:50:27 +02:00
Mykola Golub
cccca67d5f rbd-mirror: split-brain issues should be clearly visible in mirror status
Fixed: http://tracker.ceph.com/issues/16991
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-12-03 19:37:10 +02:00
Mykola Golub
7c078eda0f qa/workunits/rbd: test_status_in_pool_dir: explicitly check grep return value
Otherwise, it does not work as supposed to work in statements like below:

 set -e
 test_status_in_pool_dir ... && ...

(e.g. in wait_for_status_in_pool_dir)

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-12-03 19:37:10 +02:00
Jason Dillaman
fbccd1e88e Merge pull request #12195 from trociny/wip-qa-rbd-wait_for_image_present
qa/workunits/rbd: use image id when probing for image presence

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-12-02 09:01:43 -05:00
Loic Dachary
d5d7e3665f Merge pull request #12180 from tchaikov/wip-silence-get_timeout_delays
tests: disable the echo when running get_timeout_delays()

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-11-29 09:06:43 +01:00
Mykola Golub
c23f56b983 qa/workunits/rbd: use image id when probing for image presence
This fixes a race in resync tests leading to false negative results.

Fixes: http://tracker.ceph.com/issues/18048
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-11-29 10:04:37 +02:00
Loic Dachary
f491ea062d tests: facilitate background process debug in ceph-helpers.sh
When displaying the output of a background process, do it on stderr so
that it is not bufferized. Otherwise the output of the background
process may be displayed after it completed.

Prefix the output of a background process with the PID of the process
known to the parent instead of the PID of the awk process processing the
output. When wait_background loops, it will print the process on which
it is waiting and it is confusing that they do not match with the PID
prefixing the process output.

Refs: http://tracker.ceph.com/issues/17830

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-11-24 19:52:14 +01:00
Kefu Chai
1b9bc0501c tests: disable the echo when running get_timeout_delays()
this function is very distracting when one is looking at the log

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-11-25 00:17:23 +08:00
Loic Dachary
cca0f59156 Merge pull request #12085 from wjwithagen/wip-freebsd-ceph-helpers-2
workunits/ceph-helpers.sh: Fixes for FreeBSD

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-11-24 08:01:51 +01:00
Willem Jan Withagen
e4629b3397 workunits/ceph-helpers.sh: Fixes for FreeBSD
- stat(1) does not have '%T'

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-11-24 01:57:05 +01:00
David Zafman
dcb5fb9b5a test: CLEANUP: Make wait_for_clean() clearer changing variable name
Signed-off-by: David Zafman <dzafman@redhat.com>
2016-11-22 21:38:42 -08:00
David Zafman
c1eb8746bc test: Return wait_for_clean() to start sleeping at .1
Signed-off-by: David Zafman <dzafman@redhat.com>
2016-11-22 21:36:13 -08:00
David Zafman
453942946a test: Enhance get_timeout_delays()
Do all math using bc so we can have fractions
Allow caller to specify the first step (default 1)
Add testing of fractional first step

Signed-off-by: David Zafman <dzafman@redhat.com>
2016-11-22 21:32:34 -08:00
Jason Dillaman
5cd929aee3 Merge pull request #11960 from vshankar/wip-librbd-ec-support
librbd: bug fixes for optional data pool support

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-11-21 12:36:54 -05:00
Kefu Chai
23c21238b8 Merge pull request #12005 from wjwithagen/wip-wjw-freebsd-ceph-helpers
workunits/ceph-helpers.sh: FreeBSD returns a different errorstring.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-11-21 22:53:23 +08:00
Loic Dachary
5e625674a8 tests: fix ceph-helpers.sh wait_for_clean delays
The TENTH_TIMEOUT was not delcared as an int and failed to be set with
the correct number. The test of the function did not catch this.

Implement computing of the increasingly large sleep delays in a separate
function so that it can be tested more easily. Give up on sub-second
sleep because a the function will not sleep at all if the cluster is
already clean. And if it is not already clean, it is very unlikely to
become clean within less than a second. The downside of having very
short sleep time is that it needlessly stress the machine and also
possibly spam the logs.

Refs: http://tracker.ceph.com/issues/17830

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-11-21 11:42:42 +01:00
Venky Shankar
3a91d7bd2e qa / workunits: make rbd import/export work with image data pool
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2016-11-20 21:21:50 +05:30
Loic Dachary
cd72ff9f74 tests: save 9 characters for asok paths
For vstart.sh powered tests, save 9 characters in the path name
by replacing testdir/test- with td/t-

60 characters imposed by jenkins
9 characters for src/test
5 characters for td/t-

33 left (instead of 24) for the test to create asok such as out/client.admin.25327.asok

Moving these files outside of the build directory is a bad idea because
tests should only create/use files within the builddir and not write
outside of this directory. Doing so would make things more complicated
for cleanup in case the test fail and create other problems as a
consequence (filling out disk space, conflicting directories between
runs etc.).

For ceph-helpers.sh tests replace testdir with td, saving 5 characters.
This is not strictly necessary but keeps the directory names consistent:
if the developer wants to get rid of all the test leftovers, it is
enough to remove the a single directory: td.

Fixes: http://tracker.ceph.com/issues/16014

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-11-18 09:19:18 +01:00
Kefu Chai
2c7f08b849 Merge pull request #9613 from dzafman/wip-16064
common osd: Improve scrub analysis, list-inconsistent-obj output and osd-scrub-repair test

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-11-17 15:48:32 +08:00
David Zafman
1a75696065 test: activate_osd() doesn't need to set crush
Tests use objectstore_tool() which stops and starts OSDs,
but may assume consistency of object locations.

Signed-off-by: David Zafman <dzafman@redhat.com>
2016-11-16 11:01:43 -08:00
David Zafman
f3def4a0e5 test: wait_for_clean() add sleep backoff
Reduce size of log on timeout by doing a backoff so that
we don't log 3000 loops at 1/10 second sleeps.

Signed-off-by: David Zafman <dzafman@redhat.com>
2016-11-16 11:01:43 -08:00
Willem Jan Withagen
e34e18609f workunits/ceph-helpers.sh: FreeBSD returns a different errorstring.
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-11-15 12:10:18 +01:00
Sage Weil
f9882f4abe qa/workunits/rados/test_envlibrados_for_rocksdb: force librados-dev install
On trusty we see

 WARNING: The following packages cannot be authenticated!
   librados-dev
 E: There are problems and -y was used without --force-yes

Signed-off-by: Sage Weil <sage@redhat.com>
2016-11-12 08:30:59 -05:00
Kefu Chai
36bf16d073 Merge pull request #11293 from liewegas/wip-mon-markout
mon: preserve osd weight when marking osd out, then in

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-11-11 22:00:39 +08:00
John Spray
36905d7caf Merge pull request #11783 from jcsp/wip-17796
mds: enable rmxattr on pool_namespace attrs 

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-11-11 12:09:57 +01:00
Sage Weil
573e5b060e qa/workunits/ceph-helpers.sh: allow pool deletes
Signed-off-by: Sage Weil <sage@redhat.com>
2016-11-10 11:43:41 -05:00
Kefu Chai
f669cf8261 Merge pull request #11633 from ddiss/tcc17684_rados_segv_without_pool
rados: fix segfaults when run without --pool

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-11-10 19:53:44 +08:00
Kefu Chai
37f3897c55 Merge pull request #11702 from wjwithagen/wip-wjw-freebsd-cephtool-test
qa/workunits/cephtool/test.sh: FreeBSD has no distro.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-11-10 10:18:23 +08:00
David Zafman
907e79e2b7 test: Add test support for deep-scrub
Signed-off-by: David Zafman <dzafman@redhat.com>
2016-11-08 15:16:52 -08:00
Sage Weil
73a2c11e94 mon/OSDMonitor: remember old weight on 'osd out'
If we have an OSD with a weight that's not 1.0 and mark it out,
we should restore the same weight when we mark it back in. We
already do this when an OSD is automatically marked out, just
not when it is explicitly marked out.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-11-07 11:28:43 -05:00
Mykola Golub
a3df091595 qa/workunits/rbd: simplify running nbd test under build env
Previously running the script as unprivileged user was not very useful
due to difficulty to change path sudo was looking for a command to
execute.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-11-04 16:22:51 +02:00
John Spray
77177530f2 mds: enable rmxattr on pool_namespace attrs
So that a user has a natural way of undoing a setxattr
which set a pool_namespace.

Fixes: http://tracker.ceph.com/issues/17797
Signed-off-by: John Spray <john.spray@redhat.com>
2016-11-04 13:00:05 +00:00
Mykola Golub
2012b4dfc6 rbd-nbd: disallow mapping images >2TB in size
Fixes: http://tracker.ceph.com/issues/17219
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-11-03 14:50:47 +02:00
Willem Jan Withagen
e1993eab6d qa/workunits/cephtool/test.sh: FreeBSD has no distro.
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-11-02 14:37:32 +01:00
Kefu Chai
e7291ce22c Merge pull request #9304 from dzafman/wip-13937
osd: handle EC recovery read errors

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-10-28 17:21:09 +08:00
David Zafman
b4c080b1b4 test.sh: Make check for flags more robust
Low space broke test, saw "flags nearfull,pauserd,pausewr...."

Signed-off-by: David Zafman <dzafman@redhat.com>
2016-10-27 22:42:11 -07:00
Kefu Chai
ed9b0d3273 Merge pull request #11619 from dachary/wip-17662-ceph-disk
ceph-disk: allow using a regular file as a journal

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-10-26 15:02:51 +08:00
David Disseldorp
87cd4c7350 qa/workunits/rados/test_rados_tool.sh: test for segv without --pool
Ensure that the rados client binary doesn't segfault when specifying a
number of parameters without a corresponding --pool parameter.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-10-25 13:19:58 +02:00
Yuri Weinstein
fc70cd9ac3 Merge pull request #11036 from tomy-ac/wip-tc-rados_append
Added append functionality to rados tool.

Reviewed-by: Samuel Just <sjust@redhat.com>
2016-10-24 14:45:42 -07:00
Jayashree Candadai
db917d50eb ceph-disk: allow using a regular file as a journal
Because of a missing return, ceph-disk prepare would fail if given a
regular file as a journal. If the journal file does not exist, ceph-disk
will create it but fail to ensure that the ceph user owns it. The
symlink to the journal file is not set when the journal file is
specified on the command line and the journal file does not exist at
all. The ceph-osd daemon will silently create it as a file but it will
not be the file given in argument.

Add a test case to verify using a regular file as a journal works as
expected.

Fixes: http://tracker.ceph.com/issues/17662

Signed-off-by: Jayashree Candadai <jayaajay@indiana.edu>
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2016-10-24 15:58:31 +02:00
Kefu Chai
75edfbba34 Merge pull request #8751 from flyd1005/wip-fix-typo
doc: fix typos

Reviewed-by: Abhishek Lekshmanan <abhishek@suse.com>
2016-10-24 11:15:12 +08:00
Jason Dillaman
8743184988 Merge pull request #11438 from trociny/wip-17488
rbd-nbd: support disabling auto-exclusive lock transition logic

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-10-19 11:41:26 -04:00
Loic Dachary
469a53a4ad tests: ceph-disk: force debug monc = 0
The sh function will collect both stderr and stdout and debug
will mess the json parsing.

Fixes: http://tracker.ceph.com/issues/17607

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2016-10-18 17:33:23 +02:00
Mykola Golub
300a2810ac rbd-nbd: support disabling auto-exclusive lock transition logic
Fixes: http://tracker.ceph.com/issues/17488
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-10-12 21:00:25 +03:00
Kefu Chai
d2b6b34215 Merge pull request #10916 from jordan41177/fix-17169
mon: OSDMonitor: fix the check error of pg creating

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-10-10 14:39:56 +08:00
Jason Dillaman
a6dd6b50d6 qa/workunits: reduce amount of client IO for rbd-mirror stress
Journal IO is faster now, resulting in OSDs quickly filling up
under the stress test case.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-10-04 21:31:54 -04:00
Jason Dillaman
3e4a59d81b Merge pull request #11291 from trociny/wip-qa-mirror-asok
qa/workunits/rbd: check status also in pool dir after asok commands

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-10-04 11:22:53 -04:00
Mykola Golub
eb4097b8ef qa/workunits/rbd: set image-meta on primary image and wait it is replicated
After recently added image metadata replication it is not possible any
more to update it on non-primary image.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-10-03 17:02:59 +03:00
Mykola Golub
2882f8c01a qa/workunits/rbd: check status also in pool dir after asok commands
wait_for_image_replay_stopped returns not when the state is stopped,
but when the state is not replaying. So a race was possible when an
asok command was running when the previos stop command was still in
progress, leading to unexpected results.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-10-03 10:10:33 +03:00
Bassam Tabbara
cc62c11a76 erasure-code: Remove SIMD flavors for jerasure and shec
By switching to a new gf-complete with SIMD runtime detection, we can now remove all the different flavors of jerasure and shec. This simplifies deployment and configuration of erasure coding, enables hetergenous OSDs, and enables us to take advantage of new performance improvements in jerasure without config/build changes.

This commit removes flavors from cmake, removes ErasureCodePluginSelect___, and fixes unit tests. There is now a single plugin for jerasure and a single plugin for shec.

SIMDExt.cmake was changed so that its a little more generic, and is not polluted with gf-complete specific CFLAG defines. The #define for SIMD instruction were based on gf-complete.

I also added a small init helper for jerasure that has code that was common between jerasure and shec.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2016-09-29 10:34:33 -07:00
Tomy Cheru
cb919cae34 tools/rados: Added append functionality to rados tool.
Signed-off-by: Tomy Cheru <tomy.cheru@sandisk.com>
2016-09-28 09:23:37 +05:30
Ricardo Dias
5c737038dd
rbd-mirror: test: Fixed timeout problem in rbd_mirror_stress.sh
Signed-off-by: Ricardo Dias <rdias@suse.com>
2016-09-26 14:25:25 +01:00
Jason Dillaman
a0f65b968b qa/workunits/rbd: fix remove mirrored image race conditions
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-09-23 09:01:52 -04:00
Jason Dillaman
a43268a4a3 qa/workunits/rbd: new mirroring forced promotion test
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-09-23 09:01:52 -04:00
Kefu Chai
b975e85afa test: re-enable test_pg_scrub() test in ceph-helper.sh
this reverts d053705. i disabled this test in hope to bisect the
offending tests that fail the mysterious jenkins failure, which was
fixed by 6f3ce3a.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-09-23 14:50:03 +08:00
Loic Dachary
eb968f886e Merge pull request #10135 from david-z/wip-enhance-ceph-disk-bluestore
ceph-disk: support creating block.db and block.wal with customized size for bluestore

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-09-22 18:13:00 +02:00
Kefu Chai
8f8a7a46a2 Merge pull request #11089 from dachary/wip-16477-ceph-helper
cli: retry when the mon is not configured

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-09-22 23:26:32 +08:00
Ryne Li
958fa7dcf2 add qa test of envlibrados for rocksdb
Signed-off-by: Ryne Li <lizhenqiangsnake@gmail.com>
2016-09-20 20:12:47 -07:00
Zhi Zhang
67b11b0140 ceph-disk: update/add ceph-disk test cases for bluestore
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
2016-09-20 11:43:26 +08:00
Kefu Chai
440c360d18 Merge pull request #10815 from ceph/wip-qa-workunits-py3
Python 3 compatibility for workunits

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-09-19 18:45:34 +08:00
DesmondS
179d3d1659 mon: OSDMonitor: fix the check error of pg creating
The variable 'pgs_per_osd' set value from 'new_pgs' divided by 'expected_osds',
and its type is integer. So it would remove the decimal point and get smaller value.
This would have problem in some situations, for exmaple:

The limitation of pg creating for one OSD is '32'.
There have 3 OSDs and I want to increase pgs for a pool.
It should be the limitation for creating new pgs up to '96(32 * 3)' at once.
Now, I create '98' pgs for a pool.

In original code, '98' would be divided by 'expected_osds' and get the floating value '32....'
Because of the type which is integer, the 'pgs_per_osd' would be set to 32.
Then the value won't bigger than the limitation and get the wrong result.

Signed-off-by: DesmondS <desmond.s@inwinstack.com>
Fixes: http://tracker.ceph.com/issues/17169
2016-09-19 17:59:01 +08:00
Loic Dachary
a5e5119bd1 test: timeout verification that mon is unreachable
Without a timeout on the command, it may hang for a very long time,
hunting for new mons. If it hangs for more than 60 seconds, it is
safe to assume the mon is indeed down.

Fixes: http://tracker.ceph.com/issues/16477

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-09-16 14:20:38 +02:00
Sage Weil
be607ab636 qa/workunits/objecstore/test_fuse.sh: make it work with filestore
Signed-off-by: Sage Weil <sage@redhat.com>
2016-09-13 09:40:03 -04:00
Sage Weil
265730aa5a os/FuseStore: only flush if dirty
No need to rewrite the object unless it was changed.

This partially fixes truncate.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-09-07 18:14:16 -04:00
Sage Weil
b6870a618b qa/workunits/objectstore: fix test_fuse.sh
We switched from @ to # a while back.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-09-07 18:14:15 -04:00
Sage Weil
5e7e22bc4c Merge pull request #10979 from wjwithagen/wip-wjw-cephtool-test
qa/workunits/cephtool/test.sh: fix omission of ceph-command
2016-09-07 09:13:34 -05:00
Willem Jan Withagen
6f0e717e6b qa/workunits/cephtool/test.sh: fix omision of ceph-command
- The script fails with these commands, but not for the correct reason.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-09-05 12:04:55 +02:00
Mykola Golub
77fd6a1c20 rbd-mirror: option to automatically resync after journal client disconnect
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-09-05 12:48:47 +03:00
Mykola Golub
330dba00ba rbd-mirror: stop replay when client is disconnected
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-09-05 12:48:47 +03:00
Loic Dachary
7cbf1f0a5e tests: populate /dev/disk/by-partuuid for scsi_debug
The scsi_debug SCSI devices do not have a symlink in /dev/disk/by-partuuid
because they are filtered out by 60-persistent-storage.rules. That was
worked around by 60-ceph-partuuid-workaround-rules which has been
removed by 9f76b9ff31.

Add create rules targetting this specific case, only for tests since the
problem does not show in real use cases.

Fixes: http://tracker.ceph.com/issues/17100

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-08-24 10:10:30 +02:00
Anirudha Bose
724febf5ca qa/workunits: PEP8ify
Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
2016-08-20 22:30:54 +05:30
Anirudha Bose
922c977c8b qa/workunits: Python 3 compat fixes for fs/misc/direct_io.py
Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
2016-08-20 22:30:54 +05:30
Anirudha Bose
07b15e7086 qa/workunits: Allow setting $PYTHON in ceph-disk/ceph-disk.sh
$PYTHON defaults to "python"

Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
2016-08-20 01:18:33 +05:30
Anirudha Bose
92dbeabfdd qa/workunits: Python 3 compat fixes for ceph-disk/ceph-disk-test.py
Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
2016-08-20 01:18:32 +05:30
Anirudha Bose
0b32fd50f8 qa/workunits: Python 3 compat fixes for fs/multiclient_sync_read_eof.py
Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
2016-08-19 11:29:01 +05:30
Anirudha Bose
12f9be0c9f qa/workunits: Python 3 compat fixes for restart/test-backtraces.py
Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
2016-08-19 11:22:27 +05:30
Anirudha Bose
5d800fa47d qa/workunits: Python 3 compat fixes for rest/test.py
Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
2016-08-19 11:22:27 +05:30
Anirudha Bose
c148526462 qa/workunits: Python 3 compat fixes for fs/misc/filelock_deadlock.py
Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
2016-08-19 11:22:26 +05:30
Anirudha Bose
b8233cc77e qa/workunits: Python 3 compat fixes for fs/misc/filelock_interrupt.py
Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
2016-08-19 11:22:26 +05:30
Anirudha Bose
4409bb5aef qa/workunits: Python 3 compat fixes for mon/test_mon_config_key.py
Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
2016-08-19 11:22:26 +05:30
Oleh Prypin
20c5bcf592 qa/workunits/rados/test_python.sh: Allow specifying Python executable
(through an environment variable)

Signed-off-by: Oleh Prypin <oleh@pryp.in>
2016-08-18 23:36:32 +03:00
Anirudha Bose
f937d3464b qa/workunits: Python 3 compat fixes for mon/ping.py
Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
2016-08-18 18:44:54 +05:30
Jason Dillaman
e6aa18ea0d qa/workunits/rbd: demote/promote image on same cluster
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-08-16 09:09:52 -04:00
Jason Dillaman
0891ede57c qa/workunits: support filtering cls_rbd unit test cases
Fixes: http://tracker.ceph.com/issues/16529
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-08-12 14:44:09 -04:00
John Spray
d9948bbdb7 Merge pull request #10452 from jcsp/wip-16556
test: break out librados-using cephfs test
2016-08-07 15:48:49 +01:00
Yuri Weinstein
bb7424e860 Merge pull request #10491 from xiexingguo/xxg-wip-osdmon-2016-07-28
osd/OSDMonitor: misc. fixes

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-08-05 08:14:02 -07:00
Jason Dillaman
efa5f730cc Merge pull request #10488 from lande1234/wip-lan-testing
rbd-mirror: add additional test scenarios

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-08-05 09:20:37 -04:00
Mykola Golub
a5f63f7261 qa/workunits/rbd: wait for image deleted before checking health
This is a fixup to the previous commit.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-08-02 20:06:17 +03:00
xie xingguo
3b160df0aa mon/OSDMonitor: expose require_kraken_osds flag to user
For newly created cluster the CEPH_OSDMAP_REQUIRE_KRAKEN will be
automatically set, while for existing clusters it will not.

This change add "require_jewel_osds" to white list, so user
can access it by the "ceph osd set *" command family.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-08-01 12:24:26 +08:00
Mykola Golub
df2aa585c4 Merge pull request #10341 from dillaman/wip-16223
rbd-mirror: reduce memory footprint during journal replay

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2016-07-30 19:28:02 +03:00
lande1234
aba7d3b874 Test scenario
Signed-off-by: lande1234 <lan.de3@zte.com.cn>
2016-07-29 04:58:26 +00:00
Mykola Golub
8dbe42d345 qa/workunits/rbd: wait for image deleted before checking health
When a primiry image is being deleted, the mirrored image might
temporary be reported in error state, before deletion is propagated.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-07-28 14:55:42 +03:00
Mykola Golub
fdb971a266 qa/workunits/rbd: small fixup and improvements for rbd-mirror tests
- log to stderr;
- log status if a `wait_for` function failed;
- don't needlessly sleep in `wait_for` functions after the last
  unsuccessful iteration;
- make `wait_for_pool_images` work for image removal case;
- fix `wait_for_pool_images` reset timeout (last_count set).

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-07-28 14:55:42 +03:00
John Spray
268a471632 test: break out librados-using cephfs test
We are seeing an issue due to the lockdep symbols
in libcephfs and librados clashing, which shows itself
after a fork in the flock tests.  We can avoid this
by splitting the libcephfs tests that require librados
(access.cc) into their own compilation unit so that
the flock tests can run in a libcephfs-only process.

Fixes: http://tracker.ceph.com/issues/16556
Signed-off-by: John Spray <john.spray@redhat.com>
2016-07-27 12:18:50 +01:00
Kefu Chai
de68fe38e1 qa/workunits/cephtool/test.sh: use absolute path for TEMP_DIR
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-25 16:58:28 +08:00
Jason Dillaman
ab5ebdef32 Merge pull request #10123 from trociny/wip-16449
librbd: prevent creation of clone from non-primary mirrored image

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-07-24 11:12:57 -04:00
Jason Dillaman
574be7486a qa/workunits/rbd: override rbd-mirror integration test poll frequency
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-07-21 12:52:57 -04:00
Jason Dillaman
2f4cb26d8b qa/workunits/rbd: exercise snapshot renames within rbd-mirror test
Snapshot rename operations utilize the (cluster) unique snapshot
sequence to prevent attempts at replays. When mirroring to a
different cluster, these sequences will not align.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-07-19 09:27:32 -04:00
Jason Dillaman
a3438bac71 Merge pull request #9291 from trociny/wip-15715
rbd-nbd does not properly handle resize notifications

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-07-18 16:44:58 -04:00
John Spray
0080b6bc92 Merge pull request #9955 from ukernel/wip-mds-snap-failover
mds: snap failover fixes

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-07-18 21:01:35 +01:00
Kefu Chai
4025a2eb80 Merge pull request #10306 from tchaikov/wip-no-mktemp-p
qa/workunits/cephtool/test.sh: s/TMPDIR/TEMP_DIR/

Reviewed-by: Haomai Wang <haomai@xsky.com>
2016-07-15 21:34:02 +08:00
Kefu Chai
56df5dcda4 Merge pull request #10166 from wjwithagen/wip-wjw-cmake-test_rados_tool.sh
test_rados_tool.sh: Make script work under ctest

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-07-15 17:03:59 +08:00
Kefu Chai
7c1b456022 qa/workunits/cephtool/test.sh: s/TMPDIR/TEMP_DIR/
this fixes the test failure of
```
2016-07-12T23:29:40.935
INFO:tasks.workunit.client.0.mira101.stderr:/home/ubuntu/cephtest/workunit.client.0/cephtool/test.sh:
line 153: /CEPH_WATCH_9445: Permission denied
```
see
http://pulpito.ceph.com/kchai-2016-07-12_23:09:35-rados-wip-kefu-testing2---basic-mira/311333/

it's a regression introduced by e5c262b

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-15 16:20:37 +08:00
Kefu Chai
e5c262bfe6 qa/workunits/cephtool/test.sh: use mktemp $TEMP_DIR/XXX instead
mktemp -p is not supported on FreeBSD

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-15 14:21:52 +08:00
Yan, Zheng
16f7d7c71e qa/workunits/fs: fix expect_failure function in test scripts
The origin expect_failure function return 0 regardness of command's
return value.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2016-07-15 09:11:49 +08:00
Mykola Golub
ba849e3b04 librbd: prevent creation of clone from non-primary mirrored image
Fixes: http://tracker.ceph.com/issues/16449
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-07-14 23:02:18 +03:00
Mykola Golub
fa58acbb6f qa/workunits/rbd: image resize test for rbd-nbd
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-07-13 15:40:03 +03:00
Kefu Chai
53af28db6e test: remove ceph_test_rados_api_tmap_migrate
see also: http://tracker.ceph.com/issues/16144

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-12 16:08:09 +08:00
Kefu Chai
90a18d822e Merge pull request #9698 from LiumxNL/fix-clones-flush-evict
rados: add option to include clones when doing flush or evict

Reviewed-by: Sage Weil <sage@redhat.com>
2016-07-11 11:49:27 +08:00
Ali Maredia
3ed34b58bd Merge pull request #10116 from tchaikov/wip-cmake-make-check
test: make check using cmake

Reviewed-by: Ali Maredia <amaredia@redhat.com>
2016-07-07 12:13:46 -04:00
Kefu Chai
d053705c03 qa/workunits/ceph-helpers.sh: disable test_pg_scrub()
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-07 23:17:11 +08:00
Willem Jan Withagen
a939e99341 rados/test_rados_tool.sh: Improve on testing conditions
- have test aka [] use numeric comparisons
 - suppress the filename on 'wc -l' by pipping the file

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-07-07 14:57:16 +02:00
Willem Jan Withagen
6029b5974b qa/workunits/rados/test_rados_tool.sh: make it run under ctest
- This script is always called from a controlled environment
 - use CEPH_BIN for exec's, otherwise QA sets PATH correctly

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-07-07 14:57:03 +02:00
Kefu Chai
06195b3476 qa/workunits/cephtool/test.sh: respect $TMPDIR
create temp directory and files in $TMPDIR. the $TMPDIR is hard-wired to
/tmp before this change, we'd better respect the env variable $TMPDIR,
so it would be more consistent, and easier to do the cleanup if any.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-07 12:11:05 +08:00
Mykola Golub
9737a8d6cb qa/workunits/rbd: before removing image make sure it is not bootstrapped
If an image is being bootstrapped, it implies that the rbd-mirror
daemon currently has the image open. The removal API will prevent the
removal of any image that is opened by another client.

Works-around: http://tracker.ceph.com/issues/16555
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-07-06 12:59:25 +03:00
Kefu Chai
5e16f2379d test: cephtool/test.sh: fix expect_false with pipe
this fixes failures like,

/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/cephtool/test.sh:
line 32: ceph osd blacklist ls | grep 192.168.0.1: command not found

where the failure is not the "failure" we are expecting.

in our tests, following command

expect_false "ceph osd blacklist ls | grep 192.168.0.1"

is designed to to verify that "ceph osd blacklist ls | grep 192.168.0.1"
fails with non-zero return code. but expect_false() evaluates the command
line using plain "$@", which will send the arguments direct to the shell,
and $0 is "ceph auth get client.xx | grep caps | grep mon", which does
not exist and is not built-in command. so we need to check the grep
command instead.

for multiple piped command line, use

expect_false sh <<< "echo foo  | grep bar | grep baz"

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-05 15:26:43 +08:00
Mykola Golub
5485296a3d Merge pull request #10076 from dillaman/wip-rbd-mirror-cmake
test: fix rbd-mirror workunit test cases for cmake

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2016-07-05 08:28:43 +03:00
Mingxin Liu
383177be07 qa/workunits: update test_cache_pool.sh
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2016-07-04 10:39:57 +08:00
Jason Dillaman
5a37b993c2 qa/workunits/rbd: fix issues under cmake build environment
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-30 16:59:19 -04:00
Mykola Golub
06a333b116 rbd-mirror: remove ceph_test_rbd_mirror_image_replay test case
Fixes: http://tracker.ceph.com/issues/16539
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-06-30 21:25:13 +03:00
Gregory Farnum
be55cfc331 Merge pull request #9606 from gregsfortytwo/wip-16002
ObjectCacher: fix bh_read_finish offset logic

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-06-29 10:59:14 -07:00
Jason Dillaman
45498d0499 qa/workunits/rbd: remove temporary image exports
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-28 09:08:47 -04:00
Greg Farnum
cc9aab1b0a test: split objectcacher test into 'stress' and 'correctness'
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2016-06-23 14:24:06 -07:00
Samuel Just
c962c72092 Merge pull request #9248 from xiexingguo/xxg-wip-expose-requirejewel
mon: expose require_jewel_osds flag to user

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
2016-06-23 13:03:34 -07:00
Jason Dillaman
48d18030fd Merge pull request #9207 from rjfd/wip-15670
rbd-mirror: image resync

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-06-22 18:03:22 -04:00
Samuel Just
bdf4a93ed5 Merge pull request #9736 from tchaikov/wip-test-timeout
test: disable dup test for mds respawn cmd

Reviewed-by: Samuel Just <sjust@redhat.com>
2016-06-17 08:08:45 -07:00
Mykola Golub
bd7ed8765d Merge pull request #9730 from dillaman/wip-16329
rbd-mirror: gracefully handle missing sync point snapshots

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2016-06-17 14:15:16 +03:00
Kefu Chai
f3643efc80 qa/workunits/cephtool/test.sh: disable dup test for mds respawn cmd
we set the CEPH_CLI_TEST_DUP_COMMAND enn var to verify the successful
commands are idempotent. but some of them are just not. among the other
things:
- ceph tell mds.a exit
- ceph tell mds.a respawn
the respawn command restart the mds daemon, its bind port changes and
all run-time status are reset. so strictly speaking, even the from the
point of view of client, this command is not idempotent. further more,
it fails the test, if the client sends the 2nd command too soon. because
the monitor might not able to update the re-spawned mds address before
the client asking for the new fsmap. so the cephfs client will just
use the old address of the specified mds, and hence will send the
request to port no one is listening anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-17 15:22:26 +08:00
Mykola Golub
00baf49b2b Merge pull request #9720 from dillaman/wip-16202
qa/workunits: rados cppool now requires --yes-i-really-really-mean-it

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2016-06-16 12:51:50 +03:00
Jason Dillaman
d16698f96c qa/workunits/rbd: increase writes in large image count test
This will help to test edge cases where the remote image does
or does not own the exclusive lock when the sync starts.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-15 21:56:09 -04:00
Jason Dillaman
321824d3f7 qa/workunits: rados cppool now requires --yes-i-really-really-mean-it
Fixes: http://tracker.ceph.com/issues/16202
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-15 09:05:05 -04:00
Mykola Golub
3048d3c7ce qa/workunits/rbd: respect RBD_CREATE_ARGS environment variable
Fixes: http://tracker.ceph.com/issues/16289
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-06-15 08:53:13 +03:00
Ricardo Dias
8953825956
rbd-mirror: resync: Added unit tests
Signed-off-by: Ricardo Dias <rdias@suse.com>
2016-06-14 21:24:07 +01:00
Jason Dillaman
6a68b68e0d qa/workunits: ensure replay has started before checking position
Fixes: http://tracker.ceph.com/issues/16248
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-13 00:19:37 -04:00
Mykola Golub
698242e743 qa/workunits/rbd: specify source path
otherwise it looks in $PATH for the script

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-06-11 20:30:32 +03:00
Jason Dillaman
db3e583a5f qa/workunits/rbd: additional rbd-mirror stress tests
Fixes: http://tracker.ceph.com/issues/16197
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-10 09:40:34 -04:00
Jason Dillaman
de15b198cd qa/workunits/rbd: improve deletion propagation test case
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-10 00:15:20 -04:00
Erwan Velu
2381740542 cephtool/test.sh: Adding iterations numbers in output log
When this test is failing and reach the limits, reading the log doesn't make
obvious that we reach them.

This simple patch adds the iterations numbers inside the output log.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-06-03 14:53:00 +02:00