Commit Graph

70 Commits

Author SHA1 Message Date
Gary Lowell
bcb210c677 Merge branch 'next' 2013-02-19 14:53:54 -08:00
Sage Weil
45a4fe0915 qa: rbd map-snapshot-io: udevadm settle
Udev runs blkid on device close, thwarting any rbd unmap that
immediately follows use of the device.  Explicitly settle for now.

See #4183.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-18 20:32:41 -08:00
Sage Weil
231dc1bee6 qa: rbd/map-snapshot-io: remove image when done
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-18 11:24:46 -08:00
Sage Weil
1a7a57ac8f qa: fix quoting of wget URLs
Broke this in ae0c2bbb50.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-18 10:58:10 -08:00
Sage Weil
f45e9be2f3 Merge branch 'next' 2013-02-15 17:21:42 -08:00
Sage Weil
3f5c252796 qa: rbd/map-snapshat-io: unmap image when done
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-15 16:26:16 -08:00
Sage Weil
bc74429c8b qa: rbd/map-snapshot-io.sh: chown rbd device stuff
This is fugly, but sudo -E doesn't work.  Fix this after we are installing
debs and the path doesn't matter anymore!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-15 13:57:47 -08:00
Sage Weil
ae0c2bbb50 qa: pull qa stuff from ceph.com ceph.git mirror
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-15 09:20:24 -08:00
tamil
e2b8e0f13c modified the perl file name
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2013-02-12 10:55:39 -08:00
tamil
2783fce24e work unit for rbd cli tests
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2013-02-11 18:11:26 -08:00
Sage Weil
3f4d8532ea Merge remote-tracking branch 'gh/next' 2013-02-11 17:12:22 -08:00
Sage Weil
3d5969d680 qa/rbd: +x on map-snapshot-io.sh
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-11 08:48:44 -08:00
Danny Al-Gaaf
7b89ee666b ceph-test: give binaries from ceph-test package useful names
The files from the ceph-test subpackage are installed to /usr/bin,
give them more useful names to make sure that the user know they
belong to ceph. add a 'ceph_' prefix and change some test* binaries
to ceph_test_*.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-10 18:33:56 +01:00
Sage Weil
b970d054ce qa: smalliobenchrbd workunit
Run a bunch of parallel smalliobenchrbd processes.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-03 09:28:22 -08:00
Alex Elder
97c6619d3f qa: update the rbd/concurrent.sh workunit
A few changes, now that a few rbd problems have been fixed.
First, the more substantive changes:
    - Generate a source file, and compare what's read back from rbd
      devices with the content of that file.
    - Write to the rbd device such that the written data spans
      an (assumed 4 MB) rbd object boundary, as well as starting
      and ending on non-page-aligned offsets.
    - Perform multiple reads on rbd devices: entirely within a range
      before any written data; beginning before but ending within
      written data; the exact written data (and validating what's
      read); beginning within written data but ending after it;
      reading after written data but within a written rbd object;
      and reading from an unwritten rbd object.
    - Have the sleep between iterations provide a non-integer value
      to avoid zero (or quantized) delays.

Also, some a little less substantive (but possibly informative):
    - Don't run with "set -x".  It produces a ton of noise that is
      not useful for this test.  This is an exerciser, looking
      really for system crashes during concurrent activity, and
      knowing which commands were (concurrently) active isn't going
      to help much in diagnosis.
    - Create two more directories, used to track the degree of
      concurrency (more or less) and the highest rbd id consumed.
      Files whose names are numbers are touched in each, and the
      highest at the end is the highest during the run.  This gets
      around issues passing environment info from sub-shells to the
      top-level shell.  As a bonus, it offers a better chance of
      avoiding problems due to concurrent update.
    - NAMESDIR is renamed NAMES_DIR, and it (and the others) is
      set up in the setup() function.
    - Increase the concurrency and iteration counts.
    - Move the default definitions before the ceph secrets stuff

