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>
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>
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>
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>
So we don't have to figure out which test is running from the output,
which can be difficult with the system tests.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Use qi to parse a strictly formatted set of key/value pairs. Be picky
about whitespace. Any subset of recognized keys is allowed. Parse the
same set of keys as the ceph.*.layout.* vxattrs.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 5551aa5b3b)
Use qi to parse a strictly formatted set of key/value pairs. Be picky
about whitespace. Any subset of recognized keys is allowed. Parse the
same set of keys as the ceph.*.layout.* vxattrs.
Signed-off-by: Sage Weil <sage@inktank.com>
The '! command' doesn't fail properly, even with -e, in bash (wtf!).
Also, the last pool deletion command succeeds because the pool
'--yes-i-really-really-mean-it' doesn't exist. So drop that test.
Signed-off-by: Sage Weil <sage@inktank.com>
Small tweaks to the hadoop-internal test
to better use existing environment varaibles.
Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
Changing the hadoop-internal tests to use the
newly added $TESTDIR environment variable.
Also, removed unneeded variables.
Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
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>
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>
Add error handling for open(), posix_memalign() and malloc().
Reuse code for read_* and write_* functions.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Add a test script that tests for creating a pool
and then setting the layout for a (pre-existing)
file to that pool.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
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>
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>