Add the update_partition function to reduce code duplication.
The action is made an argument although it always is -a because it will
be -d when deleting a partition.
Use the update_partition function in prepare_journal_dev
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Bug: http://tracker.ceph.com/issues/10096
Brief: Unmounting temporary mount point failed due to file being 'busy'.
Root cause could not be easily determined due to timing variances caused
by debug attempts. Race condition exists.
Solution: Implement a retry with incremental backoff as a viable
workaround. This workaround is okay because (1) Finding the root cause
would take a not insignificant amount of time/effort. (2) The workaround
is a more general fix for any process that might cause the exhibited
behavior.
Signed-off-by: Blaine Gardner <blaine.gardner@hp.com>
ghobject::dump must display shard_id + make ceph_objectstore_tool run from make check
Reviewed-by: David Zafman <dzafman@redhat.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
In this example of a write of v2 of the object being interrupted, OSD2
would never have any version of the D1 chunk. It only has the old v1
version of the D2 chunk.
Signed-off-by: Adam Spiers <aspiers@suse.com>
Adding testing of xattr for erasure coded shards
Fix error message when finding an unexpected xattr key
Signed-off-by: David Zafman <dzafman@redhat.com>
Do not silence the display of shard_id when generation is NO_GEN.
Erasure coded objects JSON representation used by ceph_objectstore_tool
need the shard_id to find the file containing the chunk.
Minimal testing is added to ceph_objectstore_tool.py
http://tracker.ceph.com/issues/10063Fixes: #10063
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Some environments do not have a /dev/tty. When opening /dev/tty fails,
skip the test instead of returning an error.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Call init-ceph in kill_daemons and add a call to kill_daemon when main
returns on error so that it never leaves daemons hanging.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
The stop.sh will stop all ceph-* processes. Use the init-ceph script
instead to selectively kill the daemons run by the vstart.sh cluster
used for ceph_objectstore_tool.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Set CEPH_DIR to a directory that is specific to ceph_objectstore_tool so
that it can run in parallel with other vstart.sh clusters.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
By default use only a small number of objects to speed up the tests. If
the argument "big" is given, use a large number of objects as it may
help find some problems.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
By default vstart.sh runs MDS but they are not needed for the tests,
only run mon and osd instead. Instead of using the default vstart.sh
port which may conflict with a already running vstart.sh, set the
CEPH_PORT=7400 which is not used by any other test run with make check.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Using #/usr/bin/env python instead of a hard coded path is more flexible
and can also be used to run from virtualenv.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Otherwise init-ceph.in will fail if hostname returns a fqdn. It
validates the host entry of the [osd.x] section does not contain dots.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
See discussion in http://tracker.ceph.com/issues/10114
Building with these changes allows output from readelf like this:
$ readelf -lW src/.libs/librados.so.2 | grep GNU_STACK
GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000
0x000000 RW 0x8
(note the absence of 'X' in 'RW')
Fixes: #10114
Signed-off-by: Dan Mick <dan.mick@redhat.com>