Signed-off-by: Alex Elder <elder@inktank.com>
2013-01-31 11:55:59 -06:00
Sage Weil
c782d2ac53 qa: add test for rbd map and snapshots
This tests for the behavior reported in #3964.  It passes on the current
code, but fails on 3.2 in squeeze (and 32-bit?).

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-30 01:06:03 -08:00
Alex Elder
59ac4d3534 qa: add rbd/concurrent workunit
This defines a new workunit shell script that performs a bunch of
rbd operations concurrently in order to exercise code paths and
catch reference count and bad pointer problems.

Signed-off-by: Alex Elder <elder@inktank.com>
2013-01-29 16:42:44 -06:00
Sage Weil
1ba4c80bcf qa/workunits/rbd/copy.sh: use non-deprecated --image-format option
--format is deprecated.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-26 13:46:12 -08:00
Sage Weil
bbb86ec794 mon: safety interlock for pool deletion
Require that the pool name be passed twice along with an force option
before we irreversibly delete an entire pool of objects.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-26 13:45:12 -08:00
Dan Mick
00898c1860 rbd: allow copy of zero-length images. Includes simple test.
Fixes: #3765
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-01-09 16:11:51 -08:00
Josh Durgin
e0858fa899 Revert "librbd: ensure header is up to date after initial read"
Using assert version for linger ops doesn't work with retries,
since the version will change after the first send.
This reverts commit e177680903.

Conflicts:

	qa/workunits/rbd/watch_correct_version.sh
2013-01-02 12:32:33 -08:00
Josh Durgin
958addc0c9 rbd: open (source) image as read-only
This allows users without write access to copy, export and list
information about an image.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-12-30 00:06:11 -08:00
Dan Mick
6325a4800d import_export.sh: sparse import export
Add tests for:
   - sparse import makes expected sparse images
   - sparse export makes expected sparse files
   - sparse import from stdin also creates sparse images
   - import from partially-sparse file leads to partially-sparse image
   - import from stdin with zeros leads to sparse
   - export from zeros-image to file leads to sparse file

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-12-21 17:03:38 -08:00
Alex Elder
bf01b7b2e2 map-unmap.sh: use udevadm settle for synchronization
This script was heuristically using short sleep commands in order to
give udev activity time to complete.

There's a command "udevadm settle" which actually looks at the udev
queue and waits until its processing is done.  Much, much better.

This rearranges the get_id function a bit too, breaking it into one
function that gets the id and another that loops back and tries
again after a short delay in the event the get_id fails.

Signed-off-by: Alex Elder <elder@inktank.com>
2012-12-14 15:58:39 -06:00
Josh Durgin
e6dd0681d1 qa: echo commands run by rbd map-unmap workunit
It's hard to figure out what failed without this.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-12-13 08:29:10 -08:00
Alex Elder
dd3a24a647 create qa/workunits/rbd/map-unmap.sh
This adds a bash script that creates an rbd image, then repeatedly
maps and unmaps it for a specified duration (5 minutes by default).

Signed-off-by: Alex Elder <elder@inktank.com>
2012-11-28 17:22:49 -06:00
Dan Mick
80c506d4b9 rbd: fix import from stdin, add test
Make import work; do I/O in image native block size.
Note: creating sparse images is not currently attempted; could
scan for runs of zeros and write discontiguous chunks to image.

Fixes: #3503
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit c99d9c3ae7)
2012-11-28 11:45:31 -08:00
Dan Mick
fcebe04801 rbd: allow export to stdout, add tests
Fixes: #3502
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit a738f44bc4)
2012-11-28 11:45:27 -08:00
Dan Mick
919db19426 rbd workunit: Add tests for clones across pools
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit ece11b0ed9)
2012-11-27 14:06:33 -08:00
Dan Mick
5164075040 rbd workunit: Make "remove_images" silent
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 0be9b15b79)
2012-11-27 14:06:30 -08:00
Dan Mick
ca5549e8c9 rbd workunit: Add tests for cross-pool rename
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit a96ede944f)
2012-11-27 14:06:27 -08:00
Dan Mick
bbd343a1d1 rbd: tests for copy with explicit/implicit pool names
Validate change to not assume dest pool == src pool

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 39180430b9)
2012-11-27 14:06:23 -08:00
Dan Mick
0baa9275ea cls_rbd: send proper format of key to "last_read" for dir_list
rbd ls of format-2 images was looping on the first 64 (when more than 64
were present).  The key name passed to the omap layer needs to always
contain the prefix, and the "inside-the-loop next-chunk" statement
was missing the "add the prefix" call.

