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>
With the changes to ensure that the commit position of a new
client is initialized to the minimum position of other clients,
the 'journal inspect/export' commands return zero records because
the master client has committed all of its entries.
Workaround this by restoring the initial commit position after
writing to the image.
Fixes: http://tracker.ceph.com/issues/16011
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
The debug messages from 'rbd bench-write' and 'rbd snap create',
in addition to the existing debug messages from rbd-mirror, make
it possible to determine the source of any image inconsistency.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This test repeatedly runs rbd bench-write, kills the process
randomly to create an unclean journal shutdown, and verifies
that the image content replicates correctly.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
* test_osd_bench: the injectargs call actually fails due to the spaces
at the beginning. so remove the spaces in args before sending it to
injectargs
* update/add some injectargs tests accordingly
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
A set of scripts used to bring up an OpenStack instance on one site,
connect a ceph cluster, add pools to store OpenStack glance images,
cinder volumes, nova vms, and cinder backups on rbd, and bring up a nova
compute node.