Commit Graph

417 Commits

Author SHA1 Message Date
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
Sage Weil
45e19510a3 Merge remote-tracking branch 'gh/next' 2013-05-13 17:17:43 -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
82211f2197 qa: rsync test: exclude /usr/local
Some plana have non-world-readable crap in /usr/local/samba.  Avoid
/usr/local entirely for that and any similar landmines.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-11 17:36:13 -07:00
Sage Weil
a89d889b0d Merge pull request #165 from dachary/wip-4321
unit tests for FileStore::_detect_fs when running on ext4
2013-05-08 11:44:24 -07:00
Sage Weil
c693ba5732 rados: add whole-object 'clonedata' command
Clone the data stream from one object to another.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-06 16:45:12 -07:00
Danny Al-Gaaf
eb3350e4b0 test_mon_config_key.py: fix some more naming of local vars
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 16:02:20 +02:00
Danny Al-Gaaf
7436542937 test_mon_config_key.py: fix naming of local variable opLOG
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 16:02:02 +02:00
Danny Al-Gaaf
9d3b4fd788 test_mon_config_key.py: fix naming of local variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 16:01:16 +02:00
Danny Al-Gaaf
04075722bc fix "Instance of 'list' has no 'split' member"
Cast with str() to fix issue.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 16:00:09 +02:00
Danny Al-Gaaf
c792ea6707 test_mon_config_key.py: fix naming of local variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 15:57:20 +02:00
Danny Al-Gaaf
912bb82c72 test_mon_config_key.py: fix naming of global variables/constants
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 15:56:30 +02:00
Danny Al-Gaaf
1464169a26 test_mon_config_key.py: add missing space after comma
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 15:56:19 +02:00
Danny Al-Gaaf
16c565068b test_mon_config_key.py: remove unnecessary semicolon
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 15:56:14 +02:00
Danny Al-Gaaf
f601eb9053 test_mon_config_key.py: fix bad indentation
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 15:55:19 +02: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
29f9db1980 mon: fix crush unit tests for idempotency
Signed-off-by: Sage Weil <sage@inktank.com>
2013-04-03 15:45:34 -07:00
Dan Mick
cfd32fff7c test_mon_config_key.py: fix 'del' to clean up correctly internally 2013-04-02 15:09:43 -07:00
Loic Dachary
574051f8da unit tests for FileStore::_detect_fs when running on ext4
unit tests are added in test/filestore/store_test.cc for the
FileStore::_detect_fs method, when using ext4. It tests the following
situations:

 * without user_xattr, ext4 fails
 * mounted with user_xattr, ext4 fails if filestore_xattr_use_omap is false
 * mounted with user_xattr, ext4 succeeds if filestore_xattr_use_omap is true

The tests are grouped in an ext4 dedicated class

  TEST(EXT4StoreTest, _detect_fs)

The qa/workunits/filestore/filestore.sh script is added to prepare the
environment required for the unit tests ( create an image file,
formats it with ext4 etc.). It runs ceph_test_filestore with a sudo
to allow it to mount(2) and umount(2) the ext4 file system. It is
called with

  ceph_test_filestore --gtest_filter=EXT4StoreTest.*

to only run the ext4 dependent tests.

The filestore.sh script is meant to be used as part of teuthology
in order to increase the code coverage for src/os/FileStore.cc. It is
self tested and can be checked from the source directory with

  CEPH_TEST_FILESTORE=../../../src/ceph_test_filestore filestore.sh TEST

http://tracker.ceph.com/issues/4321 refs #4321

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-04-02 13:10:37 +02:00
João Eduardo Luís
0e1f504234 Merge pull request #183 from ceph/wip-4313-b
qa: workunits: mon: test 'config-key' store

Reviewed-by: Sage Weil <sage@inktank.com>
2013-04-01 15:57:04 -07:00
Joao Eduardo Luis
677867d088 qa: workunits: mon: test 'config-key' store
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-04-01 16:11:01 +01: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
Sage Weil
e611937f3e mon: OSDMonitor: add 'osd pool set-quota' command
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-29 17:59:35 -07:00
Sage Weil
3f2e71169a mon: fix crush_ops.sh tests
Make it work.  Also, make note that these aren't handled idempotently by
the mon currently.  Doh!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-26 22:47:37 -07:00
Joe Buck
503ed9ee49 testing: fix hadoop-internal-test
Remove now superfluous directory changes
that are causing tests to fail.
This code should have been removed when we transitioned
from running tests with Ant to using Java to run the tests.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
2013-03-26 16:08:51 -07:00
Sage Weil
eae1532ca1 mon, crush: add some tests to build a DAG via the cli
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-22 15:15:38 -07:00
Danny Al-Gaaf
fc41684e99 qa/workunits/direct_io/test_sync_io.c: add proper error handling
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 16:56:03 +01:00
Danny Al-Gaaf
a8a5683e6d test_short_dio_read.c: add proper error handling
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 16:37:37 +01:00
Sage Weil
a2ac9358a3 qa: add 16MB direct-io write test
See bug #2657.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-18 14:13:29 -07:00
Sam Lang
2678db532a qa/workunits/restart: Add test to check backtrace
This script uses the python bindings to libcephfs and rados
to create files and check the correctness of the backtrace
written to the 'parent' xattr on the first object (if its
a file) or inode (if its a dir).  The script includes test cases
that kill the mds at specific kill points and restart it through
teuthology using the teuthology restart task.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-03-16 11:45:36 -05:00
Joe Buck
579d4ad77d testing: update wordcount to new code layout.
Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-03-12 01:23:35 -07:00
Joe Buck
09fa711093 testing: fix hadoop-internal-tests
The hadoop-internal-tests workunit needs
to be updated in light of our moving to
using stock Hadoop with our hadoop-cephfs
jars.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-03-11 23:41:27 -07:00
Joe Buck
6bd0969569 testing: updating hadoop-internal test
Small tweaks to the hadoop-internal test
to better use existing environment varaibles
and in response to the recent teuthology
changes.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
2013-02-26 10:53:35 -08:00
Joe Buck
f0ae38043a test: removing dead code
Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-02-26 10:46:55 -08:00
Joe Buck
500602817c test: updating libcephfs-java tests
Recent changes in teuthology necessitate
changes to libcephfs-java test case.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-02-26 10:46:47 -08: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