diff options
Diffstat (limited to 'qa')
-rw-r--r-- | qa/suites/rgw/tempest/tasks/rgw_tempest.yaml | 2 | ||||
-rw-r--r-- | qa/tasks/ceph_manager.py | 2 | ||||
-rw-r--r-- | qa/tasks/cephfs/cephfs_test_case.py | 16 | ||||
-rw-r--r-- | qa/tasks/cephfs/mount.py | 6 | ||||
-rw-r--r-- | qa/tasks/cephfs/test_client_recovery.py | 12 | ||||
-rw-r--r-- | qa/tasks/cephfs/test_misc.py | 2 | ||||
-rw-r--r-- | qa/tasks/cephfs/test_sessionmap.py | 8 | ||||
-rw-r--r-- | qa/tasks/cephfs/test_volume_client.py | 4 | ||||
-rw-r--r-- | qa/tasks/fs.py | 6 | ||||
-rw-r--r-- | qa/tasks/mgr/dashboard/test_auth.py | 6 | ||||
-rw-r--r-- | qa/tasks/tempest.py | 8 | ||||
-rwxr-xr-x | qa/workunits/cephtool/test.sh | 37 | ||||
-rwxr-xr-x | qa/workunits/rbd/krbd_exclusive_option.sh | 6 | ||||
-rwxr-xr-x | qa/workunits/rbd/rbd_mirror_journal.sh | 6 | ||||
-rwxr-xr-x | qa/workunits/rbd/rbd_mirror_snapshot.sh | 6 | ||||
-rwxr-xr-x | qa/workunits/rbd/test_lock_fence.sh | 4 |
16 files changed, 67 insertions, 64 deletions
diff --git a/qa/suites/rgw/tempest/tasks/rgw_tempest.yaml b/qa/suites/rgw/tempest/tasks/rgw_tempest.yaml index 99c776df788..c08272dcd94 100644 --- a/qa/suites/rgw/tempest/tasks/rgw_tempest.yaml +++ b/qa/suites/rgw/tempest/tasks/rgw_tempest.yaml @@ -40,7 +40,7 @@ tasks: object-storage-feature-enabled: container_sync: false discoverability: true - blacklist: + blocklist: - .*test_account_quotas_negative.AccountQuotasNegativeTest.test_user_modify_quota - .*test_container_acl_negative.ObjectACLsNegativeTest.* - .*test_container_services_negative.ContainerNegativeTest.test_create_container_metadata_.* diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index 0ea99210b65..4c9c54ed9ff 100644 --- a/qa/tasks/ceph_manager.py +++ b/qa/tasks/ceph_manager.py @@ -1445,7 +1445,7 @@ class CephManager: wait for all specified osds, but some of them could be moved out of osdmap, so we cannot get their updated stat seq from monitor anymore. in that case, you need - to pass a blacklist. + to pass a blocklist. :param wait_for_mon: wait for mon to be synced with mgr. 0 to disable it. (5 min by default) """ diff --git a/qa/tasks/cephfs/cephfs_test_case.py b/qa/tasks/cephfs/cephfs_test_case.py index 42d78f8caef..e0648f94756 100644 --- a/qa/tasks/cephfs/cephfs_test_case.py +++ b/qa/tasks/cephfs/cephfs_test_case.py @@ -104,17 +104,17 @@ class CephFSTestCase(CephTestCase): self.fs = None # is now invalid! self.recovery_fs = None - # In case anything is in the OSD blacklist list, clear it out. This is to avoid - # the OSD map changing in the background (due to blacklist expiry) while tests run. + # In case anything is in the OSD blocklist list, clear it out. This is to avoid + # the OSD map changing in the background (due to blocklist expiry) while tests run. try: - self.mds_cluster.mon_manager.raw_cluster_cmd("osd", "blacklist", "clear") + self.mds_cluster.mon_manager.raw_cluster_cmd("osd", "blocklist", "clear") except CommandFailedError: # Fallback for older Ceph cluster - blacklist = json.loads(self.mds_cluster.mon_manager.raw_cluster_cmd("osd", - "dump", "--format=json-pretty"))['blacklist'] - log.info("Removing {0} blacklist entries".format(len(blacklist))) - for addr, blacklisted_at in blacklist.items(): - self.mds_cluster.mon_manager.raw_cluster_cmd("osd", "blacklist", "rm", addr) + blocklist = json.loads(self.mds_cluster.mon_manager.raw_cluster_cmd("osd", + "dump", "--format=json-pretty"))['blocklist'] + log.info("Removing {0} blocklist entries".format(len(blocklist))) + for addr, blocklisted_at in blocklist.items(): + self.mds_cluster.mon_manager.raw_cluster_cmd("osd", "blocklist", "rm", addr) client_mount_ids = [m.client_id for m in self.mounts] # In case the test changes the IDs of clients, stash them so that we can diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index da346f944aa..83524f57cea 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -433,10 +433,10 @@ class CephFSMount(object): finally: self.umount_wait() - def is_blacklisted(self): + def is_blocklisted(self): addr = self.get_global_addr() - blacklist = json.loads(self.fs.mon_manager.raw_cluster_cmd("osd", "blacklist", "ls", "--format=json")) - for b in blacklist: + blocklist = json.loads(self.fs.mon_manager.raw_cluster_cmd("osd", "blocklist", "ls", "--format=json")) + for b in blocklist: if addr == b["addr"]: return True return False diff --git a/qa/tasks/cephfs/test_client_recovery.py b/qa/tasks/cephfs/test_client_recovery.py index d1f9e245153..bec07ec2739 100644 --- a/qa/tasks/cephfs/test_client_recovery.py +++ b/qa/tasks/cephfs/test_client_recovery.py @@ -619,10 +619,10 @@ class TestClientRecovery(CephFSTestCase): self.mount_a.kill_cleanup() - def test_reconnect_after_blacklisted(self): + def test_reconnect_after_blocklisted(self): """ - Test reconnect after blacklisted. - - writing to a fd that was opened before blacklist should return -EBADF + Test reconnect after blocklisted. + - writing to a fd that was opened before blocklist should return -EBADF - reading/writing to a file with lost file locks should return -EIO - readonly fd should continue to work """ @@ -640,7 +640,7 @@ class TestClientRecovery(CephFSTestCase): self.mount_a.wait_until_mounted() - path = os.path.join(self.mount_a.mountpoint, 'testfile_reconnect_after_blacklisted') + path = os.path.join(self.mount_a.mountpoint, 'testfile_reconnect_after_blocklisted') pyscript = dedent(""" import os import sys @@ -660,7 +660,7 @@ class TestClientRecovery(CephFSTestCase): os.read(fd4, 1); fcntl.flock(fd4, fcntl.LOCK_SH | fcntl.LOCK_NB) - print("blacklist") + print("blocklist") sys.stdout.flush() sys.stdin.readline() @@ -669,7 +669,7 @@ class TestClientRecovery(CephFSTestCase): time.sleep(10); # trigger 'open session' message. kclient relies on 'session reject' message - # to detect if itself is blacklisted + # to detect if itself is blocklisted try: os.stat("{path}.1") except: diff --git a/qa/tasks/cephfs/test_misc.py b/qa/tasks/cephfs/test_misc.py index 44d9ee420be..14a7e662b10 100644 --- a/qa/tasks/cephfs/test_misc.py +++ b/qa/tasks/cephfs/test_misc.py @@ -149,7 +149,7 @@ class TestMisc(CephFSTestCase): cap_waited, session_timeout )) - self.assertTrue(self.mount_a.is_blacklisted()) + self.assertTrue(self.mount_a.is_blocklisted()) cap_holder.stdin.close() try: cap_holder.wait() diff --git a/qa/tasks/cephfs/test_sessionmap.py b/qa/tasks/cephfs/test_sessionmap.py index f1c535eb03d..13dc9e8cf52 100644 --- a/qa/tasks/cephfs/test_sessionmap.py +++ b/qa/tasks/cephfs/test_sessionmap.py @@ -188,12 +188,12 @@ class TestSessionMap(CephFSTestCase): with self.assertRaises(CommandFailedError): self.mount_b.mount_wait(mount_path="/foo/bar") - def test_session_evict_blacklisted(self): + def test_session_evict_blocklisted(self): """ - Check that mds evicts blacklisted client + Check that mds evicts blocklisted client """ if not isinstance(self.mount_a, FuseMount): - self.skipTest("Requires FUSE client to use is_blacklisted()") + self.skipTest("Requires FUSE client to use is_blocklisted()") self.fs.set_max_mds(2) status = self.fs.wait_for_daemons() @@ -214,7 +214,7 @@ class TestSessionMap(CephFSTestCase): mount_a_client_id = self.mount_a.get_global_id() self.fs.mds_asok(['session', 'evict', "%s" % mount_a_client_id], mds_id=self.fs.get_rank(rank=0, status=status)['name']) - self.wait_until_true(lambda: self.mount_a.is_blacklisted(), timeout=30) + self.wait_until_true(lambda: self.mount_a.is_blocklisted(), timeout=30) # 10 seconds should be enough for evicting client time.sleep(10) diff --git a/qa/tasks/cephfs/test_volume_client.py b/qa/tasks/cephfs/test_volume_client.py index 785a6914772..b7fd51dac47 100644 --- a/qa/tasks/cephfs/test_volume_client.py +++ b/qa/tasks/cephfs/test_volume_client.py @@ -461,7 +461,7 @@ vc.disconnect() # Evicted guest client, guest_mounts[0], should not be able to do # anymore metadata ops. It should start failing all operations - # when it sees that its own address is in the blacklist. + # when it sees that its own address is in the blocklist. try: guest_mounts[0].write_n_mb("rogue.bin", 1) except CommandFailedError: @@ -469,7 +469,7 @@ vc.disconnect() else: raise RuntimeError("post-eviction write should have failed!") - # The blacklisted guest client should now be unmountable + # The blocklisted guest client should now be unmountable guest_mounts[0].umount_wait() # Guest client, guest_mounts[1], using the same auth ID 'guest', but diff --git a/qa/tasks/fs.py b/qa/tasks/fs.py index 70caceaf22d..4f7a3e2060b 100644 --- a/qa/tasks/fs.py +++ b/qa/tasks/fs.py @@ -55,11 +55,11 @@ def clients_evicted(ctx, config): mount = mounts.get(client) if mount is not None: if evicted: - log.info("confirming client {} is blacklisted".format(client)) - assert mount.is_blacklisted() + log.info("confirming client {} is blocklisted".format(client)) + assert mount.is_blocklisted() elif client in no_session: log.info("client {} should not be evicted but has no session with an MDS".format(client)) - mount.is_blacklisted() # for debugging + mount.is_blocklisted() # for debugging should_assert = True if should_assert: raise RuntimeError("some clients which should not be evicted have no session with an MDS?") diff --git a/qa/tasks/mgr/dashboard/test_auth.py b/qa/tasks/mgr/dashboard/test_auth.py index e76708a9c43..12ff14304db 100644 --- a/qa/tasks/mgr/dashboard/test_auth.py +++ b/qa/tasks/mgr/dashboard/test_auth.py @@ -99,12 +99,12 @@ class AuthTest(DashboardTestCase): self._ceph_cmd(['dashboard', 'set-jwt-token-ttl', '28800']) self.set_jwt_token(None) - def test_remove_from_blacklist(self): + def test_remove_from_blocklist(self): self._ceph_cmd(['dashboard', 'set-jwt-token-ttl', '5']) self._post("/api/auth", {'username': 'admin', 'password': 'admin'}) self.assertStatus(201) self.set_jwt_token(self.jsonBody()['token']) - # the following call adds the token to the blacklist + # the following call adds the token to the blocklist self._post("/api/auth/logout") self.assertStatus(200) self._get("/api/host") @@ -115,7 +115,7 @@ class AuthTest(DashboardTestCase): self._post("/api/auth", {'username': 'admin', 'password': 'admin'}) self.assertStatus(201) self.set_jwt_token(self.jsonBody()['token']) - # the following call removes expired tokens from the blacklist + # the following call removes expired tokens from the blocklist self._post("/api/auth/logout") self.assertStatus(200) diff --git a/qa/tasks/tempest.py b/qa/tasks/tempest.py index cf211b0b2cf..cee942e37e6 100644 --- a/qa/tasks/tempest.py +++ b/qa/tasks/tempest.py @@ -148,8 +148,8 @@ def run_tempest(ctx, config): log.info('Configuring Tempest') for (client, cconf) in config.items(): - blacklist = cconf.get('blacklist', []) - assert isinstance(blacklist, list) + blocklist = cconf.get('blocklist', []) + assert isinstance(blocklist, list) run_in_tempest_venv(ctx, client, [ 'tempest', @@ -159,7 +159,7 @@ def run_tempest(ctx, config): '--workspace', 'rgw', '--regex', '^tempest.api.object_storage', - '--black-regex', '|'.join(blacklist) + '--black-regex', '|'.join(blocklist) ]) try: yield @@ -219,7 +219,7 @@ def task(ctx, config): object-storage-feature-enabled: container_sync: false discoverability: false - blacklist: + blocklist: # please strip half of these items after merging PRs #15369 # and #12704 - .*test_list_containers_reverse_order.* diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index b518137fc5d..49a4ca3996b 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -1386,34 +1386,37 @@ function test_mon_config_key() function test_mon_osd() { # - # osd blacklist + # osd blocklist # bl=192.168.0.1:0/1000 - ceph osd blacklist add $bl - ceph osd blacklist ls | grep $bl - ceph osd blacklist ls --format=json-pretty | sed 's/\\\//\//' | grep $bl + ceph osd blocklist add $bl + ceph osd blocklist ls | grep $bl + ceph osd blocklist ls --format=json-pretty | sed 's/\\\//\//' | grep $bl ceph osd dump --format=json-pretty | grep $bl ceph osd dump | grep $bl - ceph osd blacklist rm $bl - ceph osd blacklist ls | expect_false grep $bl + ceph osd blocklist rm $bl + ceph osd blocklist ls | expect_false grep $bl bl=192.168.0.1 # test without nonce, invalid nonce - ceph osd blacklist add $bl - ceph osd blacklist ls | grep $bl - ceph osd blacklist rm $bl - ceph osd blacklist ls | expect_false grep $bl - expect_false "ceph osd blacklist $bl/-1" - expect_false "ceph osd blacklist $bl/foo" + ceph osd blocklist add $bl + ceph osd blocklist ls | grep $bl + ceph osd blocklist rm $bl + ceph osd blocklist ls | expect_false grep $bl + expect_false "ceph osd blocklist $bl/-1" + expect_false "ceph osd blocklist $bl/foo" # test with wrong address - expect_false "ceph osd blacklist 1234.56.78.90/100" + expect_false "ceph osd blocklist 1234.56.78.90/100" # Test `clear` - ceph osd blacklist add $bl - ceph osd blacklist ls | grep $bl - ceph osd blacklist clear - ceph osd blacklist ls | expect_false grep $bl + ceph osd blocklist add $bl + ceph osd blocklist ls | grep $bl + ceph osd blocklist clear + ceph osd blocklist ls | expect_false grep $bl + + # deprecated syntax? + ceph osd blacklist ls # # osd crush diff --git a/qa/workunits/rbd/krbd_exclusive_option.sh b/qa/workunits/rbd/krbd_exclusive_option.sh index 09edc138654..f8493ce9894 100755 --- a/qa/workunits/rbd/krbd_exclusive_option.sh +++ b/qa/workunits/rbd/krbd_exclusive_option.sh @@ -53,13 +53,13 @@ function assert_unlocked() { grep '"lockers":\[\]' } -function blacklist_add() { +function blocklist_add() { local dev_id="${1#/dev/rbd}" local client_addr client_addr="$(< $SYSFS_DIR/$dev_id/client_addr)" - ceph osd blacklist add $client_addr + ceph osd blocklist add $client_addr } SYSFS_DIR="/sys/bus/rbd/devices" @@ -203,7 +203,7 @@ assert_unlocked DEV=$(sudo rbd map $IMAGE_NAME) assert_locked $DEV dd if=/dev/urandom of=$DEV bs=4k count=10 oflag=direct -{ sleep 10; blacklist_add $DEV; } & +{ sleep 10; blocklist_add $DEV; } & PID=$! expect_false dd if=/dev/urandom of=$DEV bs=4k count=200000 oflag=direct wait $PID diff --git a/qa/workunits/rbd/rbd_mirror_journal.sh b/qa/workunits/rbd/rbd_mirror_journal.sh index da856861b0c..84fd2424f4b 100755 --- a/qa/workunits/rbd/rbd_mirror_journal.sh +++ b/qa/workunits/rbd/rbd_mirror_journal.sh @@ -547,7 +547,7 @@ wait_for_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+replaying' 'primary if [ -z "${RBD_MIRROR_USE_RBD_MIRROR}" ]; then # teuthology will trash the daemon - testlog "TEST: no blacklists" - CEPH_ARGS='--id admin' ceph --cluster ${CLUSTER1} osd blacklist ls 2>&1 | grep -q "listed 0 entries" - CEPH_ARGS='--id admin' ceph --cluster ${CLUSTER2} osd blacklist ls 2>&1 | grep -q "listed 0 entries" + testlog "TEST: no blocklists" + CEPH_ARGS='--id admin' ceph --cluster ${CLUSTER1} osd blocklist ls 2>&1 | grep -q "listed 0 entries" + CEPH_ARGS='--id admin' ceph --cluster ${CLUSTER2} osd blocklist ls 2>&1 | grep -q "listed 0 entries" fi diff --git a/qa/workunits/rbd/rbd_mirror_snapshot.sh b/qa/workunits/rbd/rbd_mirror_snapshot.sh index 7ab2239db03..64527390266 100755 --- a/qa/workunits/rbd/rbd_mirror_snapshot.sh +++ b/qa/workunits/rbd/rbd_mirror_snapshot.sh @@ -448,7 +448,7 @@ wait_for_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+replaying' if [ -z "${RBD_MIRROR_USE_RBD_MIRROR}" ]; then # teuthology will trash the daemon - testlog "TEST: no blacklists" - CEPH_ARGS='--id admin' ceph --cluster ${CLUSTER1} osd blacklist ls 2>&1 | grep -q "listed 0 entries" - CEPH_ARGS='--id admin' ceph --cluster ${CLUSTER2} osd blacklist ls 2>&1 | grep -q "listed 0 entries" + testlog "TEST: no blocklists" + CEPH_ARGS='--id admin' ceph --cluster ${CLUSTER1} osd blocklist ls 2>&1 | grep -q "listed 0 entries" + CEPH_ARGS='--id admin' ceph --cluster ${CLUSTER2} osd blocklist ls 2>&1 | grep -q "listed 0 entries" fi diff --git a/qa/workunits/rbd/test_lock_fence.sh b/qa/workunits/rbd/test_lock_fence.sh index fd8fa6347d2..7cf2d21c53b 100755 --- a/qa/workunits/rbd/test_lock_fence.sh +++ b/qa/workunits/rbd/test_lock_fence.sh @@ -26,7 +26,7 @@ clientid=$(rbd lock list $IMAGE | tail -1 | awk '{print $1;}') echo "clientaddr: $clientaddr" echo "clientid: $clientid" -ceph osd blacklist add $clientaddr || exit 1 +ceph osd blocklist add $clientaddr || exit 1 wait $iochild rbdrw_exitcode=$? @@ -39,7 +39,7 @@ else fi set -e -ceph osd blacklist rm $clientaddr +ceph osd blocklist rm $clientaddr rbd lock remove $IMAGE $LOCKID "$clientid" # rbdrw will have exited with an existing watch, so, until #3527 is fixed, # hang out until the watch expires |