]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
qa/workunits: cephtool: don't remove self's key on auth tests 2758/head
authorJoao Eduardo Luis <joao@redhat.com>
Mon, 20 Oct 2014 17:00:15 +0000 (18:00 +0100)
committerJoao Eduardo Luis <joao@redhat.com>
Mon, 20 Oct 2014 17:00:15 +0000 (18:00 +0100)
commitac3c1cb5d0e17250fa147c11e42ed93e15b2184a
tree2201ed0e6ce72e93e2096028cf52f540ccf636e9
parent22877ba735f4992733a6b7fa7a3656cab0f1e227
qa/workunits: cephtool: don't remove self's key on auth tests

Suites run with CEPH_TEST_CLI_DUP_COMMAND=1, which will send a duplicate
command for every command issued with the 'ceph' tool.  Behavior is to
get a reply from the command and then send a duplicate, looking for the
same outcome (guaranteeing idempotency of the operations).  However, it
so happens that if you remove the entity's own key from the keyring and
you happen to be unlucky enough so that the client's connection gets
failed (we also run tests with connection failure injections), the
'ceph' tool won't be able to reconnect to the cluster to send the
duplicate command (as it's entity no longer exists in the cluster's
keyring).

We rewrite the test instead of resorting to ugly hacks to work around
this behavior, simply having a new 'role-definer' added by the existing
'role-definer' (which we weren't testing anyway, so bonus points for
that) and then have one removing the other (to test the procedure) and
finally using 'client.admin' to remove the last 'role-definer'.

Fixes: #9820
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
qa/workunits/cephtool/test.sh