]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa: update TestVolumeClient for new blacklisting
authorJohn Spray <john.spray@redhat.com>
Thu, 18 May 2017 12:59:43 +0000 (08:59 -0400)
committerJohn Spray <john.spray@redhat.com>
Tue, 23 May 2017 09:22:18 +0000 (05:22 -0400)
Blacklisted clients will now proactively fail
outstanding operations, rather than blocking.

Signed-off-by: John Spray <john.spray@redhat.com>
qa/tasks/cephfs/test_volume_client.py

index e94e54a52f8154992b00d1dd18e855e2b91930ee..3c639bbfc418bb06c173bf72a9cd1f59a5cc4543 100644 (file)
@@ -490,12 +490,17 @@ vc.disconnect()
         )))
 
         # Evicted guest client, guest_mounts[0], should not be able to do
-        # anymore metadata ops. It behaves as if it has lost network
-        # connection.
-        background = guest_mounts[0].write_n_mb("rogue.bin", 1, wait=False)
-        # Approximate check for 'stuck' as 'still running after 10s'.
-        time.sleep(10)
-        self.assertFalse(background.finished)
+        # anymore metadata ops.  It should start failing all operations
+        # when it sees that its own address is in the blacklist.
+        try:
+            guest_mounts[0].write_n_mb("rogue.bin", 1)
+        except CommandFailedError:
+            pass
+        else:
+            raise RuntimeError("post-eviction write should have failed!")
+
+        # The blacklisted guest client should now be unmountable
+        guest_mounts[0].umount_wait()
 
         # Guest client, guest_mounts[1], using the same auth ID 'guest', but
         # has mounted the other volume, should be able to use its volume
@@ -515,8 +520,6 @@ vc.disconnect()
                 guest_entity=guest_entity
             )))
 
-        # We must hard-umount the one that we evicted
-        guest_mounts[0].umount_wait(force=True)
 
     def test_purge(self):
         """