When a primiry image is being deleted, the mirrored image might
temporary be reported in error state, before deletion is propagated.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
- log to stderr;
- log status if a `wait_for` function failed;
- don't needlessly sleep in `wait_for` functions after the last
unsuccessful iteration;
- make `wait_for_pool_images` work for image removal case;
- fix `wait_for_pool_images` reset timeout (last_count set).
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
Snapshot rename operations utilize the (cluster) unique snapshot
sequence to prevent attempts at replays. When mirroring to a
different cluster, these sequences will not align.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
- This script is always called from a controlled environment
- use CEPH_BIN for exec's, otherwise QA sets PATH correctly
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
create temp directory and files in $TMPDIR. the $TMPDIR is hard-wired to
/tmp before this change, we'd better respect the env variable $TMPDIR,
so it would be more consistent, and easier to do the cleanup if any.
Signed-off-by: Kefu Chai <kchai@redhat.com>
If an image is being bootstrapped, it implies that the rbd-mirror
daemon currently has the image open. The removal API will prevent the
removal of any image that is opened by another client.
Works-around: http://tracker.ceph.com/issues/16555
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
this fixes failures like,
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/cephtool/test.sh:
line 32: ceph osd blacklist ls | grep 192.168.0.1: command not found
where the failure is not the "failure" we are expecting.
in our tests, following command
expect_false "ceph osd blacklist ls | grep 192.168.0.1"
is designed to to verify that "ceph osd blacklist ls | grep 192.168.0.1"
fails with non-zero return code. but expect_false() evaluates the command
line using plain "$@", which will send the arguments direct to the shell,
and $0 is "ceph auth get client.xx | grep caps | grep mon", which does
not exist and is not built-in command. so we need to check the grep
command instead.
for multiple piped command line, use
expect_false sh <<< "echo foo | grep bar | grep baz"
Signed-off-by: Kefu Chai <kchai@redhat.com>
we set the CEPH_CLI_TEST_DUP_COMMAND enn var to verify the successful
commands are idempotent. but some of them are just not. among the other
things:
- ceph tell mds.a exit
- ceph tell mds.a respawn
the respawn command restart the mds daemon, its bind port changes and
all run-time status are reset. so strictly speaking, even the from the
point of view of client, this command is not idempotent. further more,
it fails the test, if the client sends the 2nd command too soon. because
the monitor might not able to update the re-spawned mds address before
the client asking for the new fsmap. so the cephfs client will just
use the old address of the specified mds, and hence will send the
request to port no one is listening anymore.
Signed-off-by: Kefu Chai <kchai@redhat.com>
This will help to test edge cases where the remote image does
or does not own the exclusive lock when the sync starts.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When this test is failing and reach the limits, reading the log doesn't make
obvious that we reach them.
This simple patch adds the iterations numbers inside the output log.
Signed-off-by: Erwan Velu <erwan@redhat.com>