rbd_map_image() echoes the id of the image and is used in command
substitution:
id=$(rbd_map_image "${image}")
Output from rbd map isn't consumed and clobbers the return.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This is a followup to 38a572011d ("qa: rbd/map-snapshot-io.sh: don't
chown sysfs files") for the rest of the workunits:
- /sys/bus/rbd/add_single_major is used if present, so chown'ing
/sys/bus/rbd/add doesn't help. Use sudo on rbd map instead.
- Don't modprobe or udevadm settle - rbd CLI tool takes care of that.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
/sys/bus/rbd/add_single_major is used if present, so chown'ing
/sys/bus/rbd/add doesn't help. Use sudo on rbd map instead.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
As a precaution to using cleanup for mass deletion of other
objects, only allow --prefix which begins with "benchmark_data."
Signed-off-by: David Zafman <dzafman@redhat.com>
Initially the asok commands were registered only after the image
replayer start (and unregistered on stop) because their names were
built using remote pool and image names, which became known only after
start.
Now, the asok commands are registered on the image replayer construction
using the temporary name "remote_pool_name/global_image_id". They are
re-registered using "remote_pool_name/remote_image_name" when the
image replayer is started. Also the commands are not unregistered on
the image replayer stop.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
With these set, this script can work in teuthology, where we want to
control the how daemons run and their log locations, valgrind
settings, etc. The workunit task always sets CEPH_ID, and allows
other env vars to be configured optionally.
The RBD_MIRROR_USE_EXISTING_CLUSTER option can also speed up local testing.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Daemon name is only useful to differentiate asok and pid filenames, so
just inline its use there. Everywhere else replace the 'daemon'
parameter with cluster or local_cluster as appropriate.
Remove the CLUSTER{1,2}_DAEMON vars as well, since they are no longer
used.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
"btrfs subvolume {list,delete}" needs root privilege even if the current
user owns this subvol. one can only list/delete he/she is the root, or
if the btrfs volume was mounted with "-o user_subvol_rm_allowed".
Signed-off-by: Kefu Chai <kchai@redhat.com>
in cf24535, we use $CEPH_ROOT to specify the $top_srcdir to unify
cmake and autotools, but this breaks ceph-qa-suite/tasks/workunit.py,
as it only clones the necessary qa/workunits directory, and does not
pass $CEPH_ROOT to the test scripts. so we need to set a default
$CEPH_ROOT if it is not set.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Replaced relative paths in test/cephtool-test-mon.sh,
qa/workunits/cephtool/test.sh, and test/cephtool-test-mon.sh
to work with CEPH_FOO environment variables set in cmake.
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Replaced relative paths in encode-decode-non-regression.sh
to work with CEPH_FOO environment variables set in
cmake.
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Moved all the libraries in CMAKE_BINARY_DIR/lib
and all the binaries in CMAKE_BINARY_DIR/bin. Set
various environment variables for test-ceph-helpers.
Put those variables throughout
qa/workunits/ceph-helpers.sh.
NOTE: This is a very rough draft of these fixes.
Signed-off-by: Ali Maredia <amaredia@redhat.com>
FreeBSD once in a while forgets to remove *pid files (this is probably a bug).
But taking care of it this way is probably much in line of what is actually needs to be done
Signed-off-by: Willem Jan Withagen wjw@digiware.nl
Protect a number of unstable/experimental features behind durable flags
https://github.com/ceph/ceph/pull/8383
Reviewed-by: John Spray <john.spray@redhat.com>
Method preprocess_remove_snaps() is designed to fast check whether
we can safely handle a remove-snaps-request without changing the osdmap.
The original design is to be able to handle snaps from multiple pools,
including those snaps even from a non-existent pool by simply skipping
over them. However, this method will quit on successfully detecting
any vaild snap which is truly needed to be removed and forward this
request to prepare_remove_snaps() for further processing.
From the above analysis, the prepare_remove_snaps() method will
theoretically also encounter some snaps which possibly belong to
non-existent pools.
This pr solves the above problem by adding a sanity check against
pool existense associated with the specified snap to be removed, which
shall be considered as a defensive move and makes prepare_remove_snaps()
stronger.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
The current code was waiting 10s to expect the file being put.
If the file was put in a shorter time than 10s, the test just waits for
nothing reducing the execution speed of that test.
This patch simply check if the file is actually available every second
during 10sec to exit prematurely.
This patch saves exactly 10 sec on a local system, surely a little bit
less on an infra but still saves time.
Signed-off-by: Erwan Velu <erwan@redhat.com>
The actual code double the wait time between two calls leading to a
possible 511s of waiting time which sounds a little bit excessive.
This patch offer to reduce the global wait time to 300s and test more
often the rados status to exit the loop earlier. In a local test, that
saves 6 secs per run.
Signed-off-by: Erwan Velu <erwan@redhat.com>