Commit Graph

121 Commits

Author SHA1 Message Date
Josh Durgin
448a3c3335 Merge remote-tracking branch 'origin/next' 2015-01-22 13:05:12 -08:00
Jason Dillaman
a6eadaefb7 rbd image_read.sh: disable exclusive locking
Until the kernel supports RBD exclusive locking, this test
has been updated to create shared images (exclusive locking
disabled).

Fixes: #10613
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-01-22 13:03:40 -08:00
Josh Durgin
07038a79f3 Merge branch 'next' 2015-01-21 16:11:43 -08:00
Josh Durgin
946958c13c qa: disable automatic locking for manual locking test
Automatic locking hides the ESHUTDOWN from the caller, which is how
this test detects that blacklisting works.

Fixes: #10592
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-01-20 15:56:12 -08:00
Josh Durgin
a845139d1f Merge pull request #3292 from kylinstorage/rbd-merge-diff-v2
rbd: merge diff files

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-01-16 12:08:02 -08:00
Josh Durgin
e7cc6117ad qa: ignore duplicates in rados ls
These can happen with split or with state changes due to reordering
results within the hash range requested. It's easy enough to filter
them out at this stage.

Backport: giant, firefly
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-01-14 15:02:38 -08:00
Yunchuan Wen
d300220aaf rbd: test case for rbd merge-diff
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Signed-off-by: MingXin Liu <mingxinliu@ubuntukylin.com>
2015-01-12 01:05:19 +00:00
Warren Usui
46a1a4cb67 If trusty, use older version of qemu
Fixes #10319
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2014-12-19 18:57:06 -08:00
Ilya Dryomov
35f084d078 qa: add script to test how libceph handles huge auth tickets
Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
2014-12-13 20:49:04 +03:00
Josh Durgin
e94d3c11ed qa: allow small allocation diffs for exported rbds
The local filesytem may behave slightly differently. This isn't
foolproof, but seems to be reliable enough on rhel7 rootfs, where
exact comparison was failing.

Fixes: #10002
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2014-11-11 18:16:04 -08:00
Sage Weil
5558afa03d qa/workunits/rbd/import_export.sh: be case insensitive
Stop tripping over this change (from dumpling).

Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-15 12:26:00 -07:00
Sage Weil
055be68cf8 qa/workunits/rbd/qemu-iotests: touch common.env
This seems to be necessary on trusty.

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-17 20:54:28 -07:00
Ilya Dryomov
9bcc19de58 map-unmap.sh: fail if 'rbd rm' fails
Fail if 'rbd rm' fails - most probably it'd fail with "image still has
watchers" and in that case it's a bug in the kernel client which we do
want to notice.  Also nuke the trap-based error handling - cleanup() is
half-baked and not really necessary here.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-06-29 21:58:15 +04:00
Ilya Dryomov
16b14ea123 map-unmap.sh: drop the get_id() logic
Take advantage of the fact that 'rbd map' will now talk to udev and
output the device that got assigned by the kernel to the newly created
mapping.  Drop the get_id() cruft, udevadm settle and chown calls.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-06-29 21:58:15 +04:00
Josh Durgin
40c48bcae0 qa: add script to test krbd setting ro/rw ioctl
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-06-11 17:31:01 -07:00
Warren Usui
ddf37d903f Use new git mirror for qemu-iotests
Fixes: 8191
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2014-04-24 12:55:26 -07:00
Warren Usui
606e725eb5 Support latest qemu iotest code
Modified qemu-iotests workunit script to check for versions
that use the latest qemu (currently only Trusty).  Limit the
tests to those that are applicable to rbd.