Also, add a test for listing 100 images, format 1 and 2.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-11-06 15:51:44 -08:00
Dan Mick
241569c595 rbd: allow removal of image even if rbd_children deletion fails
Users have been seeing failures where rbd rm is half-done; could be
because of outstanding watches on the rbd_header object.  The state
is that rbd_children no longer contains the child, but other pieces
remain; remove considers this a failure.

Fix: test for ENOENT from remove_child, and treat that as an ignorable
error and drive on.  Simulate this in copy.sh by removing the
rbd_children object altogether, which also results in ENOENT return
from remove_child.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-11-05 21:41:34 -08:00
Dan Mick
8518115e25 rbd cli tests: copy.sh was looking for old version of rbd ls -l output
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-10-09 17:13:49 -07:00
Josh Durgin
f1ad419282 qa: report success if race is not detected
This test still verifies that the race is handled correctly if it
occurs, but will no longer clutter test results with spurious failures
when the race is not reproduced.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-04 16:50:46 -07:00
Dan Mick
37ffb278c8 qa scripts: Replace cut -f 1 with awk '{print $1;}'
This is to handle TextTable output, which doesn't use tabs

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-04 17:04:09 -07:00
Dan Mick
61b2e4d6ac rbd: use TextTable to implement ls -l
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-04 15:20:29 -07:00
Josh Durgin
9e8f69a0da qa: try to reproduce a race more times
This was failing occassionally in the nightly runs.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-02 12:33:07 -07:00
Sage Weil
18921ed2ef Merge remote-tracking branch 'gh/wip-watch-header-race' 2012-09-27 13:37:52 -07:00
Josh Durgin
e177680903 librbd: ensure header is up to date after initial read
Use an assert version op in combination with our watch, and re-read
the header until it's not stale. Header updates are infrequent, so
this should not cause any delay with normal use.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-24 12:09:46 -07:00
Sage Weil
0c07607fb8 qa: move all rados class unit tests into qa/workunits/cls
This includes the existing rbd one; teh suite is getting fixed to match.

See #3097.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-20 15:12:39 -07:00
Alex Elder
ed43d4de12 rbd/copy.sh: fix typo
Or maybe it was a spello, or a thinko, or something.  In any case
I'm pretty sure Josh intended to call the function he added in
commit 78d6a60ca, and not the non-existent "test_import_args".

Signed-off-by: Alex Elder <elder@inktank.com>
2012-09-18 22:51:10 -05:00
Josh Durgin
f530659786 Merge remote branch 'origin/wip-librbd-locking'
Conflicts:
	qa/workunits/rbd/copy.sh

Reviewed-by: Sage Weil <sage.weil@inktank.com>
2012-09-18 16:06:25 -07:00
Josh Durgin
78d6a60c59 qa: test args for rbd import
Make sure that --pool/--dest-pool and --image/--dest all work
interchangeably.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-14 17:17:29 -07:00
Josh Durgin
eeaa92c471 rbd: add locking commands
The locker (entity_name_t) will be different each time the rbd
command line tool is run, so 'lock remove' is always breaking a lock.

Fixes: #2556
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-07 18:38:27 -07:00
Josh Durgin
fd1c634b13 qa: update rbd tests and runner
* no longer need to wait for watch timeout since #2948 was fixed
* use --format 2 instead of --new-format
* add test_cls_rbd to run-rbd-tests script

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-07 18:38:27 -07:00
Josh Durgin
9071764a6b qa: remove rbd image when done
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-30 11:19:53 -07:00
Josh Durgin
3dd65a897b qa: download tests from specified branch
These python tests aren't installed, so they need to be downloaded

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-13 09:42:27 -07:00
Josh Durgin
d82a502680 qa: add rbd remove tests
These check that removing an image still works if an rbd rm
command was interrupted partway through.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-02 14:18:21 -07:00