Fixes: 7882
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2014-04-23 13:20:14 -07:00
Sage Weil
009e874686 qa/workunits/rbd/copy.sh: skip some tests when tiering is enabled
The rados ls bit doesn't work.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-04-22 11:59:26 -07:00
Sage Weil
c0bff439f5 qa/workunits/rbd/copy.sh: fix test
I broke this in commit 9d64ac6608.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-04-22 11:59:23 -07:00
Sage Weil
a80e66f932 qa/workunit/rbd/import_export.sh: skip list-objects tests with tiering
Listing objects isn't reliable with cache pools; skip that part of the
test if we see that rbd has tiering enabled.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-21 16:47:10 -07:00
Sage Weil
9d64ac6608 qa/workunit/rbd/copy.sh: do not delete/recreate rbd pool
Among other things, it breaks when tiering is enabled.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-21 16:26:23 -07:00
Josh Durgin
10335883a9 qa: fix rbd cli tests checking size
b43bc1a0b0 changed the kilo prefix
from K to k in a few places.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-10-03 15:16:59 -07:00
Sage Weil
8d9165a013 qa/workunits/rbd/simple_big: fix unmap
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-13 13:26:21 -07:00
Sage Weil
956fafc7f2 qa/workunits/rbd/simple_big.sh: don't ENOSPC every time
Set the count on the initial dd so we don't always ENOSPC.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-08 10:14:08 -07:00
Sage Weil
d423cf8c4f qa/workunits/rbd/kernel.sh: move modprobe up
Needs to happen before cleanup.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-08 09:58:16 -07:00
Sage Weil
3f5a96236b qa: write a somewhat <1tb image
1TB is enough to fill up 6 plana osds.  And it takes forever.  Write less.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-05 11:24:06 -07:00
Sage Weil
54aa797acd qa/workunits/rbd/kernel.sh: modprobe rbd
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-05 11:20:43 -07:00
Sage Weil
867ead91e4 qa/workunits/rbd/simple_1tb: add simple rbd read/write test on large image
Motivated by #5454.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-26 20:41:58 -07:00
Josh Durgin
b0b5b1b3ad rbd image_read.sh: wait for rbd sysfs files to appear
Poll until they are available for chmoding.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-12 21:21:39 -07:00
Alex Elder
6bac8ac06c rbd/kernel.sh: quit looking for snapshot sysfs entries
The sysfs entries for snapshots went away a while ago, and this
script used them to verify sizes matched what was expected.

Instead, look at the mapped size of the snapshot in the places
that used to look for the image's snapshot sysfs files.

Also, switch over to using "udevadm settle" rather than a delay to
wait for udev to do its thing.  Insert them at more appropriate
places--right after "rmd map" commands and before and after the
"rbd unmap" calls.

Stop doing the manual refresh calls as well.  The osd will trigger
refreshes whenever the image size or shapshot context changes.

Finally, the cleanup routine is called initially, when there really
isn't expected to be anything to clean up.  Change the rbd commands
to run there conditionally, only if the target of the command
already exists.

Signed-off-by: Alex Elder <elder@inktank.com>
2013-05-30 18:38:53 -05:00
Alex Elder
f40256878d rbd/concurrent.sh: probe rbd module at start
There's no guarantee the rbd module is loaded when this script is
run, so add a line that loads it if necessary.

Signed-off-by: Alex Elder <elder@inktank.com>
2013-05-30 10:10:16 -05:00
Alex Elder
4a8d9962be rbd image_read.sh: ensure rbd is loaded
Make sure rbd is loaded before proceeding with the script.

Signed-off-by: Alex Elder <elder@inktank.com>
2013-05-22 16:50:19 -05:00
Alex Elder
bfb08ee4b2 rbd image_read.sh: test different clone object orders
An rbd clone image can be created with an object order that differs
from that of its parent.  This patch adds testing for that in
qa/workunits/rbd/image_read.sh.  By default, clone images will be
created with an object size twice as big as that of its parent.

For simplicity, when a clone's object order differs from its parent
the order will be either one more than or one less than that of its
parent image, meaning its object size is either double or half of
the size of objects used in the parent.

Signed-off-by: Alex Elder <elder@inktank.com>
2013-05-21 14:44:40 -05:00
Alex Elder
7ad5cebae1 rbd image_read.sh: add clone-of-clone testing
Add testing to verify that a snapshot of a clone and a clone of
that snapshot both produce the correct results when read.

Signed-off-by: Alex Elder <elder@inktank.com>
2013-05-21 14:44:38 -05:00
Alex Elder
a6b4847ef2 rbd image_read.sh: allocate local file at create time
Move the dd command that touches the last byte in a local file
into create_image() where it belongs (out of fill_original()).

Signed-off-by: Alex Elder <elder@inktank.com>
2013-05-21 14:44:35 -05:00
Alex Elder
512e907726 rbd image_read.sh: a few cleanups
The function boolean_toggle() in qa/workunits/rbd/image_read.sh is
defined but never used.  My intentions were good though.  Fix it and
use it for argument parsing.

Change the minimum supported object order so it matches what the
command line interface enforces.

Assign the initial value of TEST_CLONES from the environment if it's
available.

Change defaults to use format 2 and test clones.

Output details about the parameters of the run even if not being
verbose.

Make the order of assignment of argument variables consistent.

And fix a typo unmap_image().

Signed-off-by: Alex Elder <elder@inktank.com>
2013-05-21 14:44:30 -05:00
Sage Weil
cbff720ff5 rbd: prevent import of a dir
Fixes: #2865
Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-21 12:16:24 -07:00
Josh Durgin
13ae13a906 librbd: add options to enable balanced or localized reads for snapshots
Since snapshots never change, it's safe to read from replicas for them.
A common use for this would be reading from a parent snapshot shared by
many clones.

Convert LibrbdWriteback and AioRead to use the ObjectOperation api
so we can set flags. Fortunately the external wrapper holds no data,
so its lifecycle doesn't need to be managed.

Include a simple workunit that sets the flags in various combinations
and looks for their presence in the logs from 'rbd export'.

Fixes: #3064
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-05-12 19:31:22 -07:00
Sage Weil
fe9d326099 rbd: fix qa tests to use --allow-shrink
Fixes: #4763
Signed-off-by: Sage Weil <sage@inktank.com>
2013-04-19 14:37:21 -07:00
Sage Weil
544eb9bda2 qa: pull qemu-iotests from ceph.com mirror
Signed-off-by: Sage Weil <sage@inktank.com>
2013-04-16 16:40:14 -07:00
Josh Durgin
98de67d424 qa: add workunit for running qemu-iotests
This uses the old stand-alone qemu-iotests repo so it works with the
version of qemu in Ubuntu 12.04. The tests depend tightly on qemu
version, so to use later tests we'd need to install corresponding
versions of qemu.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-04-12 17:59:35 -07:00
Alex Elder
351d9b270f rbd qa/workunits: add rbd read data test
This adds a new test script for validating data reads from a mapped
rbd image is what it's expected to be.

See the content of the file for a bit more explanation.

Signed-off-by: Alex Elder <elder@inktank.com>
2013-04-10 15:54:13 -05:00
Sage Weil
f67f62abab rbd: prevent import-diff if start snapshot is not already present
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:41 -07:00
Sage Weil
9946c69cd1 rbd: fail import-diff if end snap already exists
This will prevent a user from inadvertantly reapplying a diff twice.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:41 -07:00
Sage Weil
f0c9a200ec librbd: diff_iterate fromsnapname after the end snap is also invalid
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:41 -07:00
Sage Weil
44e295a3cc qa: rbd/diff_continuous.sh: use non-standard striping
Exercise the striping arithmetic by using non-standard striping that
varies between the parent and child.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:41 -07:00
Sage Weil
f2b0880a89 qa: rbd/diff_continuous.sh: base test off a clone
Get a bit of coverage on clones by starting with a clone.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:41 -07:00
Sage Weil
58c2dedded qa: add rbd/diff_continuous.sh stress test
Stress test that does io on an image while we are mirroring a diff from
earlier snaps to a second copy.  At the end, verify that all snaps have
matching content.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:40 -07:00
Sage Weil
e7167433ae rbd: implement 'export-diff' and 'import-diff' commands
Export a diff of an image from a previous snapshot to a file (or stdout).

Import a diff and apply it to an image, and then create the ending
snapshot.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:40 -07:00
Dan Mick
ccdafa067a test_lock_fence.sh, rbdrw.py: rbd lock/fence test
qa/workunits/rbd/test_lock_fence.sh runs using test/rbdrw.py

rbdrw.py creates an image, locks it, and runs an I/O loop;
test_lock_fence.sh runs it, waits, and then blacklists that client,
which causes rbdrw.py to get ESHUTDOWN on operations thereafter.
Currently doesn't work with rbd caching enabled.

rbd.py gets new exception type for ESHUTDOWN

Fixes: #3190
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-02-25 18:17:40 -08:00