]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
blacklist -> blocklist
authorSage Weil <sage@newdream.net>
Mon, 15 Jun 2020 15:27:03 +0000 (10:27 -0500)
committerNeha Ojha <nojha@redhat.com>
Mon, 24 Aug 2020 19:53:08 +0000 (19:53 +0000)
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Neha Ojha <nojha@redhat.com>
138 files changed:
PendingReleaseNotes
doc/cephfs/eviction.rst
doc/cephfs/full.rst
doc/cephfs/mdcache.rst
doc/cephfs/mds-config-ref.rst
doc/man/8/ceph.rst
doc/man/8/mount.ceph.rst
doc/rados/operations/control.rst
doc/rados/operations/user-management.rst
doc/rbd/rbd-exclusive-locks.rst
qa/suites/rgw/tempest/tasks/rgw_tempest.yaml
qa/tasks/ceph_manager.py
qa/tasks/cephfs/cephfs_test_case.py
qa/tasks/cephfs/mount.py
qa/tasks/cephfs/test_client_recovery.py
qa/tasks/cephfs/test_misc.py
qa/tasks/cephfs/test_sessionmap.py
qa/tasks/cephfs/test_volume_client.py
qa/tasks/fs.py
qa/tasks/mgr/dashboard/test_auth.py
qa/tasks/tempest.py
qa/workunits/cephtool/test.sh
qa/workunits/rbd/krbd_exclusive_option.sh
qa/workunits/rbd/rbd_mirror_journal.sh
qa/workunits/rbd/rbd_mirror_snapshot.sh
qa/workunits/rbd/test_lock_fence.sh
src/client/Client.cc
src/client/Client.h
src/common/legacy_config_opts.h
src/common/options.cc
src/crimson/osd/pg.h
src/include/cephfs/libcephfs.h
src/include/rados.h
src/include/rados/librados.h
src/include/rados/librados.hpp
src/journal/JournalMetadata.cc
src/librados/RadosClient.cc
src/librados/RadosClient.h
src/librados/librados_c.cc
src/librados/librados_cxx.cc
src/librbd/ExclusiveLock.cc
src/librbd/ManagedLock.cc
src/librbd/ManagedLock.h
src/librbd/Watcher.cc
src/librbd/Watcher.h
src/librbd/cache/ObjectCacherObjectDispatch.cc
src/librbd/exclusive_lock/PreReleaseRequest.cc
src/librbd/internal.cc
src/librbd/managed_lock/AcquireRequest.cc
src/librbd/managed_lock/AcquireRequest.h
src/librbd/managed_lock/BreakRequest.cc
src/librbd/managed_lock/BreakRequest.h
src/librbd/watcher/RewatchRequest.cc
src/mds/FSMap.cc
src/mds/FSMap.h
src/mds/Locker.cc
src/mds/MDLog.cc
src/mds/MDSContext.cc
src/mds/MDSMap.h
src/mds/MDSRank.cc
src/mds/MDSRank.h
src/mds/Server.cc
src/mds/Server.h
src/mgr/BaseMgrModule.cc
src/mgr/Mgr.cc
src/mgr/MgrStandby.cc
src/mon/FSCommands.cc
src/mon/MDSMonitor.cc
src/mon/MDSMonitor.h
src/mon/MgrMap.h
src/mon/MgrMonitor.cc
src/mon/MonCap.cc
src/mon/MonCommands.h
src/mon/OSDMonitor.cc
src/mon/OSDMonitor.h
src/msg/msg_types.h
src/osd/OSD.cc
src/osd/OSDMap.cc
src/osd/OSDMap.h
src/osd/PeeringState.cc
src/osd/PeeringState.h
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h
src/osd/error_code.cc
src/osd/error_code.h
src/osdc/Journaler.cc
src/osdc/Objecter.cc
src/osdc/Objecter.h
src/pybind/mgr/cephadm/services/iscsi.py
src/pybind/rados/rados.pyx
src/rgw/rgw_op.h
src/test/librados_test_stub/LibradosTestStub.cc
src/test/librados_test_stub/MockTestMemRadosClient.h
src/test/librados_test_stub/TestIoCtxImpl.cc
src/test/librados_test_stub/TestMemCluster.cc
src/test/librados_test_stub/TestMemCluster.h
src/test/librados_test_stub/TestMemIoCtxImpl.cc
src/test/librados_test_stub/TestMemRadosClient.cc
src/test/librados_test_stub/TestMemRadosClient.h
src/test/librados_test_stub/TestRadosClient.h
src/test/librados_test_stub/TestWatchNotify.cc
src/test/librados_test_stub/TestWatchNotify.h
src/test/librbd/managed_lock/test_mock_AcquireRequest.cc
src/test/librbd/managed_lock/test_mock_BreakRequest.cc
src/test/librbd/mock/MockImageWatcher.h
src/test/librbd/rbdrw.py
src/test/librbd/test_librbd.cc
src/test/librbd/test_mock_ExclusiveLock.cc
src/test/librbd/test_mock_ManagedLock.cc
src/test/librbd/test_mock_Watcher.cc
src/test/pybind/test_ceph_argparse.py
src/test/pybind/test_rados.py
src/test/pybind/test_rbd.py
src/test/rbd_mirror/test_mock_ImageMap.cc
src/test/rbd_mirror/test_mock_InstanceReplayer.cc
src/test/rbd_mirror/test_mock_InstanceWatcher.cc
src/test/rbd_mirror/test_mock_LeaderWatcher.cc
src/test/rbd_mirror/test_mock_NamespaceReplayer.cc
src/test/rbd_mirror/test_mock_PoolReplayer.cc
src/test/rbd_mirror/test_mock_PoolWatcher.cc
src/test/rgw/test_rgw_iam_policy.cc
src/test/test_stress_watch.cc
src/tools/rbd_mirror/ImageDeleter.cc
src/tools/rbd_mirror/ImageReplayer.h
src/tools/rbd_mirror/InstanceReplayer.cc
src/tools/rbd_mirror/InstanceReplayer.h
src/tools/rbd_mirror/InstanceWatcher.cc
src/tools/rbd_mirror/Instances.cc
src/tools/rbd_mirror/LeaderWatcher.cc
src/tools/rbd_mirror/LeaderWatcher.h
src/tools/rbd_mirror/Mirror.cc
src/tools/rbd_mirror/NamespaceReplayer.cc
src/tools/rbd_mirror/NamespaceReplayer.h
src/tools/rbd_mirror/PoolReplayer.cc
src/tools/rbd_mirror/PoolReplayer.h
src/tools/rbd_mirror/PoolWatcher.cc
src/tools/rbd_mirror/PoolWatcher.h
src/tools/rbd_mirror/image_deleter/TrashWatcher.cc

index 53c7c310f766d4b6ad329f04c26631de8120ef74..c0189f712cf6e2dafc1dd3d2d6fc77df5659e952 100644 (file)
 * fs: Names of new FSs, volumes, subvolumes and subvolume groups can only
   contain alphanumeric and ``-``, ``_`` and ``.`` characters. Some commands
   or CephX credentials may not work with old FSs with non-conformant names.
+
+* `blacklist` has been replaced with `blocklist` throughout.  The following commands have changed:
+
+  - ``ceph osd blacklist ...`` are now ``ceph osd blocklist ...``
+  - ``ceph <tell|daemon> osd.<NNN> dump_blacklist`` is now ``ceph <tell|daemon> osd.<NNN> dump_blocklist``
+
+* The following config options have changed:
+
+  - ``mon osd blacklist default expire`` is now ``mon osd blocklist default expire``
+  - ``mon mds blacklist interval`` is now ``mon mds blocklist interval``
+  - ``mon mgr blacklist interval`` is now ''mon mgr blocklist interval``
+  - ``rbd blacklist on break lock`` is now ``rbd blocklist on break lock``
+  - ``rbd blacklist expire seconds`` is now ``rbd blocklist expire seconds``
+  - ``mds session blacklist on timeout`` is now ``mds session blocklist on timeout``
+  - ``mds session blacklist on evict`` is now ``mds session blocklist on evict``
+
+* The following librados API calls have changed:
+
+  - ``rados_blacklist_add`` is now ``rados_blocklist_add``; the former will issue a deprecation warning and be removed in a future release.
+  - ``rados.blacklist_add`` is now ``rados.blocklist_add`` in the C++ API.
+
+* The JSON output for the following commands now shows ``blocklist`` instead of ``blacklist``:
+
+  - ``ceph osd dump``
+  - ``ceph <tell|daemon> osd.<N> dump_blocklist``
index c64972c0ff10f43709c51be9f6c697ff17666943..eb6f70a8ed9d0d017f863aa17599a4cb12e19fc1 100644 (file)
@@ -89,30 +89,30 @@ do that using its unique ID, or various other attributes to identify it:
     ceph tell mds.0 client evict client_metadata.=4305
 
 
-Advanced: Un-blacklisting a client
+Advanced: Un-blocklisting a client
 ==================================
 
-Ordinarily, a blacklisted client may not reconnect to the servers: it
+Ordinarily, a blocklisted client may not reconnect to the servers: it
 must be unmounted and then mounted anew.
 
 However, in some situations it may be useful to permit a client that
 was evicted to attempt to reconnect.
 
-Because CephFS uses the RADOS OSD blacklist to control client eviction,
+Because CephFS uses the RADOS OSD blocklist to control client eviction,
 CephFS clients can be permitted to reconnect by removing them from
-the blacklist:
+the blocklist:
 
 ::
 
-    $ ceph osd blacklist ls
+    $ ceph osd blocklist ls
     listed 1 entries
     127.0.0.1:0/3710147553 2018-03-19 11:32:24.716146
-    $ ceph osd blacklist rm 127.0.0.1:0/3710147553
-    un-blacklisting 127.0.0.1:0/3710147553
+    $ ceph osd blocklist rm 127.0.0.1:0/3710147553
+    un-blocklisting 127.0.0.1:0/3710147553
 
 
 Doing this may put data integrity at risk if other clients have accessed
-files that the blacklisted client was doing buffered IO to.  It is also not
+files that the blocklisted client was doing buffered IO to.  It is also not
 guaranteed to result in a fully functional client -- the best way to get
 a fully healthy client back after an eviction is to unmount the client
 and do a fresh mount.
@@ -121,7 +121,7 @@ If you are trying to reconnect clients in this way, you may also
 find it useful to set ``client_reconnect_stale`` to true in the
 FUSE client, to prompt the client to try to reconnect.
 
-Advanced: Configuring blacklisting
+Advanced: Configuring blocklisting
 ==================================
 
 If you are experiencing frequent client evictions, due to slow
@@ -131,27 +131,27 @@ issue, then you may want to ask the MDS to be less strict.
 It is possible to respond to slow clients by simply dropping their
 MDS sessions, but permit them to re-open sessions and permit them
 to continue talking to OSDs.  To enable this mode, set
-``mds_session_blacklist_on_timeout`` to false on your MDS nodes.
+``mds_session_blocklist_on_timeout`` to false on your MDS nodes.
 
 For the equivalent behaviour on manual evictions, set
-``mds_session_blacklist_on_evict`` to false.
+``mds_session_blocklist_on_evict`` to false.
 
-Note that if blacklisting is disabled, then evicting a client will
+Note that if blocklisting is disabled, then evicting a client will
 only have an effect on the MDS you send the command to.  On a system
 with multiple active MDS daemons, you would need to send an
-eviction command to each active daemon.  When blacklisting is enabled 
+eviction command to each active daemon.  When blocklisting is enabled 
 (the default), sending an eviction command to just a single
-MDS is sufficient, because the blacklist propagates it to the others.
+MDS is sufficient, because the blocklist propagates it to the others.
 
-.. _background_blacklisting_and_osd_epoch_barrier:
+.. _background_blocklisting_and_osd_epoch_barrier:
 
-Background: Blacklisting and OSD epoch barrier
+Background: Blocklisting and OSD epoch barrier
 ==============================================
 
-After a client is blacklisted, it is necessary to make sure that
+After a client is blocklisted, it is necessary to make sure that
 other clients and MDS daemons have the latest OSDMap (including
-the blacklist entry) before they try to access any data objects
-that the blacklisted client might have been accessing.
+the blocklist entry) before they try to access any data objects
+that the blocklisted client might have been accessing.
 
 This is ensured using an internal "osdmap epoch barrier" mechanism.
 
@@ -159,12 +159,12 @@ The purpose of the barrier is to ensure that when we hand out any
 capabilities which might allow touching the same RADOS objects, the
 clients we hand out the capabilities to must have a sufficiently recent
 OSD map to not race with cancelled operations (from ENOSPC) or
-blacklisted clients (from evictions).
+blocklisted clients (from evictions).
 
 More specifically, the cases where an epoch barrier is set are:
 
- * Client eviction (where the client is blacklisted and other clients
-   must wait for a post-blacklist epoch to touch the same objects).
+ * Client eviction (where the client is blocklisted and other clients
+   must wait for a post-blocklist epoch to touch the same objects).
  * OSD map full flag handling in the client (where the client may
    cancel some OSD ops from a pre-full epoch, so other clients must
    wait until the full epoch or later before touching the same objects).
index 35c5ff266e922561b53d259d2acb89ccb744d102..fe0616cb6922df31555b7976835f9de6f3805491 100644 (file)
@@ -40,7 +40,7 @@ time the OSD full flag is sent.  Clients update the ``osd_epoch_barrier``
 when releasing capabilities on files affected by cancelled operations, in
 order to ensure that these cancelled operations do not interfere with
 subsequent access to the data objects by the MDS or other clients.  For
-more on the epoch barrier mechanism, see :ref:`background_blacklisting_and_osd_epoch_barrier`.
+more on the epoch barrier mechanism, see :ref:`background_blocklisting_and_osd_epoch_barrier`.
 
 Legacy (pre-hammer) behavior
 ----------------------------
index 7e397b29d396a536be083159ff755411fb19190f..f2e20238cc61be44d69168992a085d08f0fef88f 100644 (file)
@@ -22,7 +22,7 @@ Clients can request capabilities and will generally get them, but when
 there is competing access or memory pressure on the MDS, they may be
 **revoked**. When a capability is revoked, the client is responsible for
 returning it as soon as it is able. Clients that fail to do so in a
-timely fashion may end up **blacklisted** and unable to communicate with
+timely fashion may end up **blocklisted** and unable to communicate with
 the cluster.
 
 Since the cache is distributed, the MDS must take great care to ensure
index 83caf795b8977016361022def5dcec60c941a70c..0df15275bfcf4761467ac9aa83ad14be7222b2d6 100644 (file)
 :Default: ``15``
 
 
-``mds blacklist interval``
+``mds blocklist interval``
 
-:Description: The blacklist duration for failed MDSs in the OSD map. Note,
+:Description: The blocklist duration for failed MDSs in the OSD map. Note,
               this controls how long failed MDS daemons will stay in the
-              OSDMap blacklist. It has no effect on how long something is
-              blacklisted when the administrator blacklists it manually. For
-              example, ``ceph osd blacklist add`` will still use the default
-              blacklist time.
+              OSDMap blocklist. It has no effect on how long something is
+              blocklisted when the administrator blocklists it manually. For
+              example, ``ceph osd blocklist add`` will still use the default
+              blocklist time.
 :Type:  Float
 :Default: ``24.0*60.0``
 
index 78aeb5ef29eab4de552d8b09ccb5eecf8d45cf07..33077d95a6f5c8b2ff23a4b5046b648ae2dd2ffa 100644 (file)
@@ -37,7 +37,7 @@ Synopsis
 
 | **ceph** **mon** [ *add* \| *dump* \| *getmap* \| *remove* \| *stat* ] ...
 
-| **ceph** **osd** [ *blacklist* \| *blocked-by* \| *create* \| *new* \| *deep-scrub* \| *df* \| *down* \| *dump* \| *erasure-code-profile* \| *find* \| *getcrushmap* \| *getmap* \| *getmaxosd* \| *in* \| *ls* \| *lspools* \| *map* \| *metadata* \| *ok-to-stop* \| *out* \| *pause* \| *perf* \| *pg-temp* \| *force-create-pg* \| *primary-affinity* \| *primary-temp* \| *repair* \| *reweight* \| *reweight-by-pg* \| *rm* \| *destroy* \| *purge* \| *safe-to-destroy* \| *scrub* \| *set* \| *setcrushmap* \| *setmaxosd*  \| *stat* \| *tree* \| *unpause* \| *unset* ] ...
+| **ceph** **osd** [ *blocklist* \| *blocked-by* \| *create* \| *new* \| *deep-scrub* \| *df* \| *down* \| *dump* \| *erasure-code-profile* \| *find* \| *getcrushmap* \| *getmap* \| *getmaxosd* \| *in* \| *ls* \| *lspools* \| *map* \| *metadata* \| *ok-to-stop* \| *out* \| *pause* \| *perf* \| *pg-temp* \| *force-create-pg* \| *primary-affinity* \| *primary-temp* \| *repair* \| *reweight* \| *reweight-by-pg* \| *rm* \| *destroy* \| *purge* \| *safe-to-destroy* \| *scrub* \| *set* \| *setcrushmap* \| *setmaxosd*  \| *stat* \| *tree* \| *unpause* \| *unset* ] ...
 
 | **ceph** **osd** **crush** [ *add* \| *add-bucket* \| *create-or-move* \| *dump* \| *get-tunable* \| *link* \| *move* \| *remove* \| *rename-bucket* \| *reweight* \| *reweight-all* \| *reweight-subtree* \| *rm* \| *rule* \| *set* \| *set-tunable* \| *show-tunables* \| *tunables* \| *unlink* ] ...
 
@@ -613,27 +613,27 @@ osd
 Manage OSD configuration and administration. It uses some additional
 subcommands.
 
-Subcommand ``blacklist`` manage blacklisted clients. It uses some additional
+Subcommand ``blocklist`` manage blocklisted clients. It uses some additional
 subcommands.
 
-Subcommand ``add`` add <addr> to blacklist (optionally until <expire> seconds
+Subcommand ``add`` add <addr> to blocklist (optionally until <expire> seconds
 from now)
 
 Usage::
 
-       ceph osd blacklist add <EntityAddr> {<float[0.0-]>}
+       ceph osd blocklist add <EntityAddr> {<float[0.0-]>}
 
-Subcommand ``ls`` show blacklisted clients
+Subcommand ``ls`` show blocklisted clients
 
 Usage::
 
-       ceph osd blacklist ls
+       ceph osd blocklist ls
 
-Subcommand ``rm`` remove <addr> from blacklist
+Subcommand ``rm`` remove <addr> from blocklist
 
 Usage::
 
-       ceph osd blacklist rm <EntityAddr>
+       ceph osd blocklist rm <EntityAddr>
 
 Subcommand ``blocked-by`` prints a histogram of which OSDs are blocking their peers
 
index cbd7ab5834d9eb140e7dead47aec16f90cea7b19..f5d070867b9addc3020d177769b0a02e9c51732f 100644 (file)
@@ -82,15 +82,15 @@ Basic
     path to file containing the secret key to use with CephX
 
 :command:`recover_session=<no|clean>`
-    Set auto reconnect mode in the case where the client is blacklisted. The
+    Set auto reconnect mode in the case where the client is blocklisted. The
     available modes are ``no`` and ``clean``. The default is ``no``.
 
     - ``no``: never attempt to reconnect when client detects that it has been
-       blacklisted. Blacklisted clients will not attempt to reconnect and
+       blocklisted. Blocklisted clients will not attempt to reconnect and
        their operations will fail too.
 
     - ``clean``: client reconnects to the Ceph cluster automatically when it
-      detects that it has been blacklisted. During reconnect, client drops
+      detects that it has been blocklisted. During reconnect, client drops
       dirty data/metadata, invalidates page caches and writable file handles.
       After reconnect, file locks become stale because the MDS loses track of
       them. If an inode contains any stale file locks, read/write on the inode
index fdd7e3a90307806ab01707b174a4efcc7ae2a23e..7ec372282c2301d45d32bade19d5e4c3d02c8760 100644 (file)
@@ -237,18 +237,18 @@ Deployments utilizing Nautilus (or later revisions of Luminous and Mimic)
 that have no pre-Luminous cients may instead wish to instead enable the
 `balancer`` module for ``ceph-mgr``.
 
-Add/remove an IP address to/from the blacklist. When adding an address,
-you can specify how long it should be blacklisted in seconds; otherwise,
-it will default to 1 hour. A blacklisted address is prevented from
-connecting to any OSD. Blacklisting is most often used to prevent a
+Add/remove an IP address to/from the blocklist. When adding an address,
+you can specify how long it should be blocklisted in seconds; otherwise,
+it will default to 1 hour. A blocklisted address is prevented from
+connecting to any OSD. Blocklisting is most often used to prevent a
 lagging metadata server from making bad changes to data on the OSDs.
 
 These commands are mostly only useful for failure testing, as
-blacklists are normally maintained automatically and shouldn't need
+blocklists are normally maintained automatically and shouldn't need
 manual intervention. ::
 
-       ceph osd blacklist add ADDRESS[:source_port] [TIME]
-       ceph osd blacklist rm ADDRESS[:source_port]
+       ceph osd blocklist add ADDRESS[:source_port] [TIME]
+       ceph osd blocklist rm ADDRESS[:source_port]
 
 Creates/deletes a snapshot of a pool. ::
 
index 7b7713a83bd04d7699d7eade2376363c899cd850..6612f82ae859dc0b0b6d3cbb6325d81f490a95f0 100644 (file)
@@ -275,7 +275,7 @@ The following entries describe valid capability profiles:
 :Description: Gives a user permissions to manipulate RBD images. When used
               as a Monitor cap, it provides the minimal privileges required
               by an RBD client application; this includes the ability
-             to blacklist other client users. When used as an OSD cap, it
+             to blocklist other client users. When used as an OSD cap, it
               provides read-write access to the specified pool to an
              RBD client application. The Manager cap supports optional
               ``pool`` and ``namespace`` keyword arguments.
index cedc0d11191a790e9a1140ffd0a18083b20a32b5..f02d6d48f4492afaccd04f0142d5cfa85b5b3630 100644 (file)
@@ -62,8 +62,8 @@ accessing RBD data in an uncoordinated and destructive manner.
 
 Thus, in the event that a lock cannot be acquired in the standard
 graceful manner, the overtaking process not only breaks the lock, but
-also blacklists the previous lock holder. This is negotiated between
-the new client process and the Ceph Mon: upon receiving the blacklist
+also blocklists the previous lock holder. This is negotiated between
+the new client process and the Ceph Mon: upon receiving the blocklist
 request,
 
 * the Mon instructs the relevant OSDs to no longer serve requests from
@@ -73,10 +73,10 @@ request,
 * once the new client has acquired the lock, it can commence writing
   to the image.
 
-Blacklisting is thus a form of storage-level resource `fencing`_.
+Blocklisting is thus a form of storage-level resource `fencing`_.
 
-In order for blacklisting to work, the client must have the ``osd
-blacklist`` capability. This capability is included in the ``profile
+In order for blocklisting to work, the client must have the ``osd
+blocklist`` capability. This capability is included in the ``profile
 rbd`` capability profile, which should generally be set on all Ceph
 :ref:`client identities <user-management>` using RBD.
 
index 99c776df788916c2360d7cdc475c54affb92595f..c08272dcd94902bcae41c50b3d9f57000a8a2491 100644 (file)
@@ -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_.*
index 0ea99210b6531e5416abeff4cda9732246a5a4ea..4c9c54ed9ff827dfb12d8c29b884318affc0d4c3 100644 (file)
@@ -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)
         """
index 42d78f8caef31542edd9332bbbcd881083b766b4..e0648f9475636f6c912f9b4b70d30bf08f34becc 100644 (file)
@@ -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
index da346f944aa7174279e2a9ba61abf8858e37fa20..83524f57cea1822ddbfe08fbebe4a4edf73ccb9e 100644 (file)
@@ -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
index d1f9e245153c0de9796685a52e114eca498cf122..bec07ec2739efdf89c4e434dd929f500dc0ae64b 100644 (file)
@@ -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:
index 44d9ee420bedc5091edd09b8fbde2613bdcc2b35..14a7e662b1064c1a0f06196c5d6511b1bf24a5d3 100644 (file)
@@ -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()
index f1c535eb03d19a42c459ad9919bc5b53cf2986b1..13dc9e8cf520a4614a83fe6ba1f5bfad99b82a55 100644 (file)
@@ -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)
index 785a6914772d87de289a00478def91bc7a862b55..b7fd51dac47d1ff11be89d1fb415a9d5f8898adb 100644 (file)
@@ -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
index 70caceaf22d59db5c52b0756192ab6b08cbcc194..4f7a3e2060b6cb7525a7fdc59ed9dc7448640b67 100644 (file)
@@ -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?")
index e76708a9c43beed7f7123f5355db7c7745ff9afe..12ff14304db683e689ecbd173ae2a77988bc3957 100644 (file)
@@ -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)
 
index cf211b0b2cf51ab5e6a3785f76cdf57bef1ce26d..cee942e37e607718e30297431f2bae3b3358d6d0 100644 (file)
@@ -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.*
index b518137fc5dccb499382890e42679fd8c54790a3..49a4ca3996b5d8e8a12a1322d3ddaaa06e13e1fe 100755 (executable)
@@ -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
index 09edc138654384b048fa7cb7c7c415abb9f50228..f8493ce98943b98b9cc7e505fe0b5e2f31056ecb 100755 (executable)
@@ -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
index da856861b0c9587406b493d91909d22b4e0982ad..84fd2424f4ba83f2dd590b691b9d47a21b5c4f09 100755 (executable)
@@ -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
index 7ab2239db03a33e85aa307a6cb32e248142ed12b..6452739026638d80988c577fb2773fdd777ec565 100755 (executable)
@@ -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
index fd8fa6347d224f67a2b88a134276881b495f97d0..7cf2d21c53be163bb3052f74055d0f77cf6f7722 100755 (executable)
@@ -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
index 7401ae59d5b168b1c075cbb4abf5729b755505ef..1fcdc85ec6b48a9c72b90ad3673a7d89c21798b5 100755 (executable)
@@ -481,7 +481,7 @@ void Client::dump_status(Formatter *f)
     f->dump_int("mds_epoch", mdsmap->get_epoch());
     f->dump_int("osd_epoch", osd_epoch);
     f->dump_int("osd_epoch_barrier", cap_epoch_barrier);
-    f->dump_bool("blacklisted", blacklisted);
+    f->dump_bool("blocklisted", blocklisted);
   }
 }
 
@@ -491,7 +491,7 @@ void Client::_pre_init()
 
   objecter_finisher.start();
   filer.reset(new Filer(objecter, &objecter_finisher));
-  objecter->enable_blacklist_events();
+  objecter->enable_blocklist_events();
 
   objectcacher->start();
 }
@@ -1741,8 +1741,8 @@ int Client::make_request(MetaRequest *request,
     if (request->aborted())
       break;
 
-    if (blacklisted) {
-      request->abort(-EBLACKLISTED);
+    if (blocklisted) {
+      request->abort(-EBLOCKLISTED);
       break;
     }
 
@@ -2522,58 +2522,58 @@ void Client::_handle_full_flag(int64_t pool)
 
 void Client::handle_osd_map(const MConstRef<MOSDMap>& m)
 {
-  std::set<entity_addr_t> new_blacklists;
-  objecter->consume_blacklist_events(&new_blacklists);
+  std::set<entity_addr_t> new_blocklists;
+  objecter->consume_blocklist_events(&new_blocklists);
 
   const auto myaddrs = messenger->get_myaddrs();
-  bool new_blacklist = false;
+  bool new_blocklist = false;
   bool prenautilus = objecter->with_osdmap(
     [&](const OSDMap& o) {
       return o.require_osd_release < ceph_release_t::nautilus;
     });
-  if (!blacklisted) {
+  if (!blocklisted) {
     for (auto a : myaddrs.v) {
-      // blacklist entries are always TYPE_ANY for nautilus+
+      // blocklist entries are always TYPE_ANY for nautilus+
       a.set_type(entity_addr_t::TYPE_ANY);
-      if (new_blacklists.count(a)) {
-       new_blacklist = true;
+      if (new_blocklists.count(a)) {
+       new_blocklist = true;
        break;
       }
       if (prenautilus) {
        // ...except pre-nautilus, they were TYPE_LEGACY
        a.set_type(entity_addr_t::TYPE_LEGACY);
-       if (new_blacklists.count(a)) {
-         new_blacklist = true;
+       if (new_blocklists.count(a)) {
+         new_blocklist = true;
          break;
        }
       }
     }
   }
-  if (new_blacklist) {
+  if (new_blocklist) {
     auto epoch = objecter->with_osdmap([](const OSDMap &o){
         return o.get_epoch();
         });
-    lderr(cct) << "I was blacklisted at osd epoch " << epoch << dendl;
-    blacklisted = true;
+    lderr(cct) << "I was blocklisted at osd epoch " << epoch << dendl;
+    blocklisted = true;
 
-    _abort_mds_sessions(-EBLACKLISTED);
+    _abort_mds_sessions(-EBLOCKLISTED);
 
     // Since we know all our OSD ops will fail, cancel them all preemtively,
     // so that on an unhealthy cluster we can umount promptly even if e.g.
     // some PGs were inaccessible.
-    objecter->op_cancel_writes(-EBLACKLISTED);
+    objecter->op_cancel_writes(-EBLOCKLISTED);
 
   } 
 
-  if (blacklisted) {
-    // Handle case where we were blacklisted but no longer are
-    blacklisted = objecter->with_osdmap([myaddrs](const OSDMap &o){
-        return o.is_blacklisted(myaddrs);});
+  if (blocklisted) {
+    // Handle case where we were blocklisted but no longer are
+    blocklisted = objecter->with_osdmap([myaddrs](const OSDMap &o){
+        return o.is_blocklisted(myaddrs);});
   }
 
-  // Always subscribe to next osdmap for blacklisted client
-  // until this client is not blacklisted.
-  if (blacklisted) {
+  // Always subscribe to next osdmap for blocklisted client
+  // until this client is not blocklisted.
+  if (blocklisted) {
     objecter->maybe_request_map();
   }
 
@@ -4245,7 +4245,7 @@ void Client::remove_session_caps(MetaSession *s, int err)
     }
     caps &= CEPH_CAP_FILE_CACHE | CEPH_CAP_FILE_BUFFER;
     if (caps && !in->caps_issued_mask(caps, true)) {
-      if (err == -EBLACKLISTED) {
+      if (err == -EBLOCKLISTED) {
        if (in->oset.dirty_or_tx) {
          lderr(cct) << __func__ << " still has dirty data on " << *in << dendl;
          in->set_async_err(err);
@@ -6208,8 +6208,8 @@ void Client::_unmount(bool abort)
 
   std::unique_lock lock{client_lock};
 
-  if (abort || blacklisted) {
-    ldout(cct, 2) << "unmounting (" << (abort ? "abort)" : "blacklisted)") << dendl;
+  if (abort || blocklisted) {
+    ldout(cct, 2) << "unmounting (" << (abort ? "abort)" : "blocklisted)") << dendl;
   } else {
     ldout(cct, 2) << "unmounting" << dendl;
   }
@@ -6280,7 +6280,7 @@ void Client::_unmount(bool abort)
       // prevent inode from getting freed
       anchor.emplace_back(in);
 
-      if (abort || blacklisted) {
+      if (abort || blocklisted) {
         objectcacher->purge_set(&in->oset);
       } else if (!in->caps.empty()) {
        _release(in);
@@ -6289,7 +6289,7 @@ void Client::_unmount(bool abort)
     }
   }
 
-  if (abort || blacklisted) {
+  if (abort || blocklisted) {
     for (auto p = dirty_list.begin(); !p.end(); ) {
       Inode *in = *p;
       ++p;
@@ -6425,12 +6425,12 @@ void Client::tick()
 
   trim_cache(true);
 
-  if (blacklisted && (is_mounted() || is_unmounting()) &&
+  if (blocklisted && (is_mounted() || is_unmounting()) &&
       last_auto_reconnect + 30 * 60 < now &&
       cct->_conf.get_val<bool>("client_reconnect_stale")) {
     messenger->client_reset();
     fd_gen++; // invalidate open files
-    blacklisted = false;
+    blocklisted = false;
     _kick_stale_sessions();
     last_auto_reconnect = now;
   }
@@ -14076,7 +14076,7 @@ int Client::set_deleg_timeout(uint32_t timeout)
   std::scoped_lock lock(client_lock);
 
   /*
-   * The whole point is to prevent blacklisting so we must time out the
+   * The whole point is to prevent blocklisting so we must time out the
    * delegation before the session autoclose timeout kicks in.
    */
   if (timeout >= mdsmap->get_session_autoclose())
@@ -14444,7 +14444,7 @@ void Client::ms_handle_remote_reset(Connection *con)
 
        case MetaSession::STATE_OPEN:
          {
-           objecter->maybe_request_map(); /* to check if we are blacklisted */
+           objecter->maybe_request_map(); /* to check if we are blocklisted */
            if (cct->_conf.get_val<bool>("client_reconnect_stale")) {
              ldout(cct, 1) << "reset from mds we were open; close mds session for reconnect" << dendl;
              _closed_mds_session(s);
@@ -14870,8 +14870,8 @@ int Client::start_reclaim(const std::string& uuid, unsigned flags,
   if (flags & CEPH_RECLAIM_RESET)
     return 0;
 
-  // use blacklist to check if target session was killed
-  // (config option mds_session_blacklist_on_evict needs to be true)
+  // use blocklist to check if target session was killed
+  // (config option mds_session_blocklist_on_evict needs to be true)
   ldout(cct, 10) << __func__ << ": waiting for OSD epoch " << reclaim_osd_epoch << dendl;
   bs::error_code ec;
   l.unlock();
@@ -14881,11 +14881,11 @@ int Client::start_reclaim(const std::string& uuid, unsigned flags,
   if (ec)
     return ceph::from_error_code(ec);
 
-  bool blacklisted = objecter->with_osdmap(
+  bool blocklisted = objecter->with_osdmap(
       [this](const OSDMap &osd_map) -> bool {
-       return osd_map.is_blacklisted(reclaim_target_addrs);
+       return osd_map.is_blocklisted(reclaim_target_addrs);
       });
-  if (blacklisted)
+  if (blocklisted)
     return -ENOTRECOVERABLE;
 
   metadata["reclaiming_uuid"] = uuid;
index 32306d34b4dcc3a2fd124c5b898c185beda10021..620c6819a38589b0213c6a633fd04b9373ad68dd 100644 (file)
@@ -1369,7 +1369,7 @@ private:
   ceph::unordered_set<dir_result_t*> opened_dirs;
   uint64_t fd_gen = 1;
 
-  bool   blacklisted = false;
+  bool   blocklisted = false;
 
   ceph::unordered_map<vinodeno_t, Inode*> inode_map;
   ceph::unordered_map<ino_t, vinodeno_t> faked_ino_map;
index e4001eb75ebd1e392b51fc2272cc829e021fd2f1..90c72d1b9b21abc17370dfb2359c336e495d110b 100644 (file)
@@ -303,7 +303,7 @@ OPTION(mon_keyvaluedb, OPT_STR)   // type of keyvaluedb backend
 
 // UNSAFE -- TESTING ONLY! Allows addition of a cache tier with preexisting snaps
 OPTION(mon_debug_unsafe_allow_tier_with_nonempty_snaps, OPT_BOOL)
-OPTION(mon_osd_blacklist_default_expire, OPT_DOUBLE) // default one hour
+OPTION(mon_osd_blocklist_default_expire, OPT_DOUBLE) // default one hour
 OPTION(mon_osd_crush_smoke_test, OPT_BOOL)
 
 OPTION(paxos_stash_full_interval, OPT_INT)   // how often (in commits) to stash a full copy of the PaxosService state
@@ -406,8 +406,8 @@ OPTION(mds_beacon_interval, OPT_FLOAT)
 OPTION(mds_beacon_grace, OPT_FLOAT)
 OPTION(mds_enforce_unique_name, OPT_BOOL)
 
-OPTION(mds_session_blacklist_on_timeout, OPT_BOOL)    // whether to blacklist clients whose sessions are dropped due to timeout
-OPTION(mds_session_blacklist_on_evict, OPT_BOOL)  // whether to blacklist clients whose sessions are dropped via admin commands
+OPTION(mds_session_blocklist_on_timeout, OPT_BOOL)    // whether to blocklist clients whose sessions are dropped due to timeout
+OPTION(mds_session_blocklist_on_evict, OPT_BOOL)  // whether to blocklist clients whose sessions are dropped via admin commands
 
 OPTION(mds_sessionmap_keys_per_op, OPT_U32)    // how many sessions should I try to load/store in a single OMAP operation?
 OPTION(mds_freeze_tree_timeout, OPT_FLOAT)    // detecting freeze tree deadlock
index 8113f30b2d0826eb37073510137b6b437b3202e7..f7a325b624c5639a2bdeeeb7ca326982020f6831 100644 (file)
@@ -2118,25 +2118,25 @@ std::vector<Option> get_global_options() {
     .add_service("mon")
     .set_description(""),
 
-    Option("mon_osd_blacklist_default_expire", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
+    Option("mon_osd_blocklist_default_expire", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
     .set_default(1_hr)
     .add_service("mon")
-    .set_description("Duration in seconds that blacklist entries for clients "
+    .set_description("Duration in seconds that blocklist entries for clients "
                      "remain in the OSD map"),
 
-    Option("mon_mds_blacklist_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
+    Option("mon_mds_blocklist_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
     .set_default(1_day)
     .set_min(1_hr)
     .add_service("mon")
-    .set_description("Duration in seconds that blacklist entries for MDS "
+    .set_description("Duration in seconds that blocklist entries for MDS "
                      "daemons remain in the OSD map")
     .set_flag(Option::FLAG_RUNTIME),
 
-    Option("mon_mgr_blacklist_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
+    Option("mon_mgr_blocklist_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
     .set_default(1_day)
     .set_min(1_hr)
     .add_service("mon")
-    .set_description("Duration in seconds that blacklist entries for mgr "
+    .set_description("Duration in seconds that blocklist entries for mgr "
                      "daemons remain in the OSD map")
     .set_flag(Option::FLAG_RUNTIME),
 
@@ -7283,13 +7283,13 @@ static std::vector<Option> get_rbd_options() {
     .set_default(false)
     .set_description("copy-up parent image blocks to clone upon read request"),
 
-    Option("rbd_blacklist_on_break_lock", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+    Option("rbd_blocklist_on_break_lock", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
     .set_default(true)
-    .set_description("whether to blacklist clients whose lock was broken"),
+    .set_description("whether to blocklist clients whose lock was broken"),
 
-    Option("rbd_blacklist_expire_seconds", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
+    Option("rbd_blocklist_expire_seconds", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
     .set_default(0)
-    .set_description("number of seconds to blacklist - set to 0 for OSD default"),
+    .set_description("number of seconds to blocklist - set to 0 for OSD default"),
 
     Option("rbd_request_timed_out_seconds", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
     .set_default(30)
@@ -7857,13 +7857,13 @@ std::vector<Option> get_mds_options() {
     .set_default(true)
     .set_description("require MDS name is unique in the cluster"),
 
-    Option("mds_session_blacklist_on_timeout", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+    Option("mds_session_blocklist_on_timeout", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
     .set_default(true)
-    .set_description("blacklist clients whose sessions have become stale"),
+    .set_description("blocklist clients whose sessions have become stale"),
 
-    Option("mds_session_blacklist_on_evict", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+    Option("mds_session_blocklist_on_evict", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
     .set_default(true)
-    .set_description("blacklist clients that have been evicted"),
+    .set_description("blocklist clients that have been evicted"),
 
     Option("mds_sessionmap_keys_per_op", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
     .set_default(1024)
index 421ff418e4ef2b8ba4d286a76de7187dc17eb187..b5f12da119a629e08ad4959cc33b64ed3d3af25d 100644 (file)
@@ -282,7 +282,7 @@ public:
   void check_recovery_sources(const OSDMapRef& newmap) final {
     // Not needed yet
   }
-  void check_blacklisted_watchers() final {
+  void check_blocklisted_watchers() final {
     // Not needed yet
   }
   void clear_primary_state() final {
index e77de391e19b8214814ba0e7fe01960664a059a5..96921ec2e32a8438b2aab188b39daea57286cc38 100644 (file)
@@ -1803,7 +1803,7 @@ int ceph_ll_lazyio(struct ceph_mount_info *cmount, Fh *fh, int enable);
  * Get the amount of time that the client has to return caps
  * @param cmount the ceph mount handle to use.
  *
- * In the event that a client does not return its caps, the MDS may blacklist
+ * In the event that a client does not return its caps, the MDS may blocklist
  * it after this timeout. Applications should check this value and ensure
  * that they set the delegation timeout to a value lower than this.
  *
@@ -1817,7 +1817,7 @@ uint32_t ceph_get_cap_return_timeout(struct ceph_mount_info *cmount);
  * @param cmount the ceph mount handle to use.
  * @param timeout the delegation timeout (in seconds)
  *
- * Since the client could end up blacklisted if it doesn't return delegations
+ * Since the client could end up blocklisted if it doesn't return delegations
  * in time, we mandate that any application wanting to use delegations
  * explicitly set the timeout beforehand. Until this call is done on the
  * mount, attempts to set a delegation will return -ETIME.
index 1921ae1c9e0c7d4b4fcf34e502cb49e51011ac12..b84af6e8014be9362adcd44898b5aad80f6670d5 100644 (file)
@@ -487,7 +487,8 @@ enum {
 };
 
 #define EOLDSNAPC    85  /* ORDERSNAP flag set; writer has old snapc*/
-#define EBLACKLISTED 108 /* blacklisted */
+#define EBLOCKLISTED 108 /* blocklisted */
+#define EBLACKLISTED 108 /* deprecated */
 
 /* xattr comparison */
 enum {
index 21b5eb5af1b3cbec9f273fecbf0714dd4f18d425..a95a2508e2d017d9b902a41392f731bdad269c38 100644 (file)
@@ -3656,19 +3656,23 @@ CEPH_RADOS_API int rados_break_lock(rados_ioctx_t io, const char *o,
                                     const char *cookie);
 
 /**
- * Blacklists the specified client from the OSDs
+ * Blocklists the specified client from the OSDs
  *
  * @param cluster cluster handle
  * @param client_address client address
- * @param expire_seconds number of seconds to blacklist (0 for default)
+ * @param expire_seconds number of seconds to blocklist (0 for default)
  * @returns 0 on success, negative error code on failure
  */
-CEPH_RADOS_API int rados_blacklist_add(rados_t cluster,
+CEPH_RADOS_API int rados_blocklist_add(rados_t cluster,
                                       char *client_address,
                                       uint32_t expire_seconds);
+CEPH_RADOS_API int rados_blacklist_add(rados_t cluster,
+                                      char *client_address,
+                                      uint32_t expire_seconds)
+  __attribute__((deprecated));
 
 /**
- * Gets addresses of the RADOS session, suitable for blacklisting.
+ * Gets addresses of the RADOS session, suitable for blocklisting.
  *
  * @param cluster cluster handle
  * @param addrs the output string.
index 7b81fc8bdbc95fc51015b0db5bfb17fa9a6ac600..826ce57f270dc90b8b6abb106bc98d83ffca8910 100644 (file)
@@ -1425,7 +1425,7 @@ inline namespace v14_2_0 {
     int ioctx_create2(int64_t pool_id, IoCtx &pioctx);
 
     // Features useful for test cases
-    void test_blacklist_self(bool set);
+    void test_blocklist_self(bool set);
 
     /* pool info */
     int pool_list(std::list<std::string>& v);
@@ -1493,7 +1493,7 @@ inline namespace v14_2_0 {
     /// get/wait for the most recent osdmap
     int wait_for_latest_osdmap();
 
-    int blacklist_add(const std::string& client_address,
+    int blocklist_add(const std::string& client_address,
                       uint32_t expire_seconds);
 
     /*
index e2b3996fbc9b5e2c722e2c3d0a959441f9b0a2d4..7c24fd2999d90835df709ce336ebfa46ee8503d8 100644 (file)
@@ -883,7 +883,7 @@ void JournalMetadata::handle_watch_reset() {
     if (r == -ENOENT) {
       ldout(m_cct, 5) << __func__ << ": journal header not found" << dendl;
     } else if (r == -EBLACKLISTED) {
-      ldout(m_cct, 5) << __func__ << ": client blacklisted" << dendl;
+      ldout(m_cct, 5) << __func__ << ": client blocklisted" << dendl;
     } else {
       lderr(m_cct) << __func__ << ": failed to watch journal: "
                    << cpp_strerror(r) << dendl;
@@ -915,8 +915,8 @@ void JournalMetadata::handle_watch_notify(uint64_t notify_id, uint64_t cookie) {
 void JournalMetadata::handle_watch_error(int err) {
   if (err == -ENOTCONN) {
     ldout(m_cct, 5) << "journal watch error: header removed" << dendl;
-  } else if (err == -EBLACKLISTED) {
-    lderr(m_cct) << "journal watch error: client blacklisted" << dendl;
+  } else if (err == -EBLOCKLISTED) {
+    lderr(m_cct) << "journal watch error: client blocklisted" << dendl;
   } else {
     lderr(m_cct) << "journal watch error: " << cpp_strerror(err) << dendl;
   }
index 58524e46fe01159e3c7ae6aafa9af558d8bd2e4b..c87e08f22c3860f8b4f2ed04bb4d99339d4e4838 100644 (file)
@@ -766,9 +766,9 @@ int librados::RadosClient::pool_delete_async(const char *name, PoolAsyncCompleti
   return r;
 }
 
-void librados::RadosClient::blacklist_self(bool set) {
+void librados::RadosClient::blocklist_self(bool set) {
   std::lock_guard l(lock);
-  objecter->blacklist_self(set);
+  objecter->blocklist_self(set);
 }
 
 std::string librados::RadosClient::get_addrs() const {
@@ -777,7 +777,7 @@ std::string librados::RadosClient::get_addrs() const {
   return std::string(cos->strv());
 }
 
-int librados::RadosClient::blacklist_add(const string& client_address,
+int librados::RadosClient::blocklist_add(const string& client_address,
                                         uint32_t expire_seconds)
 {
   entity_addr_t addr;
@@ -788,8 +788,8 @@ int librados::RadosClient::blacklist_add(const string& client_address,
 
   std::stringstream cmd;
   cmd << "{"
-      << "\"prefix\": \"osd blacklist\", "
-      << "\"blacklistop\": \"add\", "
+      << "\"prefix\": \"osd blocklist\", "
+      << "\"blocklistop\": \"add\", "
       << "\"addr\": \"" << client_address << "\"";
   if (expire_seconds != 0) {
     cmd << ", \"expire\": " << expire_seconds << ".0";
@@ -801,6 +801,7 @@ int librados::RadosClient::blacklist_add(const string& client_address,
   bufferlist inbl;
   int r = mon_command(cmds, inbl, NULL, NULL);
   if (r < 0) {
+#warning blocklist fallback
     return r;
   }
 
index 9292a021cdfe3d8264c117bb14b0056de737e22a..237431927c1bc917ea37f18d3407fed2b445b760 100644 (file)
@@ -147,7 +147,7 @@ public:
 
   int pool_delete_async(const char *name, PoolAsyncCompletionImpl *c);
 
-  int blacklist_add(const string& client_address, uint32_t expire_seconds);
+  int blocklist_add(const string& client_address, uint32_t expire_seconds);
 
   int mon_command(const vector<string>& cmd, const bufferlist &inbl,
                  bufferlist *outbl, string *outs);
@@ -176,7 +176,7 @@ public:
 
   void get();
   bool put();
-  void blacklist_self(bool set);
+  void blocklist_self(bool set);
 
   std::string get_addrs() const;
 
index 701c2964c37b49ca977e32f2e706e35dd3d6c93d..8e8b58f8cd683e2499fa2ff4c151478e29a9d554 100644 (file)
@@ -435,11 +435,18 @@ extern "C" int _rados_wait_for_latest_osdmap(rados_t cluster)
 }
 LIBRADOS_C_API_BASE_DEFAULT(rados_wait_for_latest_osdmap);
 
-extern "C" int _rados_blacklist_add(rados_t cluster, char *client_address,
+extern "C" int _rados_blocklist_add(rados_t cluster, char *client_address,
                                    uint32_t expire_seconds)
 {
   librados::RadosClient *radosp = (librados::RadosClient *)cluster;
-  return radosp->blacklist_add(client_address, expire_seconds);
+  return radosp->blocklist_add(client_address, expire_seconds);
+}
+LIBRADOS_C_API_BASE_DEFAULT(rados_blocklist_add);
+
+extern "C" int _rados_blacklist_add(rados_t cluster, char *client_address,
+                                   uint32_t expire_seconds)
+{
+  return _rados_blocklist_add(cluster, client_address, expire_seconds);
 }
 LIBRADOS_C_API_BASE_DEFAULT(rados_blacklist_add);
 
index 57642cc61b005c00bbbe82a0c02faa367737cc68..484c723554e55ff4f814d0b27282a9d84eba010f 100644 (file)
@@ -2625,9 +2625,9 @@ int librados::Rados::ioctx_create2(int64_t pool_id, IoCtx &io)
   return 0;
 }
 
-void librados::Rados::test_blacklist_self(bool set)
+void librados::Rados::test_blocklist_self(bool set)
 {
-  client->blacklist_self(set);
+  client->blocklist_self(set);
 }
 
 int librados::Rados::get_pool_stats(std::list<string>& v,
@@ -2810,10 +2810,10 @@ int librados::Rados::wait_for_latest_osdmap()
   return client->wait_for_latest_osdmap();
 }
 
-int librados::Rados::blacklist_add(const std::string& client_address,
+int librados::Rados::blocklist_add(const std::string& client_address,
                                   uint32_t expire_seconds)
 {
-  return client->blacklist_add(client_address, expire_seconds);
+  return client->blocklist_add(client_address, expire_seconds);
 }
 
 librados::PoolAsyncCompletion *librados::Rados::pool_async_create_completion()
index 00496c765b5f506debcc5179153fa4e5c6c5d153..dddbe040be7bb517458bec70cbe2ba056ff498b5 100644 (file)
@@ -34,8 +34,8 @@ ExclusiveLock<I>::ExclusiveLock(I &image_ctx)
   : RefCountedObject(image_ctx.cct),
     ML<I>(image_ctx.md_ctx, *image_ctx.asio_engine, image_ctx.header_oid,
           image_ctx.image_watcher, managed_lock::EXCLUSIVE,
-          image_ctx.config.template get_val<bool>("rbd_blacklist_on_break_lock"),
-          image_ctx.config.template get_val<uint64_t>("rbd_blacklist_expire_seconds")),
+          image_ctx.config.template get_val<bool>("rbd_blocklist_on_break_lock"),
+          image_ctx.config.template get_val<uint64_t>("rbd_blocklist_expire_seconds")),
     m_image_ctx(image_ctx) {
   std::lock_guard locker{ML<I>::m_lock};
   ML<I>::set_state_uninitialized();
@@ -112,8 +112,8 @@ void ExclusiveLock<I>::unblock_requests() {
 
 template <typename I>
 int ExclusiveLock<I>::get_unlocked_op_error() const {
-  if (m_image_ctx.image_watcher->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_image_ctx.image_watcher->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
   return -EROFS;
 }
index bc7245eb0108f4710838e1856db9c033c472e5b2..a74b59dfb2f02bb9a6040da3fe9e482cad080430 100644 (file)
@@ -66,8 +66,8 @@ using managed_lock::util::encode_lock_cookie;
 template <typename I>
 ManagedLock<I>::ManagedLock(librados::IoCtx &ioctx, AsioEngine& asio_engine,
                             const string& oid, Watcher *watcher, Mode mode,
-                            bool blacklist_on_break_lock,
-                            uint32_t blacklist_expire_seconds)
+                            bool blocklist_on_break_lock,
+                            uint32_t blocklist_expire_seconds)
   : m_lock(ceph::make_mutex(unique_lock_name("librbd::ManagedLock<I>::m_lock", this))),
     m_ioctx(ioctx), m_cct(reinterpret_cast<CephContext *>(ioctx.cct())),
     m_asio_engine(asio_engine),
@@ -75,8 +75,8 @@ ManagedLock<I>::ManagedLock(librados::IoCtx &ioctx, AsioEngine& asio_engine,
     m_oid(oid),
     m_watcher(watcher),
     m_mode(mode),
-    m_blacklist_on_break_lock(blacklist_on_break_lock),
-    m_blacklist_expire_seconds(blacklist_expire_seconds),
+    m_blocklist_on_break_lock(blocklist_on_break_lock),
+    m_blocklist_expire_seconds(blocklist_expire_seconds),
     m_state(STATE_UNLOCKED) {
 }
 
@@ -270,7 +270,7 @@ void ManagedLock<I>::break_lock(const managed_lock::Locker &locker,
       on_finish = new C_Tracked(m_async_op_tracker, on_finish);
       auto req = managed_lock::BreakRequest<I>::create(
         m_ioctx, m_asio_engine, m_oid, locker, m_mode == EXCLUSIVE,
-        m_blacklist_on_break_lock, m_blacklist_expire_seconds, force_break_lock,
+        m_blocklist_on_break_lock, m_blocklist_expire_seconds, force_break_lock,
         on_finish);
       req->send();
       return;
@@ -296,8 +296,8 @@ int ManagedLock<I>::assert_header_locked() {
 
   int r = m_ioctx.operate(m_oid, &op, nullptr);
   if (r < 0) {
-    if (r == -EBLACKLISTED) {
-      ldout(m_cct, 5) << "client is not lock owner -- client blacklisted"
+    if (r == -EBLOCKLISTED) {
+      ldout(m_cct, 5) << "client is not lock owner -- client blocklisted"
                       << dendl;
     } else if (r == -ENOENT) {
       ldout(m_cct, 5) << "client is not lock owner -- no lock detected"
@@ -512,7 +512,7 @@ void ManagedLock<I>::handle_pre_acquire_lock(int r) {
   using managed_lock::AcquireRequest;
   AcquireRequest<I>* req = AcquireRequest<I>::create(
     m_ioctx, m_watcher, m_asio_engine, m_oid, m_cookie, m_mode == EXCLUSIVE,
-    m_blacklist_on_break_lock, m_blacklist_expire_seconds,
+    m_blocklist_on_break_lock, m_blocklist_expire_seconds,
     create_context_callback<
         ManagedLock<I>, &ManagedLock<I>::handle_acquire_lock>(this));
   m_work_queue->queue(new C_SendLockRequest<AcquireRequest<I>>(req), 0);
@@ -595,7 +595,7 @@ void ManagedLock<I>::send_reacquire_lock() {
   }
 
   m_new_cookie = encode_lock_cookie(watch_handle);
-  if (m_cookie == m_new_cookie && m_blacklist_on_break_lock) {
+  if (m_cookie == m_new_cookie && m_blocklist_on_break_lock) {
     ldout(m_cct, 10) << "skipping reacquire since cookie still valid"
                      << dendl;
     auto ctx = create_context_callback<
@@ -719,7 +719,7 @@ void ManagedLock<I>::handle_release_lock(int r) {
   std::lock_guard locker{m_lock};
   ceph_assert(m_state == STATE_RELEASING);
 
-  if (r >= 0 || r == -EBLACKLISTED || r == -ENOENT) {
+  if (r >= 0 || r == -EBLOCKLISTED || r == -ENOENT) {
     m_cookie = "";
     m_post_next_state = STATE_UNLOCKED;
   } else {
index e1e95fe430216c6da85625c32a12fe4d831a9787..09fc413c009441c7ecbbfcd296195221d1c7dc03 100644 (file)
@@ -33,10 +33,10 @@ public:
                              AsioEngine& asio_engine,
                              const std::string& oid, Watcher *watcher,
                              managed_lock::Mode mode,
-                             bool blacklist_on_break_lock,
-                             uint32_t blacklist_expire_seconds) {
+                             bool blocklist_on_break_lock,
+                             uint32_t blocklist_expire_seconds) {
     return new ManagedLock(ioctx, asio_engine, oid, watcher, mode,
-                           blacklist_on_break_lock, blacklist_expire_seconds);
+                           blocklist_on_break_lock, blocklist_expire_seconds);
   }
   void destroy() {
     delete this;
@@ -44,8 +44,8 @@ public:
 
   ManagedLock(librados::IoCtx& ioctx, AsioEngine& asio_engine,
               const std::string& oid, Watcher *watcher,
-              managed_lock::Mode mode, bool blacklist_on_break_lock,
-              uint32_t blacklist_expire_seconds);
+              managed_lock::Mode mode, bool blocklist_on_break_lock,
+              uint32_t blocklist_expire_seconds);
   virtual ~ManagedLock();
 
   bool is_lock_owner() const;
@@ -216,8 +216,8 @@ private:
   std::string m_oid;
   Watcher *m_watcher;
   managed_lock::Mode m_mode;
-  bool m_blacklist_on_break_lock;
-  uint32_t m_blacklist_expire_seconds;
+  bool m_blocklist_on_break_lock;
+  uint32_t m_blocklist_expire_seconds;
 
   std::string m_cookie;
   std::string m_new_cookie;
index fef79533b2171a83a698aabff677fda4bd721de4..c215d6df74a52db125803d4c00c91dab9ebcaa5b 100644 (file)
@@ -110,7 +110,7 @@ void Watcher::register_watch(Context *on_finish) {
   std::unique_lock watch_locker{m_watch_lock};
   ceph_assert(is_unregistered(m_watch_lock));
   m_watch_state = WATCH_STATE_REGISTERING;
-  m_watch_blacklisted = false;
+  m_watch_blocklisted = false;
 
   librados::AioCompletion *aio_comp = create_rados_callback(
     new C_RegisterWatch(this, on_finish));
@@ -142,7 +142,7 @@ void Watcher::handle_register_watch(int r, Context *on_finish) {
       m_watch_state = WATCH_STATE_REWATCHING;
       watch_error = true;
     } else {
-      m_watch_blacklisted = (r == -EBLACKLISTED);
+      m_watch_blocklisted = (r == -EBLOCKLISTED);
     }
   }
 
@@ -177,7 +177,7 @@ void Watcher::unregister_watch(Context *on_finish) {
       aio_comp->release();
 
       m_watch_handle = 0;
-      m_watch_blacklisted = false;
+      m_watch_blocklisted = false;
       return;
     }
   }
@@ -233,8 +233,8 @@ void Watcher::handle_error(uint64_t handle, int err) {
 
   if (is_registered(m_watch_lock)) {
     m_watch_state = WATCH_STATE_REWATCHING;
-    if (err == -EBLACKLISTED) {
-      m_watch_blacklisted = true;
+    if (err == -EBLOCKLISTED) {
+      m_watch_blocklisted = true;
     }
 
     auto ctx = new LambdaContext(
@@ -282,14 +282,14 @@ void Watcher::handle_rewatch(int r) {
     std::unique_lock watch_locker{m_watch_lock};
     ceph_assert(m_watch_state == WATCH_STATE_REWATCHING);
 
-    m_watch_blacklisted = false;
+    m_watch_blocklisted = false;
     if (m_unregister_watch_ctx != nullptr) {
       ldout(m_cct, 10) << "image is closing, skip rewatch" << dendl;
       m_watch_state = WATCH_STATE_IDLE;
       std::swap(unregister_watch_ctx, m_unregister_watch_ctx);
-    } else if (r  == -EBLACKLISTED) {
-      lderr(m_cct) << "client blacklisted" << dendl;
-      m_watch_blacklisted = true;
+    } else if (r  == -EBLOCKLISTED) {
+      lderr(m_cct) << "client blocklisted" << dendl;
+      m_watch_blocklisted = true;
     } else if (r == -ENOENT) {
       ldout(m_cct, 5) << "object does not exist" << dendl;
     } else if (r < 0) {
@@ -327,7 +327,7 @@ void Watcher::handle_rewatch_callback(int r) {
     if (m_unregister_watch_ctx != nullptr) {
       m_watch_state = WATCH_STATE_IDLE;
       std::swap(unregister_watch_ctx, m_unregister_watch_ctx);
-    } else if (r == -EBLACKLISTED || r == -ENOENT) {
+    } else if (r == -EBLOCKLISTED || r == -ENOENT) {
       m_watch_state = WATCH_STATE_IDLE;
     } else if (r < 0 || m_watch_error) {
       watch_error = true;
index c3497ca88a91b5eef5169ed6930d120375a7a066..96ecda7d0e7bff4d063f42d5b19dd3cf3e971e98 100644 (file)
@@ -59,9 +59,9 @@ public:
     std::shared_lock locker{m_watch_lock};
     return is_unregistered(m_watch_lock);
   }
-  bool is_blacklisted() const {
+  bool is_blocklisted() const {
     std::shared_lock locker{m_watch_lock};
-    return m_watch_blacklisted;
+    return m_watch_blocklisted;
   }
 
 protected:
@@ -80,7 +80,7 @@ protected:
   watcher::Notifier m_notifier;
 
   WatchState m_watch_state;
-  bool m_watch_blacklisted = false;
+  bool m_watch_blocklisted = false;
 
   AsyncOpTracker m_async_op_tracker;
 
index 524808a5097a98573eb7b64f1bd9e814c804a4ca..6dfec339368b81e8a1b5a5d9c86a46c3f586fd38 100644 (file)
@@ -49,7 +49,7 @@ struct ObjectCacherObjectDispatch<I>::C_InvalidateCache : public Context {
     auto cct = dispatcher->m_image_ctx->cct;
 
     if (r == -EBLACKLISTED) {
-      lderr(cct) << "blacklisted during flush (purging)" << dendl;
+      lderr(cct) << "blocklisted during flush (purging)" << dendl;
       dispatcher->m_object_cacher->purge_set(dispatcher->m_object_set);
     } else if (r < 0 && purge_on_error) {
       lderr(cct) << "failed to invalidate cache (purging): "
index fb1aa8322fb908d5a78fa5a3d92da77e47be1812..11d4806de553ac98737c645510893d90f8242c95 100644 (file)
@@ -128,8 +128,8 @@ void PreReleaseRequest<I>::handle_block_writes(int r) {
   ldout(cct, 10) << "r=" << r << dendl;
 
   if (r == -EBLACKLISTED) {
-    // allow clean shut down if blacklisted
-    lderr(cct) << "failed to block writes because client is blacklisted"
+    // allow clean shut down if blocklisted
+    lderr(cct) << "failed to block writes because client is blocklisted"
                << dendl;
   } else if (r < 0) {
     lderr(cct) << "failed to block writes: " << cpp_strerror(r) << dendl;
@@ -213,7 +213,7 @@ void PreReleaseRequest<I>::handle_invalidate_cache(int r) {
   CephContext *cct = m_image_ctx.cct;
   ldout(cct, 10) << "r=" << r << dendl;
 
-  if (r < 0 && r != -EBLACKLISTED && r != -EBUSY) {
+  if (r < 0 && r != -EBLOCKLISTED && r != -EBUSY) {
     lderr(cct) << "failed to invalidate cache: " << cpp_strerror(r)
                << dendl;
     m_image_dispatch->unset_require_lock(io::DIRECTION_BOTH);
index d98e59fc84ceed32570848d998b2748f1ac0117e..d6b445f10799fd2cc56fbf6dfdc41af2ec1d3d4d 100644 (file)
@@ -915,7 +915,7 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) {
       return 0;
     }
 
-    // might have been blacklisted by peer -- ensure we still own
+    // might have been blocklisted by peer -- ensure we still own
     // the lock by pinging the OSD
     int r = ictx->exclusive_lock->assert_header_locked();
     if (r == -EBUSY || r == -ENOENT) {
@@ -1445,7 +1445,7 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) {
       return -EINVAL;
     }
 
-    if (ictx->config.get_val<bool>("rbd_blacklist_on_break_lock")) {
+    if (ictx->config.get_val<bool>("rbd_blocklist_on_break_lock")) {
       typedef std::map<rados::cls::lock::locker_id_t,
                       rados::cls::lock::locker_info_t> Lockers;
       Lockers lockers;
@@ -1473,11 +1473,11 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) {
       }
 
       librados::Rados rados(ictx->md_ctx);
-      r = rados.blacklist_add(
+      r = rados.blocklist_add(
         client_address,
-        ictx->config.get_val<uint64_t>("rbd_blacklist_expire_seconds"));
+        ictx->config.get_val<uint64_t>("rbd_blocklist_expire_seconds"));
       if (r < 0) {
-        lderr(ictx->cct) << "unable to blacklist client: " << cpp_strerror(r)
+        lderr(ictx->cct) << "unable to blocklist client: " << cpp_strerror(r)
                       << dendl;
         return r;
       }
index f869938ad0b1adad13ea1df58e99086f0e7abfc4..79be0f25a15b88200cb94555c8326010f14a5ced 100644 (file)
@@ -38,12 +38,12 @@ AcquireRequest<I>* AcquireRequest<I>::create(librados::IoCtx& ioctx,
                                              const string& oid,
                                              const string& cookie,
                                              bool exclusive,
-                                            bool blacklist_on_break_lock,
-                                            uint32_t blacklist_expire_seconds,
+                                            bool blocklist_on_break_lock,
+                                            uint32_t blocklist_expire_seconds,
                                              Context *on_finish) {
     return new AcquireRequest(ioctx, watcher, asio_engine, oid, cookie,
-                              exclusive, blacklist_on_break_lock,
-                              blacklist_expire_seconds, on_finish);
+                              exclusive, blocklist_on_break_lock,
+                              blocklist_expire_seconds, on_finish);
 }
 
 template <typename I>
@@ -51,15 +51,15 @@ AcquireRequest<I>::AcquireRequest(librados::IoCtx& ioctx, Watcher *watcher,
                                   AsioEngine& asio_engine,
                                   const string& oid,
                                   const string& cookie, bool exclusive,
-                                  bool blacklist_on_break_lock,
-                                  uint32_t blacklist_expire_seconds,
+                                  bool blocklist_on_break_lock,
+                                  uint32_t blocklist_expire_seconds,
                                   Context *on_finish)
   : m_ioctx(ioctx), m_watcher(watcher),
     m_cct(reinterpret_cast<CephContext *>(m_ioctx.cct())),
     m_asio_engine(asio_engine), m_oid(oid), m_cookie(cookie),
     m_exclusive(exclusive),
-    m_blacklist_on_break_lock(blacklist_on_break_lock),
-    m_blacklist_expire_seconds(blacklist_expire_seconds),
+    m_blocklist_on_break_lock(blocklist_on_break_lock),
+    m_blocklist_expire_seconds(blocklist_expire_seconds),
     m_on_finish(new C_AsyncCallback<asio::ContextWQ>(
       asio_engine.get_work_queue(), on_finish)) {
 }
@@ -150,7 +150,7 @@ void AcquireRequest<I>::send_break_lock() {
     AcquireRequest<I>, &AcquireRequest<I>::handle_break_lock>(this);
   auto req = BreakRequest<I>::create(
     m_ioctx, m_asio_engine, m_oid, m_locker, m_exclusive,
-    m_blacklist_on_break_lock, m_blacklist_expire_seconds, false, ctx);
+    m_blocklist_on_break_lock, m_blocklist_expire_seconds, false, ctx);
   req->send();
 }
 
index 094cd55b4ce1cd93a8966024ebd5c095c24324e1..19424a42271d2a8d6ab2da7481efe3b864915b6f 100644 (file)
@@ -33,8 +33,8 @@ public:
                                 const std::string& oid,
                                 const std::string& cookie,
                                 bool exclusive,
-                                bool blacklist_on_break_lock,
-                                uint32_t blacklist_expire_seconds,
+                                bool blocklist_on_break_lock,
+                                uint32_t blocklist_expire_seconds,
                                 Context *on_finish);
 
   ~AcquireRequest();
@@ -66,8 +66,8 @@ private:
   AcquireRequest(librados::IoCtx& ioctx, Watcher *watcher,
                  AsioEngine& asio_engine, const std::string& oid,
                  const std::string& cookie, bool exclusive,
-                 bool blacklist_on_break_lock,
-                 uint32_t blacklist_expire_seconds, Context *on_finish);
+                 bool blocklist_on_break_lock,
+                 uint32_t blocklist_expire_seconds, Context *on_finish);
 
   librados::IoCtx& m_ioctx;
   Watcher *m_watcher;
@@ -76,8 +76,8 @@ private:
   std::string m_oid;
   std::string m_cookie;
   bool m_exclusive;
-  bool m_blacklist_on_break_lock;
-  uint32_t m_blacklist_expire_seconds;
+  bool m_blocklist_on_break_lock;
+  uint32_t m_blocklist_expire_seconds;
   Context *m_on_finish;
 
   bufferlist m_out_bl;
index 2c8e3c54f0120cf22ad5335c807ffcae73821d08..c3f9dfefd18ea6952f1ebbe9ede6030edb392ee2 100644 (file)
@@ -30,13 +30,13 @@ template <typename I>
 BreakRequest<I>::BreakRequest(librados::IoCtx& ioctx,
                               AsioEngine& asio_engine,
                               const std::string& oid, const Locker &locker,
-                              bool exclusive, bool blacklist_locker,
-                              uint32_t blacklist_expire_seconds,
+                              bool exclusive, bool blocklist_locker,
+                              uint32_t blocklist_expire_seconds,
                               bool force_break_lock, Context *on_finish)
   : m_ioctx(ioctx), m_cct(reinterpret_cast<CephContext *>(m_ioctx.cct())),
     m_asio_engine(asio_engine), m_oid(oid), m_locker(locker),
-    m_exclusive(exclusive), m_blacklist_locker(blacklist_locker),
-    m_blacklist_expire_seconds(blacklist_expire_seconds),
+    m_exclusive(exclusive), m_blocklist_locker(blocklist_locker),
+    m_blocklist_expire_seconds(blocklist_expire_seconds),
     m_force_break_lock(force_break_lock), m_on_finish(on_finish) {
 }
 
@@ -131,12 +131,12 @@ void BreakRequest<I>::handle_get_locker(int r) {
     return;
   }
 
-  send_blacklist();
+  send_blocklist();
 }
 
 template <typename I>
-void BreakRequest<I>::send_blacklist() {
-  if (!m_blacklist_locker) {
+void BreakRequest<I>::send_blocklist() {
+  if (!m_blocklist_locker) {
     send_break_lock();
     return;
   }
@@ -146,7 +146,7 @@ void BreakRequest<I>::send_blacklist() {
                    << "locker entity=" << m_locker.entity << dendl;
 
   if (m_locker.entity == entity_name) {
-    lderr(m_cct) << "attempting to self-blacklist" << dendl;
+    lderr(m_cct) << "attempting to self-blocklist" << dendl;
     finish(-EINVAL);
     return;
   }
@@ -161,11 +161,11 @@ void BreakRequest<I>::send_blacklist() {
 
   std::stringstream cmd;
   cmd << "{"
-      << "\"prefix\": \"osd blacklist\", "
-      << "\"blacklistop\": \"add\", "
+      << "\"prefix\": \"osd blocklist\", "
+      << "\"blocklistop\": \"add\", "
       << "\"addr\": \"" << locker_addr << "\"";
-  if (m_blacklist_expire_seconds != 0) {
-    cmd << ", \"expire\": " << m_blacklist_expire_seconds << ".0";
+  if (m_blocklist_expire_seconds != 0) {
+    cmd << ", \"expire\": " << m_blocklist_expire_seconds << ".0";
   }
   cmd << "}";
 
@@ -173,15 +173,15 @@ void BreakRequest<I>::send_blacklist() {
   m_asio_engine.get_rados_api().mon_command(
     {cmd.str()}, in_bl, nullptr, nullptr,
     librbd::asio::util::get_callback_adapter(
-      [this](int r) { handle_blacklist(r); }));
+      [this](int r) { handle_blocklist(r); }));
 }
 
 template <typename I>
-void BreakRequest<I>::handle_blacklist(int r) {
+void BreakRequest<I>::handle_blocklist(int r) {
   ldout(m_cct, 10) << "r=" << r << dendl;
 
   if (r < 0) {
-    lderr(m_cct) << "failed to blacklist lock owner: " << cpp_strerror(r)
+    lderr(m_cct) << "failed to blocklist lock owner: " << cpp_strerror(r)
                  << dendl;
     finish(r);
     return;
index 3c812999810f7137d66379a9dfc54cc51135002d..dd46bbcc579f9583cf3fdd4cdb4161d8edb2bdc4 100644 (file)
@@ -32,11 +32,11 @@ public:
   static BreakRequest* create(librados::IoCtx& ioctx,
                               AsioEngine& asio_engine,
                               const std::string& oid, const Locker &locker,
-                              bool exclusive, bool blacklist_locker,
-                              uint32_t blacklist_expire_seconds,
+                              bool exclusive, bool blocklist_locker,
+                              uint32_t blocklist_expire_seconds,
                               bool force_break_lock, Context *on_finish) {
     return new BreakRequest(ioctx, asio_engine, oid, locker, exclusive,
-                            blacklist_locker, blacklist_expire_seconds,
+                            blocklist_locker, blocklist_expire_seconds,
                             force_break_lock, on_finish);
   }
 
@@ -55,7 +55,7 @@ private:
    * GET_LOCKER
    *    |
    *    v
-   * BLACKLIST (skip if disabled)
+   * BLOCKLIST (skip if disabled)
    *    |
    *    v
    * WAIT_FOR_OSD_MAP
@@ -75,8 +75,8 @@ private:
   std::string m_oid;
   Locker m_locker;
   bool m_exclusive;
-  bool m_blacklist_locker;
-  uint32_t m_blacklist_expire_seconds;
+  bool m_blocklist_locker;
+  uint32_t m_blocklist_expire_seconds;
   bool m_force_break_lock;
   Context *m_on_finish;
 
@@ -89,8 +89,8 @@ private:
 
   BreakRequest(librados::IoCtx& ioctx, AsioEngine& asio_engine,
                const std::string& oid, const Locker &locker,
-               bool exclusive, bool blacklist_locker,
-               uint32_t blacklist_expire_seconds, bool force_break_lock,
+               bool exclusive, bool blocklist_locker,
+               uint32_t blocklist_expire_seconds, bool force_break_lock,
                Context *on_finish);
 
   void send_get_watchers();
@@ -99,8 +99,8 @@ private:
   void send_get_locker();
   void handle_get_locker(int r);
 
-  void send_blacklist();
-  void handle_blacklist(int r);
+  void send_blocklist();
+  void handle_blocklist(int r);
 
   void wait_for_osd_map();
   void handle_wait_for_osd_map(int r);
index cf44cf385cb3a34df375489ab6e72b852bfa8af0..55d9133641abe481db7f9eac71129658fed185aa 100644 (file)
@@ -58,7 +58,7 @@ void RewatchRequest::handle_unwatch(int r) {
   ldout(cct, 10) << "r=" << r << dendl;
 
   if (r == -EBLACKLISTED) {
-    lderr(cct) << "client blacklisted" << dendl;
+    lderr(cct) << "client blocklisted" << dendl;
     finish(r);
     return;
   } else if (r < 0) {
index 74886d626ff950f06c65add338111d833fa76c93..5612b9f994fdfb89217f2a2d974f8236ae265178 100644 (file)
@@ -906,7 +906,7 @@ void FSMap::assign_standby_replay(
   fs->mds_map.epoch = epoch;
 }
 
-void FSMap::erase(mds_gid_t who, epoch_t blacklist_epoch)
+void FSMap::erase(mds_gid_t who, epoch_t blocklist_epoch)
 {
   if (mds_roles.at(who) == FS_CLUSTER_ID_NONE) {
     standby_daemons.erase(who);
@@ -929,20 +929,20 @@ void FSMap::erase(mds_gid_t who, epoch_t blacklist_epoch)
       fs->mds_map.up.erase(info.rank);
     }
     fs->mds_map.mds_info.erase(who);
-    fs->mds_map.last_failure_osd_epoch = blacklist_epoch;
+    fs->mds_map.last_failure_osd_epoch = blocklist_epoch;
     fs->mds_map.epoch = epoch;
   }
 
   mds_roles.erase(who);
 }
 
-void FSMap::damaged(mds_gid_t who, epoch_t blacklist_epoch)
+void FSMap::damaged(mds_gid_t who, epoch_t blocklist_epoch)
 {
   ceph_assert(mds_roles.at(who) != FS_CLUSTER_ID_NONE);
   auto fs = filesystems.at(mds_roles.at(who));
   mds_rank_t rank = fs->mds_map.mds_info[who].rank;
 
-  erase(who, blacklist_epoch);
+  erase(who, blocklist_epoch);
   fs->mds_map.failed.erase(rank);
   fs->mds_map.damaged.insert(rank);
 
index d8b496d58eebbe68e82a15e50583735dab21ac25..9b426f02584a4182d88304698ec45a85ac66b5cb 100644 (file)
@@ -346,12 +346,12 @@ public:
    * The rank held by 'who', if any, is to be relinquished, and
    * the state for the daemon GID is to be forgotten.
    */
-  void erase(mds_gid_t who, epoch_t blacklist_epoch);
+  void erase(mds_gid_t who, epoch_t blocklist_epoch);
 
   /**
    * Update to indicate that the rank held by 'who' is damaged
    */
-  void damaged(mds_gid_t who, epoch_t blacklist_epoch);
+  void damaged(mds_gid_t who, epoch_t blocklist_epoch);
 
   /**
    * Update to indicate that the rank `rank` is to be removed
index 79aa4f11017e93e8dab4a8dee98dc38935c8cfc6..7e867bae48bdf6960a4c088e26f7682e7da02296 100644 (file)
@@ -2448,7 +2448,7 @@ void Locker::revoke_stale_cap(CInode *in, client_t client)
 
   if (cap->revoking() & CEPH_CAP_ANY_WR) {
     std::stringstream ss;
-    mds->evict_client(client.v, false, g_conf()->mds_session_blacklist_on_timeout, ss, nullptr);
+    mds->evict_client(client.v, false, g_conf()->mds_session_blocklist_on_timeout, ss, nullptr);
     return;
   }
 
index 76d455cb2d0e54bb8f5ec311fbd88c82cd1641ed..acc55a26455700fa96d79d47d3cbaf31289bdddb 100644 (file)
@@ -98,7 +98,7 @@ class C_MDL_WriteError : public MDSIOContextBase {
     // assume journal is reliable, so don't choose action based on
     // g_conf()->mds_action_on_write_error.
     if (r == -EBLACKLISTED) {
-      derr << "we have been blacklisted (fenced), respawning..." << dendl;
+      derr << "we have been blocklisted (fenced), respawning..." << dendl;
       mds->respawn();
     } else {
       derr << "unhandled error " << cpp_strerror(r) << ", shutting down..." << dendl;
@@ -974,8 +974,8 @@ void MDLog::_recovery_thread(MDSContext *completion)
     int write_result = jp.save(mds->objecter);
     // Nothing graceful we can do for this
     ceph_assert(write_result >= 0);
-  } else if (read_result == -EBLACKLISTED) {
-    derr << "Blacklisted during JournalPointer read!  Respawning..." << dendl;
+  } else if (read_result == -EBLOCKLISTED) {
+    derr << "Blocklisted during JournalPointer read!  Respawning..." << dendl;
     mds->respawn();
     ceph_abort(); // Should be unreachable because respawn calls execv
   } else if (read_result != 0) {
@@ -1009,8 +1009,8 @@ void MDLog::_recovery_thread(MDSContext *completion)
     C_SaferCond recover_wait;
     back.recover(&recover_wait);
     int recovery_result = recover_wait.wait();
-    if (recovery_result == -EBLACKLISTED) {
-      derr << "Blacklisted during journal recovery!  Respawning..." << dendl;
+    if (recovery_result == -EBLOCKLISTED) {
+      derr << "Blocklisted during journal recovery!  Respawning..." << dendl;
       mds->respawn();
       ceph_abort(); // Should be unreachable because respawn calls execv
     } else if (recovery_result != 0) {
@@ -1057,8 +1057,8 @@ void MDLog::_recovery_thread(MDSContext *completion)
   int recovery_result = recover_wait.wait();
   dout(4) << "Journal " << jp.front << " recovered." << dendl;
 
-  if (recovery_result == -EBLACKLISTED) {
-    derr << "Blacklisted during journal recovery!  Respawning..." << dendl;
+  if (recovery_result == -EBLOCKLISTED) {
+    derr << "Blocklisted during journal recovery!  Respawning..." << dendl;
     mds->respawn();
     ceph_abort(); // Should be unreachable because respawn calls execv
   } else if (recovery_result != 0) {
index 94726a2cb4f45d2c77b7e30be5a163c0ed2aff35..447ef823553226684f1e29d48c06ce0de714907b 100644 (file)
@@ -108,7 +108,7 @@ void MDSIOContextBase::complete(int r) {
   }
 
   if (r == -EBLACKLISTED) {
-    derr << "MDSIOContextBase: blacklisted!  Restarting..." << dendl;
+    derr << "MDSIOContextBase: blocklisted!  Restarting..." << dendl;
     mds->respawn();
   } else {
     MDSContext::complete(r);
index 4efd32f472daeda33b547ceffbe5926aac8f00c6..b3b8b7c7bff68ba79739db37b79d0f51bb479f11 100644 (file)
@@ -560,7 +560,7 @@ protected:
   uint32_t flags = CEPH_MDSMAP_DEFAULTS; // flags
   epoch_t last_failure = 0;  // mds epoch of last failure
   epoch_t last_failure_osd_epoch = 0; // osd epoch of last failure; any mds entering replay needs
-                                  // at least this osdmap to ensure the blacklist propagates.
+                                  // at least this osdmap to ensure the blocklist propagates.
   utime_t created;
   utime_t modified;
 
index cf2fd084499c0f723feece9a7b5839bdc1fb90e1..d1376dbe1d4a95666519b5f66a6fb57aea3cd9ba 100644 (file)
@@ -950,7 +950,7 @@ void MDSRank::damaged_unlocked()
 void MDSRank::handle_write_error(int err)
 {
   if (err == -EBLACKLISTED) {
-    derr << "we have been blacklisted (fenced), respawning..." << dendl;
+    derr << "we have been blocklisted (fenced), respawning..." << dendl;
     respawn();
     return;
   }
@@ -1317,7 +1317,7 @@ void MDSRank::heartbeat_reset()
   }
 
   // NB not enabling suicide grace, because the mon takes care of killing us
-  // (by blacklisting us) when we fail to send beacons, and it's simpler to
+  // (by blocklisting us) when we fail to send beacons, and it's simpler to
   // only have one way of dying.
   g_ceph_context->get_heartbeat_map()->reset_timeout(hb,
     ceph::make_timespan(heartbeat_grace),
@@ -1496,7 +1496,7 @@ void MDSRank::send_message_client(const ref_t<Message>& m, Session* session)
 
 /**
  * This is used whenever a RADOS operation has been cancelled
- * or a RADOS client has been blacklisted, to cause the MDS and
+ * or a RADOS client has been blocklisted, to cause the MDS and
  * any clients to wait for this OSD epoch before using any new caps.
  *
  * See doc/cephfs/eviction
@@ -1727,7 +1727,7 @@ void MDSRank::replay_start()
     boot_start();
   } else {
     dout(1) << " waiting for osdmap " << mdsmap->get_last_failure_osd_epoch()
-           << " (which blacklists prior instance)" << dendl;
+           << " (which blocklists prior instance)" << dendl;
     Context *fin = new C_IO_Wrapper(this, new C_MDS_BootStart(this, MDS_BOOT_INITIAL));
     objecter->wait_for_map(
       mdsmap->get_last_failure_osd_epoch(),
@@ -1800,7 +1800,7 @@ void MDSRank::standby_replay_restart()
     } else {
       auto fin = new C_IO_Wrapper(this, new C_MDS_StandbyReplayRestart(this));
       dout(1) << " waiting for osdmap " << mdsmap->get_last_failure_osd_epoch()
-             << " (which blacklists prior instance)" << dendl;
+             << " (which blocklists prior instance)" << dendl;
       objecter->wait_for_map(mdsmap->get_last_failure_osd_epoch(),
                             lambdafy(fin));
     }
@@ -1914,18 +1914,18 @@ void MDSRank::reconnect_start()
     reopen_log();
   }
 
-  // Drop any blacklisted clients from the SessionMap before going
+  // Drop any blocklisted clients from the SessionMap before going
   // into reconnect, so that we don't wait for them.
-  objecter->enable_blacklist_events();
-  std::set<entity_addr_t> blacklist;
+  objecter->enable_blocklist_events();
+  std::set<entity_addr_t> blocklist;
   epoch_t epoch = 0;
-  objecter->with_osdmap([&blacklist, &epoch](const OSDMap& o) {
-      o.get_blacklist(&blacklist);
+  objecter->with_osdmap([&blocklist, &epoch](const OSDMap& o) {
+      o.get_blocklist(&blocklist);
       epoch = o.get_epoch();
   });
-  auto killed = server->apply_blacklist(blacklist);
-  dout(4) << "reconnect_start: killed " << killed << " blacklisted sessions ("
-          << blacklist.size() << " blacklist entries, "
+  auto killed = server->apply_blocklist(blocklist);
+  dout(4) << "reconnect_start: killed " << killed << " blocklisted sessions ("
+          << blocklist.size() << " blocklist entries, "
           << sessionmap.get_sessions().size() << ")" << dendl;
   if (killed) {
     set_osd_epoch_barrier(epoch);
@@ -2141,7 +2141,7 @@ void MDSRank::boot_create()
   mdlog->flush();
 
   // Usually we do this during reconnect, but creation skips that.
-  objecter->enable_blacklist_events();
+  objecter->enable_blocklist_events();
 
   fin.activate();
 }
@@ -2169,7 +2169,7 @@ void MDSRank::stopping_start()
     for (const auto &s : victims) {
       std::stringstream ss;
       evict_client(s->get_client().v, false,
-                   g_conf()->mds_session_blacklist_on_evict, ss, gather.new_sub());
+                   g_conf()->mds_session_blocklist_on_evict, ss, gather.new_sub());
     }
     gather.activate();
   }
@@ -2587,7 +2587,7 @@ void MDSRankDispatcher::handle_asok_command(
     }
     std::lock_guard l(mds_lock);
     bool evicted = evict_client(strtol(client_id.c_str(), 0, 10), true,
-        g_conf()->mds_session_blacklist_on_evict, ss);
+        g_conf()->mds_session_blocklist_on_evict, ss);
     if (!evicted) {
       dout(15) << ss.str() << dendl;
       r = -ENOENT;
@@ -2817,7 +2817,7 @@ void MDSRankDispatcher::evict_clients(
   for (const auto s : victims) {
     std::stringstream ss;
     evict_client(s->get_client().v, false,
-                 g_conf()->mds_session_blacklist_on_evict, ss, gather.new_sub());
+                 g_conf()->mds_session_blocklist_on_evict, ss, gather.new_sub());
   }
   gather.activate();
 }
@@ -3366,12 +3366,12 @@ void MDSRankDispatcher::handle_osd_map()
 
   purge_queue.update_op_limit(*mdsmap);
 
-  std::set<entity_addr_t> newly_blacklisted;
-  objecter->consume_blacklist_events(&newly_blacklisted);
+  std::set<entity_addr_t> newly_blocklisted;
+  objecter->consume_blocklist_events(&newly_blocklisted);
   auto epoch = objecter->with_osdmap([](const OSDMap &o){return o.get_epoch();});
   dout(4) << "handle_osd_map epoch " << epoch << ", "
-          << newly_blacklisted.size() << " new blacklist entries" << dendl;
-  auto victims = server->apply_blacklist(newly_blacklisted);
+          << newly_blocklisted.size() << " new blocklist entries" << dendl;
+  auto victims = server->apply_blocklist(newly_blocklisted);
   if (victims) {
     set_osd_epoch_barrier(epoch);
   }
@@ -3420,7 +3420,7 @@ int MDSRank::config_client(int64_t session_id, bool remove,
 }
 
 bool MDSRank::evict_client(int64_t session_id,
-    bool wait, bool blacklist, std::ostream& err_ss,
+    bool wait, bool blocklist, std::ostream& err_ss,
     Context *on_killed)
 {
   ceph_assert(ceph_mutex_is_locked_by_me(mds_lock));
@@ -3443,15 +3443,15 @@ bool MDSRank::evict_client(int64_t session_id,
   auto& addr = session->info.inst.addr;
   {
     CachedStackStringStream css;
-    *css << "Evicting " << (blacklist ? "(and blacklisting) " : "")
+    *css << "Evicting " << (blocklist ? "(and blocklisting) " : "")
          << "client session " << session_id << " (" << addr << ")";
     dout(1) << css->strv() << dendl;
     clog->info() << css->strv();
   }
 
-  dout(4) << "Preparing blacklist command... (wait=" << wait << ")" << dendl;
+  dout(4) << "Preparing blocklist command... (wait=" << wait << ")" << dendl;
   stringstream ss;
-  ss << "{\"prefix\":\"osd blacklist\", \"blacklistop\":\"add\",";
+  ss << "{\"prefix\":\"osd blocklist\", \"blocklistop\":\"add\",";
   ss << "\"addr\":\"";
   ss << addr;
   ss << "\"}";
@@ -3475,7 +3475,7 @@ bool MDSRank::evict_client(int64_t session_id,
       }
     } else {
       dout(1) << "session " << session_id << " was removed while we waited "
-      "for blacklist" << dendl;
+      "for blocklist" << dendl;
 
       // Even though it wasn't us that removed it, kick our completion
       // as the session has been removed.
@@ -3485,10 +3485,10 @@ bool MDSRank::evict_client(int64_t session_id,
     }
   };
 
-  auto apply_blacklist = [this, cmd](std::function<void ()> fn){
+  auto apply_blocklist = [this, cmd](std::function<void ()> fn){
     ceph_assert(ceph_mutex_is_locked_by_me(mds_lock));
 
-    Context *on_blacklist_done = new LambdaContext([this, fn](int r) {
+    Context *on_blocklist_done = new LambdaContext([this, fn](int r) {
       objecter->wait_for_latest_osdmap(
       lambdafy((new C_OnFinisher(
          new LambdaContext([this, fn](int r) {
@@ -3504,14 +3504,14 @@ bool MDSRank::evict_client(int64_t session_id,
       )));
     });
 
-    dout(4) << "Sending mon blacklist command: " << cmd[0] << dendl;
-    monc->start_mon_command(cmd, {}, nullptr, nullptr, on_blacklist_done);
+    dout(4) << "Sending mon blocklist command: " << cmd[0] << dendl;
+    monc->start_mon_command(cmd, {}, nullptr, nullptr, on_blocklist_done);
   };
 
   if (wait) {
-    if (blacklist) {
+    if (blocklist) {
       C_SaferCond inline_ctx;
-      apply_blacklist([&inline_ctx](){inline_ctx.complete(0);});
+      apply_blocklist([&inline_ctx](){inline_ctx.complete(0);});
       mds_lock.unlock();
       inline_ctx.wait();
       mds_lock.lock();
@@ -3522,13 +3522,13 @@ bool MDSRank::evict_client(int64_t session_id,
           session_id));
     if (!session) {
       dout(1) << "session " << session_id << " was removed while we waited "
-                 "for blacklist" << dendl;
+                 "for blocklist" << dendl;
       return true;
     }
     kill_client_session();
   } else {
-    if (blacklist) {
-      apply_blacklist(kill_client_session);
+    if (blocklist) {
+      apply_blocklist(kill_client_session);
     } else {
       kill_client_session();
     }
index 1af66e933b5e401130ea75a793018948178c07be..80124b1da3a9ae180619423a448b1bb6cdeaa91a 100644 (file)
@@ -336,7 +336,7 @@ class MDSRank {
       return map_targets.count(rank);
     }
 
-    bool evict_client(int64_t session_id, bool wait, bool blacklist,
+    bool evict_client(int64_t session_id, bool wait, bool blocklist,
                       std::ostream& ss, Context *on_killed=nullptr);
     int config_client(int64_t session_id, bool remove,
                      const std::string& option, const std::string& value,
index 77fbd9e13dbe0b3e26a2b364f3637fa95ba06fa4..f2aff6a2c1fb9296ea00ebc8fe577ede17a6c462 100644 (file)
@@ -468,11 +468,11 @@ void Server::finish_reclaim_session(Session *session, const ref_t<MClientReclaim
       send_reply = nullptr;
     }
 
-    bool blacklisted = mds->objecter->with_osdmap([target](const OSDMap &map) {
-         return map.is_blacklisted(target->info.inst.addr);
+    bool blocklisted = mds->objecter->with_osdmap([target](const OSDMap &map) {
+         return map.is_blocklisted(target->info.inst.addr);
        });
 
-    if (blacklisted || !g_conf()->mds_session_blacklist_on_evict) {
+    if (blocklisted || !g_conf()->mds_session_blocklist_on_evict) {
       kill_session(target, send_reply);
     } else {
       std::stringstream ss;
@@ -591,14 +591,14 @@ void Server::handle_client_session(const cref_t<MClientSession> &m)
         log_session_status("REJECTED", err_str);
       };
 
-      bool blacklisted = mds->objecter->with_osdmap(
+      bool blocklisted = mds->objecter->with_osdmap(
          [&addr](const OSDMap &osd_map) -> bool {
-           return osd_map.is_blacklisted(addr);
+           return osd_map.is_blocklisted(addr);
          });
 
-      if (blacklisted) {
-       dout(10) << "rejecting blacklisted client " << addr << dendl;
-       send_reject_message("blacklisted");
+      if (blocklisted) {
+       dout(10) << "rejecting blocklisted client " << addr << dendl;
+       send_reject_message("blocklisted");
        session->clear();
        break;
       }
@@ -907,8 +907,8 @@ version_t Server::prepare_force_open_sessions(map<client_t,entity_inst_t>& cm,
   mds->objecter->with_osdmap(
       [this, &cm, &cmm](const OSDMap &osd_map) {
        for (auto p = cm.begin(); p != cm.end(); ) {
-         if (osd_map.is_blacklisted(p->second.addr)) {
-           dout(10) << " ignoring blacklisted client." << p->first
+         if (osd_map.is_blocklisted(p->second.addr)) {
+           dout(10) << " ignoring blocklisted client." << p->first
                     << " (" <<  p->second.addr << ")" << dendl;
            cmm.erase(p->first);
            cm.erase(p++);
@@ -1146,7 +1146,7 @@ void Server::find_idle_sessions()
     dout(10) << "autoclosing stale session " << session->info.inst
             << " last renewed caps " << last_cap_renew_span << "s ago" << dendl;
 
-    if (g_conf()->mds_session_blacklist_on_timeout) {
+    if (g_conf()->mds_session_blocklist_on_timeout) {
       std::stringstream ss;
       mds->evict_client(session->get_client().v, false, true, ss, nullptr);
     } else {
@@ -1171,7 +1171,7 @@ void Server::evict_cap_revoke_non_responders() {
 
     std::stringstream ss;
     bool evicted = mds->evict_client(client.v, false,
-                                     g_conf()->mds_session_blacklist_on_evict,
+                                     g_conf()->mds_session_blocklist_on_evict,
                                      ss, nullptr);
     if (evicted && logger) {
       logger->inc(l_mdss_cap_revoke_eviction);
@@ -1230,7 +1230,7 @@ void Server::kill_session(Session *session, Context *on_safe, bool need_purge_in
   }
 }
 
-size_t Server::apply_blacklist(const std::set<entity_addr_t> &blacklist)
+size_t Server::apply_blocklist(const std::set<entity_addr_t> &blocklist)
 {
   bool prenautilus = mds->objecter->with_osdmap(
       [&](const OSDMap& o) {
@@ -1241,23 +1241,23 @@ size_t Server::apply_blacklist(const std::set<entity_addr_t> &blacklist)
   const auto& sessions = mds->sessionmap.get_sessions();
   for (const auto& p : sessions) {
     if (!p.first.is_client()) {
-      // Do not apply OSDMap blacklist to MDS daemons, we find out
+      // Do not apply OSDMap blocklist to MDS daemons, we find out
       // about their death via MDSMap.
       continue;
     }
 
     Session *s = p.second;
     auto inst_addr = s->info.inst.addr;
-    // blacklist entries are always TYPE_ANY for nautilus+
+    // blocklist entries are always TYPE_ANY for nautilus+
     inst_addr.set_type(entity_addr_t::TYPE_ANY);
-    if (blacklist.count(inst_addr)) {
+    if (blocklist.count(inst_addr)) {
       victims.push_back(s);
       continue;
     }
     if (prenautilus) {
       // ...except pre-nautilus, they were TYPE_LEGACY
       inst_addr.set_type(entity_addr_t::TYPE_LEGACY);
-      if (blacklist.count(inst_addr)) {
+      if (blocklist.count(inst_addr)) {
        victims.push_back(s);
       }
     }
@@ -1267,7 +1267,7 @@ size_t Server::apply_blacklist(const std::set<entity_addr_t> &blacklist)
     kill_session(s, nullptr);
   }
 
-  dout(10) << "apply_blacklist: killed " << victims.size() << dendl;
+  dout(10) << "apply_blocklist: killed " << victims.size() << dendl;
 
   return victims.size();
 }
@@ -1546,18 +1546,18 @@ void Server::update_required_client_features()
       feature_bitset_t missing_features = required_client_features;
       missing_features -= session->info.client_metadata.features;
       if (!missing_features.empty()) {
-       bool blacklisted = mds->objecter->with_osdmap(
+       bool blocklisted = mds->objecter->with_osdmap(
            [session](const OSDMap &osd_map) -> bool {
-             return osd_map.is_blacklisted(session->info.inst.addr);
+             return osd_map.is_blocklisted(session->info.inst.addr);
            });
-       if (blacklisted)
+       if (blocklisted)
          continue;
 
        mds->clog->warn() << "evicting session " << *session << ", missing required features '"
                          << missing_features << "'";
        std::stringstream ss;
        mds->evict_client(session->get_client().v, false,
-                         g_conf()->mds_session_blacklist_on_evict, ss);
+                         g_conf()->mds_session_blocklist_on_evict, ss);
       }
     }
   }
@@ -1631,7 +1631,7 @@ void Server::reconnect_tick()
   dout(7) << "reconnect timed out, " << remaining_sessions.size()
           << " clients have not reconnected in time" << dendl;
 
-  // If we're doing blacklist evictions, use this to wait for them before
+  // If we're doing blocklist evictions, use this to wait for them before
   // proceeding to reconnect_gather_finish
   MDSGatherBuilder gather(g_ceph_context);
 
@@ -1653,7 +1653,7 @@ void Server::reconnect_tick()
                      << ", after waiting " << elapse1
                      << " seconds during MDS startup";
 
-    if (g_conf()->mds_session_blacklist_on_timeout) {
+    if (g_conf()->mds_session_blocklist_on_timeout) {
       std::stringstream ss;
       mds->evict_client(session->get_client().v, false, true, ss,
                        gather.new_sub());
index f5f44f44d64ddd3f5e9f290e32748b5022a61d09..52d4958972966387df6f4fa74a711e0a091318df 100644 (file)
@@ -129,7 +129,7 @@ public:
   void terminate_sessions();
   void find_idle_sessions();
   void kill_session(Session *session, Context *on_safe, bool need_purge_inos = false);
-  size_t apply_blacklist(const std::set<entity_addr_t> &blacklist);
+  size_t apply_blocklist(const std::set<entity_addr_t> &blocklist);
   void journal_close_session(Session *session, int state, Context *on_safe, bool need_purge_inos = false);
 
   size_t get_num_pending_reclaim() const { return client_reclaim_gather.size(); }
index 391d632cc75565ed13ef1744a175f0a5115b1ffb..b62b681d641739851acfcb3bc71b9ab566055f33 100644 (file)
@@ -1185,10 +1185,10 @@ PyMethodDef BaseMgrModule_methods[] = {
     METH_VARARGS, "Verify the current session caps are valid"},
 
   {"_ceph_register_client", (PyCFunction)ceph_register_client,
-    METH_VARARGS, "Register RADOS instance for potential blacklisting"},
+    METH_VARARGS, "Register RADOS instance for potential blocklisting"},
 
   {"_ceph_unregister_client", (PyCFunction)ceph_unregister_client,
-    METH_VARARGS, "Unregister RADOS instance for potential blacklisting"},
+    METH_VARARGS, "Unregister RADOS instance for potential blocklisting"},
 
   {NULL, NULL, 0, NULL}
 };
index c107703e45521d51e6ac778f2e106791f094602f..24fb4e7dc81c579551434a8f94c62bfe3ae03085 100644 (file)
@@ -232,7 +232,7 @@ static void handle_mgr_signal(int signum)
   derr << " *** Got signal " << sig_str(signum) << " ***" << dendl;
 
   // The python modules don't reliably shut down, so don't even
-  // try. The mon will blacklist us (and all of our rados/cephfs
+  // try. The mon will blocklist us (and all of our rados/cephfs
   // clients) anyway. Just exit!
 
   _exit(0);  // exit with 0 result code, as if we had done an orderly shutdown
@@ -269,9 +269,9 @@ void Mgr::init()
   cluster_state.with_mgrmap([&e](const MgrMap& m) {
     e = m.last_failure_osd_epoch;
   });
-  /* wait for any blacklists to be applied to previous mgr instance */
+  /* wait for any blocklists to be applied to previous mgr instance */
   dout(4) << "Waiting for new OSDMap (e=" << e
-          << ") that may blacklist prior active." << dendl;
+          << ") that may blocklist prior active." << dendl;
   objecter->wait_for_osd_map(e);
   lock.lock();
 
index 79374518865709bb39692fe7c2d560bb0f9bc65b..7a84c59061e78f4a0e68c73f26a567cdbe803dac 100644 (file)
@@ -210,7 +210,7 @@ void MgrStandby::send_beacon()
 
   auto clients = py_module_registry.get_clients();
   for (const auto& client : clients) {
-    dout(15) << "noting RADOS client for blacklist: " << client << dendl;
+    dout(15) << "noting RADOS client for blocklist: " << client << dendl;
   }
 
   // Whether I think I am available (request MgrMonitor to set me
index 474c8ab4faf16f49e928bf3b7822147cce553de4..28a2fd015598223a8503309f4909e9c6ed55111e 100644 (file)
@@ -849,7 +849,7 @@ class RemoveFilesystemHandler : public FileSystemCommandHandler
       const cmdmap_t& cmdmap,
       std::stringstream &ss) override
   {
-    /* We may need to blacklist ranks. */
+    /* We may need to blocklist ranks. */
     if (!mon->osdmon()->is_writeable()) {
       // not allowed to write yet, so retry when we can
       mon->osdmon()->wait_for_writeable(op, new PaxosService::C_RetryMessage(mon->mdsmon(), op));
@@ -900,7 +900,7 @@ class RemoveFilesystemHandler : public FileSystemCommandHandler
       mon->mdsmon()->fail_mds_gid(fsmap, gid);
     }
     if (!to_fail.empty()) {
-      mon->osdmon()->propose_pending(); /* maybe new blacklists */
+      mon->osdmon()->propose_pending(); /* maybe new blocklists */
     }
 
     fsmap.erase_filesystem(fs->fscid);
index 03239e93ce38406d20fa463023a6885a153a0203..2a8e2742e8632dc5f1c8a4296584c97e0955a717 100644 (file)
@@ -773,7 +773,7 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
     } else if (state == MDSMap::STATE_DAMAGED) {
       if (!mon->osdmon()->is_writeable()) {
         dout(1) << __func__ << ": DAMAGED from rank " << info.rank
-                << " waiting for osdmon writeable to blacklist it" << dendl;
+                << " waiting for osdmon writeable to blocklist it" << dendl;
         mon->osdmon()->wait_for_writeable(op, new C_RetryMessage(this, op));
         return false;
       }
@@ -784,10 +784,10 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
               << info.rank << " damaged" << dendl;
 
       utime_t until = ceph_clock_now();
-      until += g_conf().get_val<double>("mon_mds_blacklist_interval");
-      const auto blacklist_epoch = mon->osdmon()->blacklist(info.addrs, until);
+      until += g_conf().get_val<double>("mon_mds_blocklist_interval");
+      const auto blocklist_epoch = mon->osdmon()->blocklist(info.addrs, until);
       request_proposal(mon->osdmon());
-      pending.damaged(gid, blacklist_epoch);
+      pending.damaged(gid, blocklist_epoch);
       last_beacon.erase(gid);
 
       // Respond to MDS, so that it knows it can continue to shut down
@@ -799,7 +799,7 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
     } else if (state == MDSMap::STATE_DNE) {
       if (!mon->osdmon()->is_writeable()) {
         dout(1) << __func__ << ": DNE from rank " << info.rank
-                << " waiting for osdmon writeable to blacklist it" << dendl;
+                << " waiting for osdmon writeable to blocklist it" << dendl;
         mon->osdmon()->wait_for_writeable(op, new C_RetryMessage(this, op));
         return false;
       }
@@ -1227,21 +1227,21 @@ bool MDSMonitor::fail_mds_gid(FSMap &fsmap, mds_gid_t gid)
 
   ceph_assert(mon->osdmon()->is_writeable());
 
-  epoch_t blacklist_epoch = 0;
+  epoch_t blocklist_epoch = 0;
   if (info.rank >= 0 && info.state != MDSMap::STATE_STANDBY_REPLAY) {
     utime_t until = ceph_clock_now();
-    until += g_conf().get_val<double>("mon_mds_blacklist_interval");
-    blacklist_epoch = mon->osdmon()->blacklist(info.addrs, until);
+    until += g_conf().get_val<double>("mon_mds_blocklist_interval");
+    blocklist_epoch = mon->osdmon()->blocklist(info.addrs, until);
   }
 
-  fsmap.erase(gid, blacklist_epoch);
+  fsmap.erase(gid, blocklist_epoch);
   last_beacon.erase(gid);
   if (pending_daemon_health.count(gid)) {
     pending_daemon_health.erase(gid);
     pending_daemon_health_rm.insert(gid);
   }
 
-  return blacklist_epoch != 0;
+  return blocklist_epoch != 0;
 }
 
 mds_gid_t MDSMonitor::gid_from_arg(const FSMap &fsmap, const std::string &arg, std::ostream &ss)
@@ -2060,7 +2060,7 @@ bool MDSMonitor::check_health(FSMap& fsmap, bool* propose_osdmap)
               << " (gid: " << gid << " addr: " << info.addrs
               << " state: " << ceph_mds_state_name(info.state) << ")"
               << " since " << since_last.count() << dendl;
-      // If the OSDMap is writeable, we can blacklist things, so we can
+      // If the OSDMap is writeable, we can blocklist things, so we can
       // try failing any laggy MDS daemons.  Consider each one for failure.
       if (!info.laggy()) {
         dout(1)  << " marking " << gid << " " << info.addrs
index 9e4e838bda68bd191d99e9c79bd148fc863b9e4c..02dec34d30f88775cab1df5f017e91c47177927d 100644 (file)
@@ -66,7 +66,7 @@ class MDSMonitor : public PaxosService, public PaxosFSMap, protected CommandHand
   int print_nodes(ceph::Formatter *f);
 
   /**
-   * Return true if a blacklist was done (i.e. OSD propose needed)
+   * Return true if a blocklist was done (i.e. OSD propose needed)
    */
   bool fail_mds_gid(FSMap &fsmap, mds_gid_t gid);
 
index d43d9336c4e1fdc5c568161f5884c88c464475f0..aa576f32f7942acb0be76b5161134717610c5502 100644 (file)
@@ -238,7 +238,7 @@ public:
   /// features
   uint64_t active_mgr_features = 0;
 
-  std::vector<entity_addrvec_t> clients; // for blacklist
+  std::vector<entity_addrvec_t> clients; // for blocklist
 
   std::map<uint64_t, StandbyInfo> standbys;
 
index 7651a0542516ce8293cb9c473872d30012b81a42..b75114734124cf3afa4571562b2e1e89f38d07b8 100644 (file)
@@ -494,7 +494,7 @@ bool MgrMonitor::prepare_beacon(MonOpRequestRef op)
                       << " restarted";
     if (!mon->osdmon()->is_writeable()) {
       dout(1) << __func__ << ":  waiting for osdmon writeable to"
-                 " blacklist old instance." << dendl;
+                 " blocklist old instance." << dendl;
       mon->osdmon()->wait_for_writeable(op, new C_RetryMessage(this, op));
       return false;
     }
@@ -883,15 +883,15 @@ void MgrMonitor::drop_active()
 
   ceph_assert(pending_map.active_gid > 0);
   auto until = ceph_clock_now();
-  until += g_conf().get_val<double>("mon_mgr_blacklist_interval");
-  dout(5) << "blacklisting previous mgr." << pending_map.active_name << "."
+  until += g_conf().get_val<double>("mon_mgr_blocklist_interval");
+  dout(5) << "blocklisting previous mgr." << pending_map.active_name << "."
           << pending_map.active_gid << " ("
           << pending_map.active_addrs << ")" << dendl;
-  auto blacklist_epoch = mon->osdmon()->blacklist(pending_map.active_addrs, until);
+  auto blocklist_epoch = mon->osdmon()->blocklist(pending_map.active_addrs, until);
 
-  /* blacklist RADOS clients in use by the mgr */
+  /* blocklist RADOS clients in use by the mgr */
   for (const auto& a : pending_map.clients) {
-    mon->osdmon()->blacklist(a, until);
+    mon->osdmon()->blocklist(a, until);
   }
   request_proposal(mon->osdmon());
 
@@ -905,7 +905,7 @@ void MgrMonitor::drop_active()
   pending_map.active_addrs = entity_addrvec_t();
   pending_map.services.clear();
   pending_map.clients.clear();
-  pending_map.last_failure_osd_epoch = blacklist_epoch;
+  pending_map.last_failure_osd_epoch = blocklist_epoch;
 
   // So that when new active mgr subscribes to mgrdigest, it will
   // get an immediate response instead of waiting for next timer
index b5c5ab6a5bf32763d31558f13c296d20fe7a916a..b550ad7dd3ec1995258c93eafa174af6debb7b99 100644 (file)
@@ -189,7 +189,8 @@ void MonCapGrant::expand_profile(const EntityName& name) const
     profile_grants.push_back(MonCapGrant("osd", MON_CAP_R));
     // This command grant is checked explicitly in MRemoveSnaps handling
     profile_grants.push_back(MonCapGrant("osd pool rmsnap"));
-    profile_grants.push_back(MonCapGrant("osd blacklist"));
+    profile_grants.push_back(MonCapGrant("osd blocklist"));
+    profile_grants.push_back(MonCapGrant("osd blacklist")); // for compat
     profile_grants.push_back(MonCapGrant("log", MON_CAP_W));
   }
   if (profile == "mgr") {
@@ -293,7 +294,14 @@ void MonCapGrant::expand_profile(const EntityName& name) const
     profile_grants.push_back(MonCapGrant("osd", MON_CAP_R));
     profile_grants.push_back(MonCapGrant("pg", MON_CAP_R));
 
-    // exclusive lock dead-client blacklisting (IP+nonce required)
+    // exclusive lock dead-client blocklisting (IP+nonce required)
+    profile_grants.push_back(MonCapGrant("osd blocklist"));
+    profile_grants.back().command_args["blocklistop"] = StringConstraint(
+      StringConstraint::MATCH_TYPE_EQUAL, "add");
+    profile_grants.back().command_args["addr"] = StringConstraint(
+      StringConstraint::MATCH_TYPE_REGEX, "^[^/]+/[0-9]+$");
+
+    // for compat,
     profile_grants.push_back(MonCapGrant("osd blacklist"));
     profile_grants.back().command_args["blacklistop"] = StringConstraint(
       StringConstraint::MATCH_TYPE_EQUAL, "add");
index 172db0562d9cafeda268421d3df2df323bb13f3c..fc6e6442c6df0dd37a6fdff59efb744ef8f74ed8 100644 (file)
@@ -996,14 +996,27 @@ COMMAND("osd new "
         "exist and have been previously destroyed. "
         "Reads secrets from JSON file via `-i <file>` (see man page).",
         "osd", "rw")
-COMMAND("osd blacklist "
+COMMAND("osd blocklist "
+       "name=blocklistop,type=CephChoices,strings=add|rm "
+       "name=addr,type=CephEntityAddr "
+       "name=expire,type=CephFloat,range=0.0,req=false",
+       "add (optionally until <expire> seconds from now) or remove <addr> from blocklist",
+       "osd", "rw")
+COMMAND("osd blocklist ls", "show blocklisted clients", "osd", "r")
+COMMAND("osd blocklist clear", "clear all blocklisted clients", "osd", "rw")
+
+COMMAND_WITH_FLAG("osd blacklist "
        "name=blacklistop,type=CephChoices,strings=add|rm "
        "name=addr,type=CephEntityAddr "
        "name=expire,type=CephFloat,range=0.0,req=false",
        "add (optionally until <expire> seconds from now) or remove <addr> from blacklist",
-       "osd", "rw")
-COMMAND("osd blacklist ls", "show blacklisted clients", "osd", "r")
-COMMAND("osd blacklist clear", "clear all blacklisted clients", "osd", "rw")
+       "osd", "rw",
+       FLAG(DEPRECATED))
+COMMAND_WITH_FLAG("osd blacklist ls", "show blacklisted clients", "osd", "r",
+       FLAG(DEPRECATED))
+COMMAND_WITH_FLAG("osd blacklist clear", "clear all blacklisted clients", "osd", "rw",
+       FLAG(DEPRECATED))
+
 COMMAND("osd pool mksnap "
        "name=pool,type=CephPoolname "
        "name=snap,type=CephString",
index 1234f93accde40628b4629931c2341580d18284f..fc4bf04e12f0444e2cc9fc0b9fa5a60944e1dfbe 100644 (file)
@@ -1843,12 +1843,12 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t)
          pending_inc.new_pools[i.first].flags |= pg_pool_t::FLAG_CREATING;
        }
       }
-      // adjust blacklist items to all be TYPE_ANY
-      for (auto& i : tmp.blacklist) {
+      // adjust blocklist items to all be TYPE_ANY
+      for (auto& i : tmp.blocklist) {
        auto a = i.first;
        a.set_type(entity_addr_t::TYPE_ANY);
-       pending_inc.new_blacklist[a] = i.second;
-       pending_inc.old_blacklist.push_back(i.first);
+       pending_inc.new_blocklist[a] = i.second;
+       pending_inc.old_blocklist.push_back(i.first);
       }
     }
 
@@ -4717,29 +4717,29 @@ int OSDMonitor::get_version_full(version_t ver, uint64_t features,
   return 0;
 }
 
-epoch_t OSDMonitor::blacklist(const entity_addrvec_t& av, utime_t until)
+epoch_t OSDMonitor::blocklist(const entity_addrvec_t& av, utime_t until)
 {
-  dout(10) << "blacklist " << av << " until " << until << dendl;
+  dout(10) << "blocklist " << av << " until " << until << dendl;
   for (auto a : av.v) {
     if (osdmap.require_osd_release >= ceph_release_t::nautilus) {
       a.set_type(entity_addr_t::TYPE_ANY);
     } else {
       a.set_type(entity_addr_t::TYPE_LEGACY);
     }
-    pending_inc.new_blacklist[a] = until;
+    pending_inc.new_blocklist[a] = until;
   }
   return pending_inc.epoch;
 }
 
-epoch_t OSDMonitor::blacklist(entity_addr_t a, utime_t until)
+epoch_t OSDMonitor::blocklist(entity_addr_t a, utime_t until)
 {
   if (osdmap.require_osd_release >= ceph_release_t::nautilus) {
     a.set_type(entity_addr_t::TYPE_ANY);
   } else {
     a.set_type(entity_addr_t::TYPE_LEGACY);
   }
-  dout(10) << "blacklist " << a << " until " << until << dendl;
-  pending_inc.new_blacklist[a] = until;
+  dout(10) << "blocklist " << a << " until " << until << dendl;
+  pending_inc.new_blocklist[a] = until;
   return pending_inc.epoch;
 }
 
@@ -5157,13 +5157,13 @@ void OSDMonitor::tick()
     dout(10) << "tick NOOUT flag set, not checking down osds" << dendl;
   }
 
-  // expire blacklisted items?
-  for (ceph::unordered_map<entity_addr_t,utime_t>::iterator p = osdmap.blacklist.begin();
-       p != osdmap.blacklist.end();
+  // expire blocklisted items?
+  for (ceph::unordered_map<entity_addr_t,utime_t>::iterator p = osdmap.blocklist.begin();
+       p != osdmap.blocklist.end();
        ++p) {
     if (p->second < now) {
-      dout(10) << "expiring blacklist item " << p->first << " expired " << p->second << " < now " << now << dendl;
-      pending_inc.old_blacklist.push_back(p->first);
+      dout(10) << "expiring blocklist item " << p->first << " expired " << p->second << " < now " << now << dendl;
+      pending_inc.old_blocklist.push_back(p->first);
       do_propose = true;
     }
   }
@@ -5919,12 +5919,13 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
       f->flush(ds);
     }
     rdata.append(ds);
-  } else if (prefix == "osd blacklist ls") {
+  } else if (prefix == "osd blocklist ls" ||
+            prefix == "osd blacklist ls") {
     if (f)
-      f->open_array_section("blacklist");
+      f->open_array_section("blocklist");
 
-    for (ceph::unordered_map<entity_addr_t,utime_t>::iterator p = osdmap.blacklist.begin();
-        p != osdmap.blacklist.end();
+    for (ceph::unordered_map<entity_addr_t,utime_t>::iterator p = osdmap.blocklist.begin();
+        p != osdmap.blocklist.end();
         ++p) {
       if (f) {
        f->open_object_section("entry");
@@ -5944,7 +5945,7 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
       f->close_section();
       f->flush(rdata);
     }
-    ss << "listed " << osdmap.blacklist.size() << " entries";
+    ss << "listed " << osdmap.blocklist.size() << " entries";
 
   } else if (prefix == "osd pool ls") {
     string detail;
@@ -12375,19 +12376,21 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
                                get_last_committed() + 1));
     return true;
 
-  } else if (prefix == "osd blacklist clear") {
-    pending_inc.new_blacklist.clear();
-    std::list<std::pair<entity_addr_t,utime_t > > blacklist;
-    osdmap.get_blacklist(&blacklist);
-    for (const auto &entry : blacklist) {
-      pending_inc.old_blacklist.push_back(entry.first);
+  } else if (prefix == "osd blocklist clear" ||
+            prefix == "osd blacklist clear") {
+    pending_inc.new_blocklist.clear();
+    std::list<std::pair<entity_addr_t,utime_t > > blocklist;
+    osdmap.get_blocklist(&blocklist);
+    for (const auto &entry : blocklist) {
+      pending_inc.old_blocklist.push_back(entry.first);
     }
-    ss << " removed all blacklist entries";
+    ss << " removed all blocklist entries";
     getline(ss, rs);
     wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
                                               get_last_committed() + 1));
     return true;
-  } else if (prefix == "osd blacklist") {
+  } else if (prefix == "osd blocklist" ||
+            prefix == "osd blacklist") {
     string addrstr;
     cmd_getval(cmdmap, "addr", addrstr);
     entity_addr_t addr;
@@ -12398,52 +12401,54 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
     }
     else {
       if (osdmap.require_osd_release >= ceph_release_t::nautilus) {
-       // always blacklist type ANY
+       // always blocklist type ANY
        addr.set_type(entity_addr_t::TYPE_ANY);
       } else {
        addr.set_type(entity_addr_t::TYPE_LEGACY);
       }
 
-      string blacklistop;
-      cmd_getval(cmdmap, "blacklistop", blacklistop);
-      if (blacklistop == "add") {
+      string blocklistop;
+      if (!cmd_getval(cmdmap, "blocklistop", blocklistop)) {
+       cmd_getval(cmdmap, "blacklistop", blocklistop);
+      }
+      if (blocklistop == "add") {
        utime_t expires = ceph_clock_now();
        double d;
        // default one hour
        cmd_getval(cmdmap, "expire", d,
-          g_conf()->mon_osd_blacklist_default_expire);
+          g_conf()->mon_osd_blocklist_default_expire);
        expires += d;
 
-       pending_inc.new_blacklist[addr] = expires;
+       pending_inc.new_blocklist[addr] = expires;
 
         {
-          // cancel any pending un-blacklisting request too
-          auto it = std::find(pending_inc.old_blacklist.begin(),
-            pending_inc.old_blacklist.end(), addr);
-          if (it != pending_inc.old_blacklist.end()) {
-            pending_inc.old_blacklist.erase(it);
+          // cancel any pending un-blocklisting request too
+          auto it = std::find(pending_inc.old_blocklist.begin(),
+            pending_inc.old_blocklist.end(), addr);
+          if (it != pending_inc.old_blocklist.end()) {
+            pending_inc.old_blocklist.erase(it);
           }
         }
 
-       ss << "blacklisting " << addr << " until " << expires << " (" << d << " sec)";
+       ss << "blocklisting " << addr << " until " << expires << " (" << d << " sec)";
        getline(ss, rs);
        wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
                                                  get_last_committed() + 1));
        return true;
-      } else if (blacklistop == "rm") {
-       if (osdmap.is_blacklisted(addr) ||
-           pending_inc.new_blacklist.count(addr)) {
-         if (osdmap.is_blacklisted(addr))
-           pending_inc.old_blacklist.push_back(addr);
+      } else if (blocklistop == "rm") {
+       if (osdmap.is_blocklisted(addr) ||
+           pending_inc.new_blocklist.count(addr)) {
+         if (osdmap.is_blocklisted(addr))
+           pending_inc.old_blocklist.push_back(addr);
          else
-           pending_inc.new_blacklist.erase(addr);
-         ss << "un-blacklisting " << addr;
+           pending_inc.new_blocklist.erase(addr);
+         ss << "un-blocklisting " << addr;
          getline(ss, rs);
          wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
                                                    get_last_committed() + 1));
          return true;
        }
-       ss << addr << " isn't blacklisted";
+       ss << addr << " isn't blocklisted";
        err = 0;
        goto reply;
       }
index 3362c0f9513d242fa1195acb77b277f1ccf7f27d..c226118e1cb0de169149ca372aada4c1d16ed1ae 100644 (file)
@@ -748,8 +748,8 @@ public:
   int get_inc(version_t ver, OSDMap::Incremental& inc);
   int get_full_from_pinned_map(version_t ver, ceph::buffer::list& bl);
 
-  epoch_t blacklist(const entity_addrvec_t& av, utime_t until);
-  epoch_t blacklist(entity_addr_t a, utime_t until);
+  epoch_t blocklist(const entity_addrvec_t& av, utime_t until);
+  epoch_t blocklist(entity_addr_t a, utime_t until);
 
   void dump_info(ceph::Formatter *f);
   int dump_osd_metadata(int osd, ceph::Formatter *f, std::ostream *err);
index 1ea0a1da76b5c26d0b59ce2b7a62710e3c850436..76a1c1ac2a7665a465f41d2610c755a8b3993b14 100644 (file)
@@ -477,7 +477,7 @@ struct entity_addr_t {
       encode(type, bl);
     } else {
       // map any -> legacy for old clients.  this is primary for the benefit
-      // of OSDMap's blacklist, but is reasonable in general since any: is
+      // of OSDMap's blocklist, but is reasonable in general since any: is
       // meaningless for pre-nautilus clients or daemons.
       auto t = type;
       if (t == TYPE_ANY) {
index 607f572028e145b61dd89adc8fdcb6a919517a67..eff4759417f5545f4e9d49f5749671093a8a7cad 100644 (file)
@@ -2529,12 +2529,12 @@ will start to track new ops received afterwards.";
     f->open_object_section("pq");
     op_shardedwq.dump(f);
     f->close_section();
-  } else if (prefix == "dump_blacklist") {
+  } else if (prefix == "dump_blocklist") {
     list<pair<entity_addr_t,utime_t> > bl;
     OSDMapRef curmap = service.get_osdmap();
 
-    f->open_array_section("blacklist");
-    curmap->get_blacklist(&bl);
+    f->open_array_section("blocklist");
+    curmap->get_blocklist(&bl);
     for (list<pair<entity_addr_t,utime_t> >::iterator it = bl.begin();
        it != bl.end(); ++it) {
       f->open_object_section("entry");
@@ -2544,7 +2544,7 @@ will start to track new ops received afterwards.";
       it->second.localtime(f->dump_stream("expire_time"));
       f->close_section(); //entry
     }
-    f->close_section(); //blacklist
+    f->close_section(); //blocklist
   } else if (prefix == "dump_watchers") {
     list<obj_watch_item_t> watchers;
     // scan pg's
@@ -3727,9 +3727,9 @@ void OSD::final_init()
                                     asok_hook,
                                     "dump op priority queue state");
   ceph_assert(r == 0);
-  r = admin_socket->register_command("dump_blacklist",
+  r = admin_socket->register_command("dump_blocklist",
                                     asok_hook,
-                                    "dump blacklisted clients and times");
+                                    "dump blocklisted clients and times");
   ceph_assert(r == 0);
   r = admin_socket->register_command("dump_watchers",
                                     asok_hook,
@@ -8104,7 +8104,7 @@ void OSD::_committed_osd_maps(epoch_t first, epoch_t last, MOSDMap *m)
     OSDMapRef newmap = get_map(cur);
     ceph_assert(newmap);  // we just cached it above!
 
-    // start blacklisting messages sent to peers that go down.
+    // start blocklisting messages sent to peers that go down.
     service.pre_publish_map(newmap);
 
     // kill connections to newly down osds
index c2b036560ef262e8617b90c6117a62f198c097b1..e61780ccda2d645f104f4d928f403b6bb67655ef 100644 (file)
@@ -514,8 +514,8 @@ void OSDMap::Incremental::encode_classic(ceph::buffer::list& bl, uint64_t featur
   encode(new_up_thru, bl);
   encode(new_last_clean_interval, bl);
   encode(new_lost, bl);
-  encode(new_blacklist, bl, features);
-  encode(old_blacklist, bl, features);
+  encode(new_blocklist, bl, features);
+  encode(old_blocklist, bl, features);
   encode(new_up_cluster, bl, features);
   encode(cluster_snapshot, bl);
   encode(new_uuid, bl);
@@ -661,8 +661,8 @@ void OSDMap::Incremental::encode(ceph::buffer::list& bl, uint64_t features) cons
     encode(new_up_thru, bl);
     encode(new_last_clean_interval, bl);
     encode(new_lost, bl);
-    encode(new_blacklist, bl, features);
-    encode(old_blacklist, bl, features);
+    encode(new_blocklist, bl, features);
+    encode(old_blocklist, bl, features);
     if (target_v < 7) {
       encode_addrvec_map_as_addr(new_up_cluster, bl, features);
     } else {
@@ -803,8 +803,8 @@ void OSDMap::Incremental::decode_classic(ceph::buffer::list::const_iterator &p)
   decode(new_up_thru, p);
   decode(new_last_clean_interval, p);
   decode(new_lost, p);
-  decode(new_blacklist, p);
-  decode(old_blacklist, p);
+  decode(new_blocklist, p);
+  decode(old_blocklist, p);
   if (ev >= 6)
     decode(new_up_cluster, p);
   if (ev >= 7)
@@ -907,8 +907,8 @@ void OSDMap::Incremental::decode(ceph::buffer::list::const_iterator& bl)
     decode(new_up_thru, bl);
     decode(new_last_clean_interval, bl);
     decode(new_lost, bl);
-    decode(new_blacklist, bl);
-    decode(old_blacklist, bl);
+    decode(new_blocklist, bl);
+    decode(old_blocklist, bl);
     decode(new_up_cluster, bl);
     decode(cluster_snapshot, bl);
     decode(new_uuid, bl);
@@ -1193,15 +1193,15 @@ void OSDMap::Incremental::dump(Formatter *f) const
   }
   f->close_section();
 
-  f->open_array_section("new_blacklist");
-  for (const auto &blist : new_blacklist) {
+  f->open_array_section("new_blocklist");
+  for (const auto &blist : new_blocklist) {
     stringstream ss;
     ss << blist.first;
     f->dump_stream(ss.str().c_str()) << blist.second;
   }
   f->close_section();
-  f->open_array_section("old_blacklist");
-  for (const auto &blist : old_blacklist)
+  f->open_array_section("old_blocklist");
+  for (const auto &blist : old_blocklist)
     f->dump_stream("addr") << blist;
   f->close_section();
 
@@ -1304,13 +1304,13 @@ void OSDMap::set_epoch(epoch_t e)
     pool.second.last_change = e;
 }
 
-bool OSDMap::is_blacklisted(const entity_addr_t& orig) const
+bool OSDMap::is_blocklisted(const entity_addr_t& orig) const
 {
-  if (blacklist.empty()) {
+  if (blocklist.empty()) {
     return false;
   }
 
-  // all blacklist entries are type ANY for nautilus+
+  // all blocklist entries are type ANY for nautilus+
   // FIXME: avoid this copy!
   entity_addr_t a = orig;
   if (require_osd_release < ceph_release_t::nautilus) {
@@ -1320,15 +1320,15 @@ bool OSDMap::is_blacklisted(const entity_addr_t& orig) const
   }
 
   // this specific instance?
-  if (blacklist.count(a)) {
+  if (blocklist.count(a)) {
     return true;
   }
 
-  // is entire ip blacklisted?
+  // is entire ip blocklisted?
   if (a.is_ip()) {
     a.set_port(0);
     a.set_nonce(0);
-    if (blacklist.count(a)) {
+    if (blocklist.count(a)) {
       return true;
     }
   }
@@ -1336,13 +1336,13 @@ bool OSDMap::is_blacklisted(const entity_addr_t& orig) const
   return false;
 }
 
-bool OSDMap::is_blacklisted(const entity_addrvec_t& av) const
+bool OSDMap::is_blocklisted(const entity_addrvec_t& av) const
 {
-  if (blacklist.empty())
+  if (blocklist.empty())
     return false;
 
   for (auto& a : av.v) {
-    if (is_blacklisted(a)) {
+    if (is_blocklisted(a)) {
       return true;
     }
   }
@@ -1350,14 +1350,14 @@ bool OSDMap::is_blacklisted(const entity_addrvec_t& av) const
   return false;
 }
 
-void OSDMap::get_blacklist(list<pair<entity_addr_t,utime_t> > *bl) const
+void OSDMap::get_blocklist(list<pair<entity_addr_t,utime_t> > *bl) const
 {
-   std::copy(blacklist.begin(), blacklist.end(), std::back_inserter(*bl));
+   std::copy(blocklist.begin(), blocklist.end(), std::back_inserter(*bl));
 }
 
-void OSDMap::get_blacklist(std::set<entity_addr_t> *bl) const
+void OSDMap::get_blocklist(std::set<entity_addr_t> *bl) const
 {
-  for (const auto &i : blacklist) {
+  for (const auto &i : blocklist) {
     bl->insert(i.first);
   }
 }
@@ -2028,7 +2028,7 @@ bool OSDMap::clean_pg_upmaps(
 
 int OSDMap::apply_incremental(const Incremental &inc)
 {
-  new_blacklist_entries = false;
+  new_blocklist_entries = false;
   if (inc.epoch == 1)
     fsid = inc.fsid;
   else if (inc.fsid != fsid)
@@ -2235,13 +2235,13 @@ int OSDMap::apply_incremental(const Incremental &inc)
     pg_upmap_items.erase(pg);
   }
 
-  // blacklist
-  if (!inc.new_blacklist.empty()) {
-    blacklist.insert(inc.new_blacklist.begin(),inc.new_blacklist.end());
-    new_blacklist_entries = true;
+  // blocklist
+  if (!inc.new_blocklist.empty()) {
+    blocklist.insert(inc.new_blocklist.begin(),inc.new_blocklist.end());
+    new_blocklist_entries = true;
   }
-  for (const auto &addr : inc.old_blacklist)
-    blacklist.erase(addr);
+  for (const auto &addr : inc.old_blocklist)
+    blocklist.erase(addr);
 
   for (auto& i : inc.new_crush_node_flags) {
     if (i.second) {
@@ -2858,7 +2858,7 @@ void OSDMap::encode_classic(ceph::buffer::list& bl, uint64_t features) const
   encode(ev, bl);
   encode(osd_addrs->hb_back_addrs, bl, features);
   encode(osd_info, bl);
-  encode(blacklist, bl, features);
+  encode(blocklist, bl, features);
   encode(osd_addrs->cluster_addrs, bl, features);
   encode(cluster_snapshot_epoch, bl);
   encode(cluster_snapshot, bl);
@@ -3003,10 +3003,10 @@ void OSDMap::encode(ceph::buffer::list& bl, uint64_t features) const
     {
       // put this in a sorted, ordered map<> so that we encode in a
       // deterministic order.
-      map<entity_addr_t,utime_t> blacklist_map;
-      for (const auto &addr : blacklist)
-       blacklist_map.insert(make_pair(addr.first, addr.second));
-      encode(blacklist_map, bl, features);
+      map<entity_addr_t,utime_t> blocklist_map;
+      for (const auto &addr : blocklist)
+       blocklist_map.insert(make_pair(addr.first, addr.second));
+      encode(blocklist_map, bl, features);
     }
     if (target_v < 7) {
       encode_addrvec_pvec_as_addr(osd_addrs->cluster_addrs, bl, features);
@@ -3165,7 +3165,7 @@ void OSDMap::decode_classic(ceph::buffer::list::const_iterator& p)
   if (v < 5)
     decode(pool_name, p);
 
-  decode(blacklist, p);
+  decode(blocklist, p);
   if (ev >= 6)
     decode(osd_addrs->cluster_addrs, p);
   else
@@ -3304,7 +3304,7 @@ void OSDMap::decode(ceph::buffer::list::const_iterator& bl)
     DECODE_START(9, bl); // extended, osd-only data
     decode(osd_addrs->hb_back_addrs, bl);
     decode(osd_info, bl);
-    decode(blacklist, bl);
+    decode(blocklist, bl);
     decode(osd_addrs->cluster_addrs, bl);
     decode(cluster_snapshot_epoch, bl);
     decode(cluster_snapshot, bl);
@@ -3572,8 +3572,8 @@ void OSDMap::dump(Formatter *f) const
   }
   f->close_section(); // primary_temp
 
-  f->open_object_section("blacklist");
-  for (const auto &addr : blacklist) {
+  f->open_object_section("blocklist");
+  for (const auto &addr : blocklist) {
     stringstream ss;
     ss << addr.first;
     f->dump_stream(ss.str().c_str()) << addr.second;
@@ -3664,7 +3664,7 @@ void OSDMap::generate_test_instances(list<OSDMap*>& o)
   uuid_d fsid;
   o.back()->build_simple(cct, 1, fsid, 16);
   o.back()->created = o.back()->modified = utime_t(1, 2);  // fix timestamp
-  o.back()->blacklist[entity_addr_t()] = utime_t(5, 6);
+  o.back()->blocklist[entity_addr_t()] = utime_t(5, 6);
   cct->put();
 }
 
@@ -3825,8 +3825,8 @@ void OSDMap::print(ostream& out) const
   for (const auto pg : *primary_temp)
     out << "primary_temp " << pg.first << " " << pg.second << "\n";
 
-  for (const auto &addr : blacklist)
-    out << "blacklist " << addr.first << " expires " << addr.second << "\n";
+  for (const auto &addr : blocklist)
+    out << "blocklist " << addr.first << " expires " << addr.second << "\n";
 }
 
 class OSDTreePlainDumper : public CrushTreeDumper::Dumper<TextTable> {
index 424d9869cca091de2e6185548b52b17b02b5aa1e..2e0a3c8206fa00f04eab46307937a7760a77e22d 100644 (file)
@@ -389,8 +389,8 @@ public:
     mempool::osdmap::map<int32_t,uuid_d> new_uuid;
     mempool::osdmap::map<int32_t,osd_xinfo_t> new_xinfo;
 
-    mempool::osdmap::map<entity_addr_t,utime_t> new_blacklist;
-    mempool::osdmap::vector<entity_addr_t> old_blacklist;
+    mempool::osdmap::map<entity_addr_t,utime_t> new_blocklist;
+    mempool::osdmap::vector<entity_addr_t> old_blocklist;
     mempool::osdmap::map<int32_t, entity_addrvec_t> new_hb_back_up;
     mempool::osdmap::map<int32_t, entity_addrvec_t> new_hb_front_up;
 
@@ -576,7 +576,7 @@ private:
   std::shared_ptr< mempool::osdmap::vector<uuid_d> > osd_uuid;
   mempool::osdmap::vector<osd_xinfo_t> osd_xinfo;
 
-  mempool::osdmap::unordered_map<entity_addr_t,utime_t> blacklist;
+  mempool::osdmap::unordered_map<entity_addr_t,utime_t> blocklist;
 
   /// queue of snaps to remove
   mempool::osdmap::map<int64_t, snap_interval_set_t> removed_snaps_queue;
@@ -589,7 +589,7 @@ private:
 
   epoch_t cluster_snapshot_epoch;
   std::string cluster_snapshot;
-  bool new_blacklist_entries;
+  bool new_blocklist_entries;
 
   float full_ratio = 0, backfillfull_ratio = 0, nearfull_ratio = 0;
 
@@ -629,7 +629,7 @@ private:
             primary_temp(std::make_shared<mempool::osdmap::map<pg_t,int32_t>>()),
             osd_uuid(std::make_shared<mempool::osdmap::vector<uuid_d>>()),
             cluster_snapshot_epoch(0),
-            new_blacklist_entries(false),
+            new_blocklist_entries(false),
             cached_up_osd_features(0),
             crc_defined(false), crc(0),
             crush(std::make_shared<CrushWrapper>()) {
@@ -680,10 +680,10 @@ public:
   const utime_t& get_created() const { return created; }
   const utime_t& get_modified() const { return modified; }
 
-  bool is_blacklisted(const entity_addr_t& a) const;
-  bool is_blacklisted(const entity_addrvec_t& a) const;
-  void get_blacklist(std::list<std::pair<entity_addr_t,utime_t > > *bl) const;
-  void get_blacklist(std::set<entity_addr_t> *bl) const;
+  bool is_blocklisted(const entity_addr_t& a) const;
+  bool is_blocklisted(const entity_addrvec_t& a) const;
+  void get_blocklist(std::list<std::pair<entity_addr_t,utime_t > > *bl) const;
+  void get_blocklist(std::set<entity_addr_t> *bl) const;
 
   std::string get_cluster_snapshot() const {
     if (cluster_snapshot_epoch == epoch)
@@ -1520,7 +1520,7 @@ public:
   void dump_osd(int id, ceph::Formatter *f) const;
   void dump_osds(ceph::Formatter *f) const;
   static void generate_test_instances(std::list<OSDMap*>& o);
-  bool check_new_blacklist_entries() const { return new_blacklist_entries; }
+  bool check_new_blocklist_entries() const { return new_blocklist_entries; }
 
   void check_health(CephContext *cct, health_check_map_t *checks) const;
 
index 322bea953b0db677fd08d959bc5288c9a81e164b..737601b57e895970ec2538c1a63dc905d4f0175e 100644 (file)
@@ -462,8 +462,8 @@ void PeeringState::activate_map(PeeringCtx &rctx)
   }
   write_if_dirty(rctx.transaction);
 
-  if (get_osdmap()->check_new_blacklist_entries()) {
-    pl->check_blacklisted_watchers();
+  if (get_osdmap()->check_new_blocklist_entries()) {
+    pl->check_blocklisted_watchers();
   }
 }
 
index bea01410ba3fbf145b4d9686ad5d063bac899c16..710a77e95679e6bd9f04ae73c3bb538bbf2874c1 100644 (file)
@@ -357,8 +357,8 @@ public:
 
     /// Notification to check outstanding operation targets
     virtual void check_recovery_sources(const OSDMapRef& newmap) = 0;
-    /// Notification to check outstanding blacklist
-    virtual void check_blacklisted_watchers() = 0;
+    /// Notification to check outstanding blocklist
+    virtual void check_blocklisted_watchers() = 0;
     /// Notification to clear state associated with primary
     virtual void clear_primary_state() = 0;
 
index 6bdeb246c63ae9dedcb753f9cbcf8316ec074694..860a1bd80132b615e2d4bc15af8d0d39b7927c11 100644 (file)
@@ -1945,10 +1945,10 @@ void PrimaryLogPG::do_op(OpRequestRef& op)
     return;
   }
 
-  // blacklisted?
-  if (get_osdmap()->is_blacklisted(m->get_source_addr())) {
-    dout(10) << "do_op " << m->get_source_addr() << " is blacklisted" << dendl;
-    osd->reply_op_error(op, -EBLACKLISTED);
+  // blocklisted?
+  if (get_osdmap()->is_blocklisted(m->get_source_addr())) {
+    dout(10) << "do_op " << m->get_source_addr() << " is blocklisted" << dendl;
+    osd->reply_op_error(op, -EBLOCKLISTED);
     return;
   }
 
@@ -10914,17 +10914,17 @@ void PrimaryLogPG::get_obc_watchers(ObjectContextRef obc, list<obj_watch_item_t>
   }
 }
 
-void PrimaryLogPG::check_blacklisted_watchers()
+void PrimaryLogPG::check_blocklisted_watchers()
 {
-  dout(20) << "PrimaryLogPG::check_blacklisted_watchers for pg " << get_pgid() << dendl;
+  dout(20) << "PrimaryLogPG::check_blocklisted_watchers for pg " << get_pgid() << dendl;
   pair<hobject_t, ObjectContextRef> i;
   while (object_contexts.get_next(i.first, &i))
-    check_blacklisted_obc_watchers(i.second);
+    check_blocklisted_obc_watchers(i.second);
 }
 
-void PrimaryLogPG::check_blacklisted_obc_watchers(ObjectContextRef obc)
+void PrimaryLogPG::check_blocklisted_obc_watchers(ObjectContextRef obc)
 {
-  dout(20) << "PrimaryLogPG::check_blacklisted_obc_watchers for obc " << obc->obs.oi.soid << dendl;
+  dout(20) << "PrimaryLogPG::check_blocklisted_obc_watchers for obc " << obc->obs.oi.soid << dendl;
   for (map<pair<uint64_t, entity_name_t>, WatchRef>::iterator k =
         obc->watchers.begin();
        k != obc->watchers.end();
@@ -10934,8 +10934,8 @@ void PrimaryLogPG::check_blacklisted_obc_watchers(ObjectContextRef obc)
     dout(30) << "watch: Found " << j->second->get_entity() << " cookie " << j->second->get_cookie() << dendl;
     entity_addr_t ea = j->second->get_peer_addr();
     dout(30) << "watch: Check entity_addr_t " << ea << dendl;
-    if (get_osdmap()->is_blacklisted(ea)) {
-      dout(10) << "watch: Found blacklisted watcher for " << ea << dendl;
+    if (get_osdmap()->is_blocklisted(ea)) {
+      dout(10) << "watch: Found blocklisted watcher for " << ea << dendl;
       ceph_assert(j->second->get_pg() == this);
       j->second->unregister_cb();
       handle_watch_timeout(j->second);
@@ -10975,8 +10975,8 @@ void PrimaryLogPG::populate_obc_watchers(ObjectContextRef obc)
        make_pair(p->first.first, p->first.second),
        watch));
   }
-  // Look for watchers from blacklisted clients and drop
-  check_blacklisted_obc_watchers(obc);
+  // Look for watchers from blocklisted clients and drop
+  check_blocklisted_obc_watchers(obc);
 }
 
 void PrimaryLogPG::handle_watch_timeout(WatchRef watch)
index 84e503e98001897cf3c0e6571f6bdc3ab8e716d9..10269aad37edf00e0400462ade2690d482725c77 100644 (file)
@@ -1053,8 +1053,8 @@ protected:
   std::map<hobject_t, std::map<client_t, ceph_tid_t>> debug_op_order;
 
   void populate_obc_watchers(ObjectContextRef obc);
-  void check_blacklisted_obc_watchers(ObjectContextRef obc);
-  void check_blacklisted_watchers() override;
+  void check_blocklisted_obc_watchers(ObjectContextRef obc);
+  void check_blocklisted_watchers() override;
   void get_watchers(std::list<obj_watch_item_t> *ls) override;
   void get_obc_watchers(ObjectContextRef obc, std::list<obj_watch_item_t> &pg_watchers);
 public:
index 96a171ec766f9263f809c2be9a941438705f856f..97f0012fdba1e4f9018991a1b08a7d6047f5cde3 100644 (file)
@@ -51,8 +51,8 @@ const char* osd_error_category::message(int ev, char* buf,
   switch (static_cast<osd_errc>(ev)) {
   case osd_errc::old_snapc:
     return "ORDERSNAP flag set; writer has old snapc";
-  case osd_errc::blacklisted:
-    return "Blacklisted";
+  case osd_errc::blocklisted:
+    return "Blocklisted";
   }
 
   if (len) {
@@ -70,8 +70,8 @@ std::string osd_error_category::message(int ev) const {
   switch (static_cast<osd_errc>(ev)) {
   case osd_errc::old_snapc:
     return "ORDERSNAP flag set; writer has old snapc";
-  case osd_errc::blacklisted:
-    return "Blacklisted";
+  case osd_errc::blocklisted:
+    return "Blocklisted";
   }
 
   return cpp_strerror(ev);
@@ -79,7 +79,7 @@ std::string osd_error_category::message(int ev) const {
 
 boost::system::error_condition osd_error_category::default_error_condition(int ev) const noexcept {
   if (ev == static_cast<int>(osd_errc::old_snapc) ||
-      ev == static_cast<int>(osd_errc::blacklisted))
+      ev == static_cast<int>(osd_errc::blocklisted))
     return { ev, *this };
   else
     return { ev, boost::system::generic_category() };
@@ -89,7 +89,7 @@ bool osd_error_category::equivalent(int ev, const boost::system::error_condition
   switch (static_cast<osd_errc>(ev)) {
   case osd_errc::old_snapc:
       return c == boost::system::errc::invalid_argument;
-  case osd_errc::blacklisted:
+  case osd_errc::blocklisted:
       return c == boost::system::errc::operation_not_permitted;
   }
   return default_error_condition(ev) == c;
index ae112de2f0cfc0bc68b98684c25a4f9b8d1c044a..d36e79db4a8b62ea6b87a45eef7226116e58214d 100644 (file)
@@ -27,7 +27,7 @@ const boost::system::error_category& osd_category() noexcept;
 
 enum class osd_errc {
   old_snapc = 85,  /* ORDERSNAP flag set; writer has old snapc*/
-  blacklisted = 108 /* blacklisted */
+  blocklisted = 108 /* blocklisted */
 };
 
 namespace boost::system {
index a26d3e96029b5c5e1abbb14247b1cd342fc80648..f3d51851c43da12dcc16034689aa70a77e8f46aa 100644 (file)
@@ -418,8 +418,8 @@ void Journaler::_finish_reread_head_and_probe(int r, C_OnFinisher *onfinish)
   }
 
   // Let the caller know that the operation has failed or was intentionally
-  // failed since the caller has been blacklisted.
-  if (r == -EBLACKLISTED) {
+  // failed since the caller has been blocklisted.
+  if (r == -EBLOCKLISTED) {
     onfinish->complete(r);
     return;
   }
index 8a87ec5892db98edb51024d4ac5f16ec1e51939e..fcaa031a59febf787276564d4a9ed4bba3cd735a 100644 (file)
@@ -1179,7 +1179,7 @@ void Objecter::handle_osd_map(MOSDMap *m)
          OSDMap::Incremental inc(m->incremental_maps[e]);
          osdmap->apply_incremental(inc);
 
-          emit_blacklist_events(inc);
+          emit_blocklist_events(inc);
 
          logger->inc(l_osdc_map_inc);
        }
@@ -1188,7 +1188,7 @@ void Objecter::handle_osd_map(MOSDMap *m)
           auto new_osdmap = std::make_unique<OSDMap>();
           new_osdmap->decode(m->maps[e]);
 
-          emit_blacklist_events(*osdmap, *new_osdmap);
+          emit_blocklist_events(*osdmap, *new_osdmap);
           osdmap = std::move(new_osdmap);
 
          logger->inc(l_osdc_map_full);
@@ -1360,56 +1360,56 @@ void Objecter::handle_osd_map(MOSDMap *m)
   }
 }
 
-void Objecter::enable_blacklist_events()
+void Objecter::enable_blocklist_events()
 {
   unique_lock wl(rwlock);
 
-  blacklist_events_enabled = true;
+  blocklist_events_enabled = true;
 }
 
-void Objecter::consume_blacklist_events(std::set<entity_addr_t> *events)
+void Objecter::consume_blocklist_events(std::set<entity_addr_t> *events)
 {
   unique_lock wl(rwlock);
 
   if (events->empty()) {
-    events->swap(blacklist_events);
+    events->swap(blocklist_events);
   } else {
-    for (const auto &i : blacklist_events) {
+    for (const auto &i : blocklist_events) {
       events->insert(i);
     }
-    blacklist_events.clear();
+    blocklist_events.clear();
   }
 }
 
-void Objecter::emit_blacklist_events(const OSDMap::Incremental &inc)
+void Objecter::emit_blocklist_events(const OSDMap::Incremental &inc)
 {
-  if (!blacklist_events_enabled) {
+  if (!blocklist_events_enabled) {
     return;
   }
 
-  for (const auto &i : inc.new_blacklist) {
-    blacklist_events.insert(i.first);
+  for (const auto &i : inc.new_blocklist) {
+    blocklist_events.insert(i.first);
   }
 }
 
-void Objecter::emit_blacklist_events(const OSDMap &old_osd_map,
+void Objecter::emit_blocklist_events(const OSDMap &old_osd_map,
                                      const OSDMap &new_osd_map)
 {
-  if (!blacklist_events_enabled) {
+  if (!blocklist_events_enabled) {
     return;
   }
 
   std::set<entity_addr_t> old_set;
   std::set<entity_addr_t> new_set;
 
-  old_osd_map.get_blacklist(&old_set);
-  new_osd_map.get_blacklist(&new_set);
+  old_osd_map.get_blocklist(&old_set);
+  new_osd_map.get_blocklist(&new_set);
 
   std::set<entity_addr_t> delta_set;
   std::set_difference(
       new_set.begin(), new_set.end(), old_set.begin(), old_set.end(),
       std::inserter(delta_set, delta_set.begin()));
-  blacklist_events.insert(delta_set.begin(), delta_set.end());
+  blocklist_events.insert(delta_set.begin(), delta_set.end());
 }
 
 // op pool check
@@ -4619,24 +4619,27 @@ int Objecter::RequestStateHook::call(std::string_view command,
   return 0;
 }
 
-void Objecter::blacklist_self(bool set)
+void Objecter::blocklist_self(bool set)
 {
-  ldout(cct, 10) << "blacklist_self " << (set ? "add" : "rm") << dendl;
+  ldout(cct, 10) << "blocklist_self " << (set ? "add" : "rm") << dendl;
 
   vector<string> cmd;
-  cmd.push_back("{\"prefix\":\"osd blacklist\", ");
+  cmd.push_back("{\"prefix\":\"osd blocklist\", ");
   if (set)
-    cmd.push_back("\"blacklistop\":\"add\",");
+    cmd.push_back("\"blocklistop\":\"add\",");
   else
-    cmd.push_back("\"blacklistop\":\"rm\",");
+    cmd.push_back("\"blocklistop\":\"rm\",");
   stringstream ss;
-  // this is somewhat imprecise in that we are blacklisting our first addr only
+  // this is somewhat imprecise in that we are blocklisting our first addr only
   ss << messenger->get_myaddrs().front().get_legacy_str();
   cmd.push_back("\"addr\":\"" + ss.str() + "\"");
 
   auto m = new MMonCommand(monc->get_fsid());
   m->cmd = cmd;
 
+  // NOTE: no fallback to legacy blacklist command implemented here
+  // since this is only used for test code.
+
   monc->send_mon_message(m);
 }
 
@@ -4921,7 +4924,7 @@ Objecter::~Objecter()
  * sending any more operations to OSDs.  Use this
  * when it is known that the client can't trust
  * anything from before this epoch (e.g. due to
- * client blacklist at this epoch).
+ * client blocklist at this epoch).
  */
 void Objecter::set_epoch_barrier(epoch_t epoch)
 {
index 7341a719e7953891b0fa37b5ed6f3fe643429a78..f26896019f567c2023a51d068ebd2ff328a58d74 100644 (file)
@@ -1651,10 +1651,10 @@ private:
   bool honor_pool_full = true;
   bool pool_full_try = false;
 
-  // If this is true, accumulate a set of blacklisted entities
-  // to be drained by consume_blacklist_events.
-  bool blacklist_events_enabled = false;
-  std::set<entity_addr_t> blacklist_events;
+  // If this is true, accumulate a set of blocklisted entities
+  // to be drained by consume_blocklist_events.
+  bool blocklist_events_enabled = false;
+  std::set<entity_addr_t> blocklist_events;
   struct pg_mapping_t {
     epoch_t epoch = 0;
     std::vector<int> up;
@@ -1716,7 +1716,7 @@ private:
 public:
   void maybe_request_map();
 
-  void enable_blacklist_events();
+  void enable_blocklist_events();
 private:
 
   void _maybe_request_map();
@@ -2675,15 +2675,15 @@ private:
 
 
   /**
-   * Get std::list of entities blacklisted since this was last called,
+   * Get std::list of entities blocklisted since this was last called,
    * and reset the std::list.
    *
    * Uses a std::set because typical use case is to compare some
-   * other std::list of clients to see which overlap with the blacklisted
+   * other std::list of clients to see which overlap with the blocklisted
    * addrs.
    *
    */
-  void consume_blacklist_events(std::set<entity_addr_t> *events);
+  void consume_blocklist_events(std::set<entity_addr_t> *events);
 
   int pool_snap_by_name(int64_t poolid,
                        const char *snap_name,
@@ -2693,8 +2693,8 @@ private:
   int pool_snap_list(int64_t poolid, std::vector<uint64_t> *snaps);
 private:
 
-  void emit_blacklist_events(const OSDMap::Incremental &inc);
-  void emit_blacklist_events(const OSDMap &old_osd_map,
+  void emit_blocklist_events(const OSDMap::Incremental &inc);
+  void emit_blocklist_events(const OSDMap &old_osd_map,
                              const OSDMap &new_osd_map);
 
   // low-level
@@ -3888,7 +3888,7 @@ public:
   void ms_handle_remote_reset(Connection *con) override;
   bool ms_handle_refused(Connection *con) override;
 
-  void blacklist_self(bool set);
+  void blocklist_self(bool set);
 
 private:
   epoch_t epoch_barrier = 0;
index aecf1417835943cc302ccc0b6ad27c0d1361cddd..87725102bfdc35b61165197aa86dd075b3caf16b 100644 (file)
@@ -34,7 +34,7 @@ class IscsiService(CephadmService):
             'prefix': 'auth get-or-create',
             'entity': utils.name_to_auth_entity('iscsi', igw_id),
             'caps': ['mon', 'profile rbd, '
-                            'allow command "osd blacklist", '
+                            'allow command "osd blocklist", '
                             'allow command "config-key get" with "key" prefix "iscsi/"',
                      'osd', 'allow rwx'],
         })
index 8fe9f1ebeaab99d09960b98ea8f4030508c22e1c..6839170ce63cce99ab8542cdcf1476c996146159 100644 (file)
@@ -153,7 +153,7 @@ cdef extern from "rados/librados.h" nogil:
 
     int rados_cluster_stat(rados_t cluster, rados_cluster_stat_t *result)
     int rados_cluster_fsid(rados_t cluster, char *buf, size_t len)
-    int rados_blacklist_add(rados_t cluster, char *client_address, uint32_t expire_seconds)
+    int rados_blocklist_add(rados_t cluster, char *client_address, uint32_t expire_seconds)
     int rados_getaddrs(rados_t cluster, char** addrs)
     int rados_application_enable(rados_ioctx_t io, const char *app_name,
                                  int force)
@@ -1575,13 +1575,13 @@ Rados object in state %s." % self.state)
             ret = rados_wait_for_latest_osdmap(self.cluster)
         return ret
 
-    def blacklist_add(self, client_address, expire_seconds=0):
+    def blocklist_add(self, client_address, expire_seconds=0):
         """
-        Blacklist a client from the OSDs
+        Blocklist a client from the OSDs
 
         :param client_address: client address
         :type client_address: str
-        :param expire_seconds: number of seconds to blacklist
+        :param expire_seconds: number of seconds to blocklist
         :type expire_seconds: int
 
         :raises: :class:`Error`
@@ -1593,9 +1593,9 @@ Rados object in state %s." % self.state)
             char *_client_address = client_address
 
         with nogil:
-            ret = rados_blacklist_add(self.cluster, _client_address, _expire_seconds)
+            ret = rados_blocklist_add(self.cluster, _client_address, _expire_seconds)
         if ret < 0:
-            raise make_ex(ret, "error blacklisting client '%s'" % client_address)
+            raise make_ex(ret, "error blocklisting client '%s'" % client_address)
 
     def monitor_log(self, level, callback, arg):
         if level not in MONITOR_LEVELS:
index be698233b306aec02cb513d6f42d3d633d48649c..0c0d411fd91f8ba12c05656327f1b5f7d8e4e386 100644 (file)
@@ -2027,7 +2027,7 @@ static inline int rgw_get_request_metadata(CephContext* const cct,
                                            std::map<std::string, ceph::bufferlist>& attrs,
                                            const bool allow_empty_attrs = true)
 {
-  static const std::set<std::string> blacklisted_headers = {
+  static const std::set<std::string> blocklisted_headers = {
       "x-amz-server-side-encryption-customer-algorithm",
       "x-amz-server-side-encryption-customer-key",
       "x-amz-server-side-encryption-customer-key-md5",
@@ -2039,7 +2039,7 @@ static inline int rgw_get_request_metadata(CephContext* const cct,
     const std::string& name = kv.first;
     std::string& xattr = kv.second;
 
-    if (blacklisted_headers.count(name) == 1) {
+    if (blocklisted_headers.count(name) == 1) {
       lsubdout(cct, rgw, 10) << "skipping x>> " << name << dendl;
       continue;
     } else if (allow_empty_attrs || !xattr.empty()) {
index c0e2912c8063d0b7ae49c3c4611661b35a61ca3f..e91659f3c3f3d0f43e1c814fd27ad95ff87d4b44 100644 (file)
@@ -1043,10 +1043,10 @@ int Rados::aio_watch_flush(AioCompletion* c) {
   return impl->aio_watch_flush(c->pc);
 }
 
-int Rados::blacklist_add(const std::string& client_address,
+int Rados::blocklist_add(const std::string& client_address,
                         uint32_t expire_seconds) {
   TestRadosClient *impl = reinterpret_cast<TestRadosClient*>(client);
-  return impl->blacklist_add(client_address, expire_seconds);
+  return impl->blocklist_add(client_address, expire_seconds);
 }
 
 config_t Rados::cct() {
@@ -1218,7 +1218,7 @@ void Rados::shutdown() {
   client = NULL;
 }
 
-void Rados::test_blacklist_self(bool set) {
+void Rados::test_blocklist_self(bool set) {
 }
 
 int Rados::wait_for_latest_osdmap() {
index 1ee6ec4e0a7bf49139d5c146e4c3c3c7b572f074..65a1ac82eba0bcfd5366ebcf385e3a1dfe20b6c4 100644 (file)
@@ -33,11 +33,11 @@ public:
       get_mem_cluster()->get_pool(pool_name));
   }
 
-  MOCK_METHOD2(blacklist_add, int(const std::string& client_address,
+  MOCK_METHOD2(blocklist_add, int(const std::string& client_address,
                                   uint32_t expire_seconds));
-  int do_blacklist_add(const std::string& client_address,
+  int do_blocklist_add(const std::string& client_address,
                        uint32_t expire_seconds) {
-    return TestMemRadosClient::blacklist_add(client_address, expire_seconds);
+    return TestMemRadosClient::blocklist_add(client_address, expire_seconds);
   }
 
   MOCK_METHOD1(get_min_compatible_osd, int(int8_t*));
@@ -88,7 +88,7 @@ public:
 
     ON_CALL(*this, connect()).WillByDefault(Invoke(this, &MockTestMemRadosClient::do_connect));
     ON_CALL(*this, create_ioctx(_, _)).WillByDefault(Invoke(this, &MockTestMemRadosClient::do_create_ioctx));
-    ON_CALL(*this, blacklist_add(_, _)).WillByDefault(Invoke(this, &MockTestMemRadosClient::do_blacklist_add));
+    ON_CALL(*this, blocklist_add(_, _)).WillByDefault(Invoke(this, &MockTestMemRadosClient::do_blocklist_add));
     ON_CALL(*this, get_min_compatible_osd(_)).WillByDefault(Invoke(this, &MockTestMemRadosClient::do_get_min_compatible_osd));
     ON_CALL(*this, get_min_compatible_client(_, _)).WillByDefault(Invoke(this, &MockTestMemRadosClient::do_get_min_compatible_client));
     ON_CALL(*this, service_daemon_register(_, _, _)).WillByDefault(Invoke(this, &MockTestMemRadosClient::do_service_daemon_register));
index 0afc13de29c80a81202695763796d2d3b412b942..acaf8ea78c4a035b130a713a6b0a93047b2e36f7 100644 (file)
@@ -134,8 +134,8 @@ int TestIoCtxImpl::aio_watch(const std::string& o, AioCompletionImpl *c,
   m_pending_ops++;
   c->get();
   C_AioNotify *ctx = new C_AioNotify(this, c);
-  if (m_client->is_blacklisted()) {
-    m_client->get_aio_finisher()->queue(ctx, -EBLACKLISTED);
+  if (m_client->is_blocklisted()) {
+    m_client->get_aio_finisher()->queue(ctx, -EBLOCKLISTED);
   } else {
     m_client->get_watch_notify()->aio_watch(m_client, m_pool_id,
                                             get_namespace(), o,
@@ -149,8 +149,8 @@ int TestIoCtxImpl::aio_unwatch(uint64_t handle, AioCompletionImpl *c) {
   m_pending_ops++;
   c->get();
   C_AioNotify *ctx = new C_AioNotify(this, c);
-  if (m_client->is_blacklisted()) {
-    m_client->get_aio_finisher()->queue(ctx, -EBLACKLISTED);
+  if (m_client->is_blocklisted()) {
+    m_client->get_aio_finisher()->queue(ctx, -EBLOCKLISTED);
   } else {
     m_client->get_watch_notify()->aio_unwatch(m_client, handle, ctx);
   }
@@ -161,8 +161,8 @@ int TestIoCtxImpl::exec(const std::string& oid, TestClassHandler *handler,
                         const char *cls, const char *method,
                         bufferlist& inbl, bufferlist* outbl,
                         uint64_t snap_id, const SnapContext &snapc) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   cls_method_cxx_call_t call = handler->get_method(cls, method);
@@ -177,8 +177,8 @@ int TestIoCtxImpl::exec(const std::string& oid, TestClassHandler *handler,
 
 int TestIoCtxImpl::list_watchers(const std::string& o,
                                  std::list<obj_watch_t> *out_watchers) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   return m_client->get_watch_notify()->list_watchers(m_pool_id, get_namespace(),
@@ -187,8 +187,8 @@ int TestIoCtxImpl::list_watchers(const std::string& o,
 
 int TestIoCtxImpl::notify(const std::string& o, bufferlist& bl,
                           uint64_t timeout_ms, bufferlist *pbl) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   return m_client->get_watch_notify()->notify(m_client, m_pool_id,
@@ -273,8 +273,8 @@ void TestIoCtxImpl::set_snap_read(snap_t seq) {
 }
 
 int TestIoCtxImpl::tmap_update(const std::string& oid, bufferlist& cmdbl) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   // TODO: protect against concurrent tmap updates
@@ -330,8 +330,8 @@ int TestIoCtxImpl::tmap_update(const std::string& oid, bufferlist& cmdbl) {
 }
 
 int TestIoCtxImpl::unwatch(uint64_t handle) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   return m_client->get_watch_notify()->unwatch(m_client, handle);
@@ -339,8 +339,8 @@ int TestIoCtxImpl::unwatch(uint64_t handle) {
 
 int TestIoCtxImpl::watch(const std::string& o, uint64_t *handle,
                          librados::WatchCtx *ctx, librados::WatchCtx2 *ctx2) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   return m_client->get_watch_notify()->watch(m_client, m_pool_id,
@@ -351,8 +351,8 @@ int TestIoCtxImpl::watch(const std::string& o, uint64_t *handle,
 
 int TestIoCtxImpl::execute_operation(const std::string& oid,
                                      const Operation &operation) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   TestRadosClient::Transaction transaction(m_client, get_namespace(), oid);
@@ -364,8 +364,8 @@ int TestIoCtxImpl::execute_aio_operations(const std::string& oid,
                                           bufferlist *pbl, uint64_t snap_id,
                                           const SnapContext &snapc) {
   int ret = 0;
-  if (m_client->is_blacklisted()) {
-    ret = -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    ret = -EBLOCKLISTED;
   } else {
     TestRadosClient::Transaction transaction(m_client, get_namespace(), oid);
     for (ObjectOperations::iterator it = ops->ops.begin();
index 66139efcda7bc1ca6ae2110167c1b3184ecabb75..f829dd52c4ef421b6a295c6240ceb9e9d311b55a 100644 (file)
@@ -165,19 +165,19 @@ void TestMemCluster::allocate_client(uint32_t *nonce, uint64_t *global_id) {
 
 void TestMemCluster::deallocate_client(uint32_t nonce) {
   std::lock_guard locker{m_lock};
-  m_blacklist.erase(nonce);
+  m_blocklist.erase(nonce);
 }
 
-bool TestMemCluster::is_blacklisted(uint32_t nonce) const {
+bool TestMemCluster::is_blocklisted(uint32_t nonce) const {
   std::lock_guard locker{m_lock};
-  return (m_blacklist.find(nonce) != m_blacklist.end());
+  return (m_blocklist.find(nonce) != m_blocklist.end());
 }
 
-void TestMemCluster::blacklist(uint32_t nonce) {
-  m_watch_notify.blacklist(nonce);
+void TestMemCluster::blocklist(uint32_t nonce) {
+  m_watch_notify.blocklist(nonce);
 
   std::lock_guard locker{m_lock};
-  m_blacklist.insert(nonce);
+  m_blocklist.insert(nonce);
 }
 
 void TestMemCluster::transaction_start(const ObjectLocator& locator) {
index 9bcf8947ec109243f13608c8de9ab78f57bd8b67..d5b1922ddf3398cf6dffad16e1211a9ed040369d 100644 (file)
@@ -91,8 +91,8 @@ public:
   void allocate_client(uint32_t *nonce, uint64_t *global_id);
   void deallocate_client(uint32_t nonce);
 
-  bool is_blacklisted(uint32_t nonce) const;
-  void blacklist(uint32_t nonce);
+  bool is_blocklisted(uint32_t nonce) const;
+  void blocklist(uint32_t nonce);
 
   void transaction_start(const ObjectLocator& locator);
   void transaction_finish(const ObjectLocator& locator);
@@ -100,7 +100,7 @@ public:
 private:
 
   typedef std::map<std::string, Pool*>         Pools;
-  typedef std::set<uint32_t> Blacklist;
+  typedef std::set<uint32_t> Blocklist;
 
   mutable ceph::mutex m_lock =
     ceph::make_mutex("TestMemCluster::m_lock");
@@ -111,7 +111,7 @@ private:
   uint32_t m_next_nonce;
   uint64_t m_next_global_id = 1234;
 
-  Blacklist m_blacklist;
+  Blocklist m_blocklist;
 
   ceph::condition_variable m_transaction_cond;
   std::set<ObjectLocator> m_transactions;
index ae7f6fafed1a890a88a3dd61fb4b586490d8ded8..bdcc4ee3da95fb6e20961eaac6c818c891048478 100644 (file)
@@ -69,8 +69,8 @@ int TestMemIoCtxImpl::append(const std::string& oid, const bufferlist &bl,
                              const SnapContext &snapc) {
   if (get_snap_read() != CEPH_NOSNAP) {
     return -EROFS;
-  } else if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  } else if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   TestMemCluster::SharedFile file;
@@ -87,8 +87,8 @@ int TestMemIoCtxImpl::append(const std::string& oid, const bufferlist &bl,
 }
 
 int TestMemIoCtxImpl::assert_exists(const std::string &oid, uint64_t snap_id) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   std::shared_lock l{m_pool->file_lock};
@@ -123,8 +123,8 @@ int TestMemIoCtxImpl::create(const std::string& oid, bool exclusive,
                              const SnapContext &snapc) {
   if (get_snap_read() != CEPH_NOSNAP) {
     return -EROFS;
-  } else if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  } else if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   std::unique_lock l{m_pool->file_lock};
@@ -140,8 +140,8 @@ int TestMemIoCtxImpl::create(const std::string& oid, bool exclusive,
 }
 
 int TestMemIoCtxImpl::list_snaps(const std::string& oid, snap_set_t *out_snaps) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   out_snaps->seq = 0;
@@ -218,8 +218,8 @@ int TestMemIoCtxImpl::omap_get_vals2(const std::string& oid,
                                     bool *pmore) {
   if (out_vals == NULL) {
     return -EINVAL;
-  } else if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  } else if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   TestMemCluster::SharedFile file;
@@ -275,8 +275,8 @@ int TestMemIoCtxImpl::omap_rm_keys(const std::string& oid,
                                    const std::set<std::string>& keys) {
   if (get_snap_read() != CEPH_NOSNAP) {
     return -EROFS;
-  } else if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  } else if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   TestMemCluster::SharedFile file;
@@ -300,8 +300,8 @@ int TestMemIoCtxImpl::omap_set(const std::string& oid,
                                const std::map<std::string, bufferlist> &map) {
   if (get_snap_read() != CEPH_NOSNAP) {
     return -EROFS;
-  } else if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  } else if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   TestMemCluster::SharedFile file;
@@ -326,8 +326,8 @@ int TestMemIoCtxImpl::omap_set(const std::string& oid,
 
 int TestMemIoCtxImpl::read(const std::string& oid, size_t len, uint64_t off,
                            bufferlist *bl, uint64_t snap_id) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   TestMemCluster::SharedFile file;
@@ -355,8 +355,8 @@ int TestMemIoCtxImpl::read(const std::string& oid, size_t len, uint64_t off,
 int TestMemIoCtxImpl::remove(const std::string& oid, const SnapContext &snapc) {
   if (get_snap_read() != CEPH_NOSNAP) {
     return -EROFS;
-  } else if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  } else if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   std::unique_lock l{m_pool->file_lock};
@@ -393,8 +393,8 @@ int TestMemIoCtxImpl::remove(const std::string& oid, const SnapContext &snapc) {
 }
 
 int TestMemIoCtxImpl::selfmanaged_snap_create(uint64_t *snapid) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   std::unique_lock l{m_pool->file_lock};
@@ -404,8 +404,8 @@ int TestMemIoCtxImpl::selfmanaged_snap_create(uint64_t *snapid) {
 }
 
 int TestMemIoCtxImpl::selfmanaged_snap_remove(uint64_t snapid) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   std::unique_lock l{m_pool->file_lock};
@@ -422,8 +422,8 @@ int TestMemIoCtxImpl::selfmanaged_snap_remove(uint64_t snapid) {
 
 int TestMemIoCtxImpl::selfmanaged_snap_rollback(const std::string& oid,
                                                 uint64_t snapid) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   std::unique_lock l{m_pool->file_lock};
@@ -476,8 +476,8 @@ int TestMemIoCtxImpl::set_alloc_hint(const std::string& oid,
                                      const SnapContext &snapc) {
   if (get_snap_read() != CEPH_NOSNAP) {
     return -EROFS;
-  } else if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  } else if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   {
@@ -492,8 +492,8 @@ int TestMemIoCtxImpl::sparse_read(const std::string& oid, uint64_t off,
                                   uint64_t len,
                                   std::map<uint64_t,uint64_t> *m,
                                   bufferlist *data_bl, uint64_t snap_id) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   // TODO verify correctness
@@ -525,8 +525,8 @@ int TestMemIoCtxImpl::sparse_read(const std::string& oid, uint64_t off,
 
 int TestMemIoCtxImpl::stat(const std::string& oid, uint64_t *psize,
                            time_t *pmtime) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   TestMemCluster::SharedFile file;
@@ -552,8 +552,8 @@ int TestMemIoCtxImpl::truncate(const std::string& oid, uint64_t size,
                                const SnapContext &snapc) {
   if (get_snap_read() != CEPH_NOSNAP) {
     return -EROFS;
-  } else if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  } else if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   TestMemCluster::SharedFile file;
@@ -590,8 +590,8 @@ int TestMemIoCtxImpl::write(const std::string& oid, bufferlist& bl, size_t len,
                             uint64_t off, const SnapContext &snapc) {
   if (get_snap_read() != CEPH_NOSNAP) {
     return -EROFS;
-  } else if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  } else if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   TestMemCluster::SharedFile file;
@@ -617,8 +617,8 @@ int TestMemIoCtxImpl::write_full(const std::string& oid, bufferlist& bl,
                                  const SnapContext &snapc) {
   if (get_snap_read() != CEPH_NOSNAP) {
     return -EROFS;
-  } else if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  } else if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   TestMemCluster::SharedFile file;
@@ -649,8 +649,8 @@ int TestMemIoCtxImpl::writesame(const std::string& oid, bufferlist& bl,
                                 const SnapContext &snapc) {
   if (get_snap_read() != CEPH_NOSNAP) {
     return -EROFS;
-  } else if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  } else if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   if (len == 0 || (len % bl.length())) {
@@ -682,8 +682,8 @@ int TestMemIoCtxImpl::writesame(const std::string& oid, bufferlist& bl,
 
 int TestMemIoCtxImpl::cmpext(const std::string& oid, uint64_t off,
                              bufferlist& cmp_bl, uint64_t snap_id) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   bufferlist read_bl;
@@ -710,8 +710,8 @@ int TestMemIoCtxImpl::cmpext(const std::string& oid, uint64_t off,
 
 int TestMemIoCtxImpl::xattr_get(const std::string& oid,
                                 std::map<std::string, bufferlist>* attrset) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   TestMemCluster::SharedFile file;
@@ -727,8 +727,8 @@ int TestMemIoCtxImpl::xattr_get(const std::string& oid,
 
 int TestMemIoCtxImpl::xattr_set(const std::string& oid, const std::string &name,
                                 bufferlist& bl) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   std::unique_lock l{m_pool->file_lock};
@@ -738,8 +738,8 @@ int TestMemIoCtxImpl::xattr_set(const std::string& oid, const std::string &name,
 
 int TestMemIoCtxImpl::zero(const std::string& oid, uint64_t off, uint64_t len,
                            const SnapContext &snapc) {
-  if (m_client->is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (m_client->is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   bool truncate_redirect = false;
index 0435a8c7392253331767b5833d15bab3d24cef99..37d45327c3007195174d00e33c2b03c56fc04828 100644 (file)
@@ -42,15 +42,15 @@ void TestMemRadosClient::object_list(int64_t pool_id,
 }
 
 int TestMemRadosClient::pool_create(const std::string &pool_name) {
-  if (is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
   return m_mem_cluster->pool_create(pool_name);
 }
 
 int TestMemRadosClient::pool_delete(const std::string &pool_name) {
-  if (is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
   return m_mem_cluster->pool_delete(pool_name);
 }
@@ -78,14 +78,14 @@ int TestMemRadosClient::watch_flush() {
   return 0;
 }
 
-bool TestMemRadosClient::is_blacklisted() const {
-  return m_mem_cluster->is_blacklisted(m_nonce);
+bool TestMemRadosClient::is_blocklisted() const {
+  return m_mem_cluster->is_blocklisted(m_nonce);
 }
 
-int TestMemRadosClient::blacklist_add(const std::string& client_address,
+int TestMemRadosClient::blocklist_add(const std::string& client_address,
                                      uint32_t expire_seconds) {
-  if (is_blacklisted()) {
-    return -EBLACKLISTED;
+  if (is_blocklisted()) {
+    return -EBLOCKLISTED;
   }
 
   // extract the nonce to use as a unique key to the client
@@ -101,7 +101,7 @@ int TestMemRadosClient::blacklist_add(const std::string& client_address,
     return -EINVAL;
   }
 
-  m_mem_cluster->blacklist(nonce);
+  m_mem_cluster->blocklist(nonce);
   return 0;
 }
 
index 997da61cc62faede14bef30b3f4f989217a259e7..ecd6fedb08eb5572fb149790871a244f1e3ac1e2 100644 (file)
@@ -62,8 +62,8 @@ public:
 
   int watch_flush() override;
 
-  bool is_blacklisted() const override;
-  int blacklist_add(const std::string& client_address,
+  bool is_blocklisted() const override;
+  int blocklist_add(const std::string& client_address,
                     uint32_t expire_seconds) override;
 protected:
   TestMemCluster *get_mem_cluster() {
index 4a247670b3c7ba0ce577080d70cd51737ff04ac9..e7f8d075175ef87d788bc692ef5730098c890745 100644 (file)
@@ -104,8 +104,8 @@ public:
   virtual int aio_watch_flush(AioCompletionImpl *c);
   virtual int watch_flush() = 0;
 
-  virtual bool is_blacklisted() const = 0;
-  virtual int blacklist_add(const std::string& client_address,
+  virtual bool is_blocklisted() const = 0;
+  virtual int blocklist_add(const std::string& client_address,
                            uint32_t expire_seconds) = 0;
 
   virtual int wait_for_latest_osd_map() {
index 4c43090ca1a2f063edc3db6801d5856d480452c9..3b18026bbf0fcfa17daa422a97c503d4cd31068c 100644 (file)
@@ -394,7 +394,7 @@ void TestWatchNotify::finish_notify(TestRadosClient *rados_client,
   maybe_remove_watcher(watcher);
 }
 
-void TestWatchNotify::blacklist(uint32_t nonce) {
+void TestWatchNotify::blocklist(uint32_t nonce) {
   std::lock_guard locker{m_lock};
 
   for (auto file_it = m_file_watchers.begin();
index aae6252580e4ffc69b7c918b038eb8adbcb2400c..bb973ea6b4c513b72e82995f5fd7e6f3f7015ef6 100644 (file)
@@ -97,7 +97,7 @@ public:
             librados::WatchCtx2 *ctx2);
   int unwatch(TestRadosClient *rados_client, uint64_t handle);
 
-  void blacklist(uint32_t nonce);
+  void blocklist(uint32_t nonce);
 
 private:
   typedef std::tuple<int64_t, std::string, std::string> PoolFile;
index 4edd448112d62ac6ab33a6c569b2b5f22faeae3f..f3e587c923429675136647c5cb2f2fdca9e38585 100644 (file)
@@ -31,14 +31,14 @@ struct BreakRequest<librbd::MockImageCtx> {
   static BreakRequest* create(librados::IoCtx& ioctx,
                               AsioEngine& asio_engine,
                               const std::string& oid, const Locker &locker,
-                              bool exclusive, bool blacklist_locker,
-                              uint32_t blacklist_expire_seconds,
+                              bool exclusive, bool blocklist_locker,
+                              uint32_t blocklist_expire_seconds,
                               bool force_break_lock, Context *on_finish) {
     CephContext *cct = reinterpret_cast<CephContext *>(ioctx.cct());
-    EXPECT_EQ(cct->_conf.get_val<bool>("rbd_blacklist_on_break_lock"),
-              blacklist_locker);
-    EXPECT_EQ(cct->_conf.get_val<uint64_t>("rbd_blacklist_expire_seconds"),
-              blacklist_expire_seconds);
+    EXPECT_EQ(cct->_conf.get_val<bool>("rbd_blocklist_on_break_lock"),
+              blocklist_locker);
+    EXPECT_EQ(cct->_conf.get_val<uint64_t>("rbd_blocklist_expire_seconds"),
+              blocklist_expire_seconds);
     EXPECT_FALSE(force_break_lock);
     ceph_assert(s_instance != nullptr);
     s_instance->on_finish = on_finish;
index 4c810fab05ee4f60cb9c444d2b428ba992f5621d..78653368afa7f6c38da7ebc113badba0f54946e9 100644 (file)
@@ -110,10 +110,10 @@ public:
   }
 
 
-  void expect_blacklist_add(MockTestImageCtx &mock_image_ctx, int r) {
+  void expect_blocklist_add(MockTestImageCtx &mock_image_ctx, int r) {
     auto& mock_rados_client = librados::get_mock_rados_client(
       mock_image_ctx.rados_api);
-    EXPECT_CALL(mock_rados_client, mon_command(IsBlacklistCommand(), _, _, _))
+    EXPECT_CALL(mock_rados_client, mon_command(IsBlocklistCommand(), _, _, _))
       .WillOnce(Return(r));
   }
 
@@ -154,7 +154,7 @@ TEST_F(TestMockManagedLockBreakRequest, DeadLockOwner) {
                     {entity_name_t::CLIENT(1), "auto 123", "1.2.3.4:0/0", 123},
                     0);
 
-  expect_blacklist_add(mock_image_ctx, 0);
+  expect_blocklist_add(mock_image_ctx, 0);
   expect_wait_for_latest_osd_map(mock_image_ctx, 0);
   expect_break_lock(mock_image_ctx, 0);
 
@@ -184,7 +184,7 @@ TEST_F(TestMockManagedLockBreakRequest, ForceBreak) {
                     {entity_name_t::CLIENT(1), "auto 123", "1.2.3.4:0/0", 123},
                     0);
 
-  expect_blacklist_add(mock_image_ctx, 0);
+  expect_blocklist_add(mock_image_ctx, 0);
   expect_wait_for_latest_osd_map(mock_image_ctx, 0);
   expect_break_lock(mock_image_ctx, 0);
 
@@ -341,7 +341,7 @@ TEST_F(TestMockManagedLockBreakRequest, GetLockerError) {
   ASSERT_EQ(-EINVAL, ctx.wait());
 }
 
-TEST_F(TestMockManagedLockBreakRequest, BlacklistDisabled) {
+TEST_F(TestMockManagedLockBreakRequest, BlocklistDisabled) {
   REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK);
 
   librbd::ImageCtx *ictx;
@@ -369,7 +369,7 @@ TEST_F(TestMockManagedLockBreakRequest, BlacklistDisabled) {
   ASSERT_EQ(0, ctx.wait());
 }
 
-TEST_F(TestMockManagedLockBreakRequest, BlacklistSelf) {
+TEST_F(TestMockManagedLockBreakRequest, BlocklistSelf) {
   REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK);
 
   librbd::ImageCtx *ictx;
@@ -397,7 +397,7 @@ TEST_F(TestMockManagedLockBreakRequest, BlacklistSelf) {
   ASSERT_EQ(-EINVAL, ctx.wait());
 }
 
-TEST_F(TestMockManagedLockBreakRequest, BlacklistError) {
+TEST_F(TestMockManagedLockBreakRequest, BlocklistError) {
   REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK);
 
   librbd::ImageCtx *ictx;
@@ -414,7 +414,7 @@ TEST_F(TestMockManagedLockBreakRequest, BlacklistError) {
                     {entity_name_t::CLIENT(1), "auto 123", "1.2.3.4:0/0", 123},
                     0);
 
-  expect_blacklist_add(mock_image_ctx, -EINVAL);
+  expect_blocklist_add(mock_image_ctx, -EINVAL);
 
   C_SaferCond ctx;
   Locker locker{entity_name_t::CLIENT(1), "auto 123", "1.2.3.4:0/0", 123};
@@ -442,7 +442,7 @@ TEST_F(TestMockManagedLockBreakRequest, BreakLockMissing) {
                     {entity_name_t::CLIENT(1), "auto 123", "1.2.3.4:0/0", 123},
                     0);
 
-  expect_blacklist_add(mock_image_ctx, 0);
+  expect_blocklist_add(mock_image_ctx, 0);
   expect_wait_for_latest_osd_map(mock_image_ctx, 0);
   expect_break_lock(mock_image_ctx, -ENOENT);
 
@@ -472,7 +472,7 @@ TEST_F(TestMockManagedLockBreakRequest, BreakLockError) {
                     {entity_name_t::CLIENT(1), "auto 123", "1.2.3.4:0/0", 123},
                     0);
 
-  expect_blacklist_add(mock_image_ctx, 0);
+  expect_blocklist_add(mock_image_ctx, 0);
   expect_wait_for_latest_osd_map(mock_image_ctx, 0);
   expect_break_lock(mock_image_ctx, -EINVAL);
 
index 0f010564115d00c8be6c395c45f9bf8014427b33..c44238ae191483c01f66c329e407a4e7335801a1 100644 (file)
@@ -15,7 +15,7 @@ class ProgressContext;
 struct MockImageWatcher {
   MOCK_METHOD0(is_registered, bool());
   MOCK_METHOD0(is_unregistered, bool());
-  MOCK_METHOD0(is_blacklisted, bool());
+  MOCK_METHOD0(is_blocklisted, bool());
   MOCK_METHOD0(unregister_watch, void());
   MOCK_METHOD1(flush, void(Context *));
 
index 9738842b4c8c40e117cc5eacd3f3a94dbaaaeb33..a4b36d3cbab1bb5aa6e4756c22b117cb550005e4 100644 (file)
@@ -5,7 +5,7 @@ after acquiring exclusive lock named argv[2].  When an exception
 happens, split off the last number in the exception 'args' string
 and use it as the process exit code, if it's convertible to a number.
 
-Designed to run against a blacklist operation and verify the
+Designed to run against a blocklist operation and verify the
 ESHUTDOWN expected from the image operation.
 
 Note: this cannot be run with writeback caching on, currently, as
index 9218da393a9f9d1da336205ba60cc2c660049dc5..3227ccc72c7ede69fde2d44865e04d71ac8d0fae 100644 (file)
@@ -6851,25 +6851,25 @@ TEST_F(TestLibRBD, BreakLock)
 
   static char buf[10];
 
-  rados_t blacklist_cluster;
-  ASSERT_EQ("", connect_cluster(&blacklist_cluster));
+  rados_t blocklist_cluster;
+  ASSERT_EQ("", connect_cluster(&blocklist_cluster));
 
-  rados_ioctx_t ioctx, blacklist_ioctx;
+  rados_ioctx_t ioctx, blocklist_ioctx;
   ASSERT_EQ(0, rados_ioctx_create(_cluster, m_pool_name.c_str(), &ioctx));
-  ASSERT_EQ(0, rados_ioctx_create(blacklist_cluster, m_pool_name.c_str(),
-                                  &blacklist_ioctx));
+  ASSERT_EQ(0, rados_ioctx_create(blocklist_cluster, m_pool_name.c_str(),
+                                  &blocklist_ioctx));
 
   std::string name = get_temp_image_name();
   uint64_t size = 2 << 20;
   int order = 0;
   ASSERT_EQ(0, create_image(ioctx, name.c_str(), size, &order));
 
-  rbd_image_t image, blacklist_image;
+  rbd_image_t image, blocklist_image;
   ASSERT_EQ(0, rbd_open(ioctx, name.c_str(), &image, NULL));
-  ASSERT_EQ(0, rbd_open(blacklist_ioctx, name.c_str(), &blacklist_image, NULL));
+  ASSERT_EQ(0, rbd_open(blocklist_ioctx, name.c_str(), &blocklist_image, NULL));
 
-  ASSERT_EQ(0, rbd_metadata_set(image, "conf_rbd_blacklist_on_break_lock", "true"));
-  ASSERT_EQ(0, rbd_lock_acquire(blacklist_image, RBD_LOCK_MODE_EXCLUSIVE));
+  ASSERT_EQ(0, rbd_metadata_set(image, "conf_rbd_blocklist_on_break_lock", "true"));
+  ASSERT_EQ(0, rbd_lock_acquire(blocklist_image, RBD_LOCK_MODE_EXCLUSIVE));
 
   rbd_lock_mode_t lock_mode;
   char *lock_owners[1];
@@ -6882,19 +6882,19 @@ TEST_F(TestLibRBD, BreakLock)
 
   ASSERT_EQ(0, rbd_lock_break(image, RBD_LOCK_MODE_EXCLUSIVE, lock_owners[0]));
   ASSERT_EQ(0, rbd_lock_acquire(image, RBD_LOCK_MODE_EXCLUSIVE));
-  EXPECT_EQ(0, rados_wait_for_latest_osdmap(blacklist_cluster));
+  EXPECT_EQ(0, rados_wait_for_latest_osdmap(blocklist_cluster));
 
   ASSERT_EQ((ssize_t)sizeof(buf), rbd_write(image, 0, sizeof(buf), buf));
-  ASSERT_EQ(-EBLACKLISTED, rbd_write(blacklist_image, 0, sizeof(buf), buf));
+  ASSERT_EQ(-EBLOCKLISTED, rbd_write(blocklist_image, 0, sizeof(buf), buf));
 
   ASSERT_EQ(0, rbd_close(image));
-  ASSERT_EQ(0, rbd_close(blacklist_image));
+  ASSERT_EQ(0, rbd_close(blocklist_image));
 
   rbd_lock_get_owners_cleanup(lock_owners, max_lock_owners);
 
   rados_ioctx_destroy(ioctx);
-  rados_ioctx_destroy(blacklist_ioctx);
-  rados_shutdown(blacklist_cluster);
+  rados_ioctx_destroy(blocklist_ioctx);
+  rados_shutdown(blocklist_cluster);
 }
 
 TEST_F(TestLibRBD, DiscardAfterWrite)
index 65f7da64e605b26de65ad5fb7116c55ea56feb81..3fb512e8fbc787c18234d788cab937654714d67e 100644 (file)
@@ -42,8 +42,8 @@ template <>
 struct ManagedLock<MockExclusiveLockImageCtx> {
   ManagedLock(librados::IoCtx& ioctx, AsioEngine& asio_engine,
               const std::string& oid, librbd::MockImageWatcher *watcher,
-              managed_lock::Mode  mode, bool blacklist_on_break_lock,
-              uint32_t blacklist_expire_seconds)
+              managed_lock::Mode  mode, bool blocklist_on_break_lock,
+              uint32_t blocklist_expire_seconds)
   {}
 
   virtual ~ManagedLock() = default;
@@ -663,8 +663,8 @@ TEST_F(TestMockExclusiveLock, AcquireLockError) {
   expect_is_state_acquiring(exclusive_lock, true);
   expect_prepare_lock_complete(mock_image_ctx);
   expect_is_action_acquire_lock(exclusive_lock, true);
-  ASSERT_EQ(-EBLACKLISTED, when_post_acquire_lock_handler(exclusive_lock,
-                                                          -EBLACKLISTED));
+  ASSERT_EQ(-EBLOCKLISTED, when_post_acquire_lock_handler(exclusive_lock,
+                                                          -EBLOCKLISTED));
 }
 
 TEST_F(TestMockExclusiveLock, PostAcquireLockError) {
index 89fd9d2061620a15a416ddde577477bc54caab4f..3e6b15f6112f68afd22aa7dc0b31d901a45c215a 100644 (file)
@@ -29,8 +29,8 @@ struct Traits<MockManagedLockImageCtx> {
 struct MockMockManagedLock : public ManagedLock<MockManagedLockImageCtx> {
   MockMockManagedLock(librados::IoCtx& ioctx, AsioEngine& asio_engine,
                  const std::string& oid, librbd::MockImageWatcher *watcher,
-                 managed_lock::Mode  mode, bool blacklist_on_break_lock,
-                 uint32_t blacklist_expire_seconds)
+                 managed_lock::Mode  mode, bool blocklist_on_break_lock,
+                 uint32_t blocklist_expire_seconds)
     : ManagedLock<MockManagedLockImageCtx>(ioctx, asio_engine, oid, watcher,
       librbd::managed_lock::EXCLUSIVE, true, 0) {
   };
@@ -75,8 +75,8 @@ struct AcquireRequest<MockManagedLockImageCtx>
                                 AsioEngine& asio_engine,
                                 const std::string& oid,
                                 const std::string& cookie,
-                                bool exclusive, bool blacklist_on_break_lock,
-                                uint32_t blacklist_expire_seconds,
+                                bool exclusive, bool blocklist_on_break_lock,
+                                uint32_t blocklist_expire_seconds,
                                 Context *on_finish) {
     return BaseRequest::create(ioctx, watcher, oid, cookie, on_finish);
   }
@@ -125,8 +125,8 @@ struct BreakRequest<MockManagedLockImageCtx> {
   static BreakRequest* create(librados::IoCtx& ioctx,
                               AsioEngine& asio_engine,
                               const std::string& oid, const Locker &locker,
-                              bool exclusive, bool blacklist_locker,
-                              uint32_t blacklist_expire_seconds,
+                              bool exclusive, bool blocklist_locker,
+                              uint32_t blocklist_expire_seconds,
                               bool force_break_lock, Context *on_finish) {
     ceph_abort_msg("unexpected call");
   }
@@ -372,7 +372,7 @@ TEST_F(TestMockManagedLock, AcquireLockError) {
   ASSERT_EQ(0, when_shut_down(managed_lock));
 }
 
-TEST_F(TestMockManagedLock, AcquireLockBlacklist) {
+TEST_F(TestMockManagedLock, AcquireLockBlocklist) {
   librbd::ImageCtx *ictx;
   ASSERT_EQ(0, open_image(m_image_name, &ictx));
 
@@ -382,10 +382,10 @@ TEST_F(TestMockManagedLock, AcquireLockBlacklist) {
                                librbd::managed_lock::EXCLUSIVE, true, 0);
   InSequence seq;
 
-  // will abort after seeing blacklist error (avoid infinite request loop)
+  // will abort after seeing blocklist error (avoid infinite request loop)
   MockAcquireRequest request_lock_acquire;
-  expect_acquire_lock(*mock_image_ctx.image_watcher, ictx->op_work_queue, request_lock_acquire, -EBLACKLISTED);
-  ASSERT_EQ(-EBLACKLISTED, when_acquire_lock(managed_lock));
+  expect_acquire_lock(*mock_image_ctx.image_watcher, ictx->op_work_queue, request_lock_acquire, -EBLOCKLISTED);
+  ASSERT_EQ(-EBLOCKLISTED, when_acquire_lock(managed_lock));
   ASSERT_FALSE(is_lock_owner(managed_lock));
 
   ASSERT_EQ(0, when_shut_down(managed_lock));
@@ -406,7 +406,7 @@ TEST_F(TestMockManagedLock, ReleaseLockUnlockedState) {
   ASSERT_EQ(0, when_shut_down(managed_lock));
 }
 
-TEST_F(TestMockManagedLock, ReleaseLockBlacklist) {
+TEST_F(TestMockManagedLock, ReleaseLockBlocklist) {
   librbd::ImageCtx *ictx;
   ASSERT_EQ(0, open_image(m_image_name, &ictx));
 
@@ -420,9 +420,9 @@ TEST_F(TestMockManagedLock, ReleaseLockBlacklist) {
   expect_acquire_lock(*mock_image_ctx.image_watcher, ictx->op_work_queue, try_lock_acquire, 0);
   ASSERT_EQ(0, when_acquire_lock(managed_lock));
 
-  expect_pre_release_lock_handler(managed_lock, false, -EBLACKLISTED);
-  expect_post_release_lock_handler(managed_lock, false, -EBLACKLISTED, -EBLACKLISTED);
-  ASSERT_EQ(-EBLACKLISTED, when_release_lock(managed_lock));
+  expect_pre_release_lock_handler(managed_lock, false, -EBLOCKLISTED);
+  expect_post_release_lock_handler(managed_lock, false, -EBLOCKLISTED, -EBLOCKLISTED);
+  ASSERT_EQ(-EBLOCKLISTED, when_release_lock(managed_lock));
   ASSERT_FALSE(is_lock_owner(managed_lock));
 
   ASSERT_EQ(0, when_shut_down(managed_lock));
@@ -539,7 +539,7 @@ TEST_F(TestMockManagedLock, ReacquireLock) {
   ASSERT_FALSE(is_lock_owner(managed_lock));
 }
 
-TEST_F(TestMockManagedLock, AttemptReacquireBlacklistedLock) {
+TEST_F(TestMockManagedLock, AttemptReacquireBlocklistedLock) {
   librbd::ImageCtx *ictx;
   ASSERT_EQ(0, open_image(m_image_name, &ictx));
 
@@ -568,7 +568,7 @@ TEST_F(TestMockManagedLock, AttemptReacquireBlacklistedLock) {
   ASSERT_FALSE(is_lock_owner(managed_lock));
 }
 
-TEST_F(TestMockManagedLock, ReacquireBlacklistedLock) {
+TEST_F(TestMockManagedLock, ReacquireBlocklistedLock) {
   librbd::ImageCtx *ictx;
   ASSERT_EQ(0, open_image(m_image_name, &ictx));
 
index 23a0e2aa9e4e22daa7b833a4e6bb1015e27b7a50..7b470d546c7ec6a3e8a19f0c32bd2f7b86fa0a7e 100644 (file)
@@ -303,7 +303,7 @@ TEST_F(TestMockWatcher, ReregisterWatchBlacklist) {
 
   // wait for recovery unwatch/watch
   ASSERT_TRUE(wait_for_watch(mock_image_ctx, 2));
-  ASSERT_TRUE(mock_image_watcher.is_blacklisted());
+  ASSERT_TRUE(mock_image_watcher.is_blocklisted());
 
   C_SaferCond unregister_ctx;
   mock_image_watcher.unregister_watch(&unregister_ctx);
@@ -324,7 +324,7 @@ TEST_F(TestMockWatcher, ReregisterUnwatchPendingUnregister) {
 
   // inject an unregister
   C_SaferCond unregister_ctx;
-  expect_aio_unwatch(mock_image_ctx, -EBLACKLISTED,
+  expect_aio_unwatch(mock_image_ctx, -EBLOCKLISTED,
                      [&mock_image_watcher, &unregister_ctx]() {
       mock_image_watcher.unregister_watch(&unregister_ctx);
     });
@@ -334,7 +334,7 @@ TEST_F(TestMockWatcher, ReregisterUnwatchPendingUnregister) {
   ASSERT_EQ(0, register_ctx.wait());
 
   ceph_assert(m_watch_ctx != nullptr);
-  m_watch_ctx->handle_error(0, -EBLACKLISTED);
+  m_watch_ctx->handle_error(0, -EBLOCKLISTED);
 
   ASSERT_EQ(0, unregister_ctx.wait());
 }
index 2b66dbeaab707b9fd91f1f3c524f08e5d1cde079..3682d9bbf4e553d074f1ddd4fc6fd62589117de3 100755 (executable)
@@ -534,10 +534,10 @@ class TestOSD(TestArgparse):
         assert_equal({}, validate_command(sigdict, ['osd', 'lspools',
                                                     'toomany']))
 
-    def test_blacklist_ls(self):
-        self.assert_valid_command(['osd', 'blacklist', 'ls'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'blacklist']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'blacklist',
+    def test_blocklist_ls(self):
+        self.assert_valid_command(['osd', 'blocklist', 'ls'])
+        assert_equal({}, validate_command(sigdict, ['osd', 'blocklist']))
+        assert_equal({}, validate_command(sigdict, ['osd', 'blocklist',
                                                     'ls', 'toomany']))
 
     def test_crush_rule(self):
@@ -878,25 +878,25 @@ class TestOSD(TestArgparse):
                                                     uuid,
                                                     'toomany']))
 
-    def test_blacklist(self):
+    def test_blocklist(self):
         for action in ('add', 'rm'):
-            self.assert_valid_command(['osd', 'blacklist', action,
+            self.assert_valid_command(['osd', 'blocklist', action,
                                        '1.2.3.4/567'])
-            self.assert_valid_command(['osd', 'blacklist', action,
+            self.assert_valid_command(['osd', 'blocklist', action,
                                        '1.2.3.4'])
-            self.assert_valid_command(['osd', 'blacklist', action,
+            self.assert_valid_command(['osd', 'blocklist', action,
                                        '1.2.3.4/567', '600.40'])
-            self.assert_valid_command(['osd', 'blacklist', action,
+            self.assert_valid_command(['osd', 'blocklist', action,
                                        '1.2.3.4', '600.40'])
-            assert_equal({}, validate_command(sigdict, ['osd', 'blacklist',
+            assert_equal({}, validate_command(sigdict, ['osd', 'blocklist',
                                                         action,
                                                         'invalid',
                                                         '600.40']))
-            assert_equal({}, validate_command(sigdict, ['osd', 'blacklist',
+            assert_equal({}, validate_command(sigdict, ['osd', 'blocklist',
                                                         action,
                                                         '1.2.3.4/567',
                                                         '-1.0']))
-            assert_equal({}, validate_command(sigdict, ['osd', 'blacklist',
+            assert_equal({}, validate_command(sigdict, ['osd', 'blocklist',
                                                         action,
                                                         '1.2.3.4/567',
                                                         '600.40',
index 1f2f8ba0af1faa231cd6e015c32c0b4d5e1f4322..46630d8f8a7dd7afbd8d26ed494f613f2d69d1e4 100644 (file)
@@ -103,7 +103,7 @@ class TestRadosStateError(object):
         assert_raises(RadosStateError, rados.osd_command, 0, '', b'')
         assert_raises(RadosStateError, rados.pg_command, '', '', b'')
         assert_raises(RadosStateError, rados.wait_for_latest_osdmap)
-        assert_raises(RadosStateError, rados.blacklist_add, '127.0.0.1/123', 0)
+        assert_raises(RadosStateError, rados.blocklist_add, '127.0.0.1/123', 0)
 
     def test_configuring(self):
         rados = Rados(conffile='')
@@ -236,8 +236,8 @@ class TestRados(object):
         fsid = self.rados.get_fsid()
         assert re.match('[0-9a-f\-]{36}', fsid, re.I)
 
-    def test_blacklist_add(self):
-        self.rados.blacklist_add("1.2.3.4/123", 1)
+    def test_blocklist_add(self):
+        self.rados.blocklist_add("1.2.3.4/123", 1)
 
     @attr('stats')
     def test_get_cluster_stats(self):
index 09b47e5660f6edf47748a47f0bc845c3dd07243c..0fd6cfaa36d9f89ae3c82904aca3b070e843d761 100644 (file)
@@ -151,15 +151,15 @@ def require_features(required_features):
         return functools.wraps(fn)(_require_features)
     return wrapper
 
-def blacklist_features(blacklisted_features):
+def blocklist_features(blocklisted_features):
     def wrapper(fn):
-        def _blacklist_features(*args, **kwargs):
+        def _blocklist_features(*args, **kwargs):
             global features
-            for feature in blacklisted_features:
+            for feature in blocklisted_features:
                 if features is not None and feature & features == feature:
                     raise SkipTest
             return fn(*args, **kwargs)
-        return functools.wraps(fn)(_blacklist_features)
+        return functools.wraps(fn)(_blocklist_features)
     return wrapper
 
 def test_version():
@@ -528,7 +528,7 @@ class TestImage(object):
         self.image = None
 
     @require_new_format()
-    @blacklist_features([RBD_FEATURE_EXCLUSIVE_LOCK])
+    @blocklist_features([RBD_FEATURE_EXCLUSIVE_LOCK])
     def test_update_features(self):
         features = self.image.features()
         self.image.update_features(RBD_FEATURE_EXCLUSIVE_LOCK, True)
@@ -907,13 +907,13 @@ class TestImage(object):
     def test_remove_with_exclusive_lock(self):
         assert_raises(ImageBusy, remove_image)
 
-    @blacklist_features([RBD_FEATURE_EXCLUSIVE_LOCK])
+    @blocklist_features([RBD_FEATURE_EXCLUSIVE_LOCK])
     def test_remove_with_snap(self):
         self.image.create_snap('snap1')
         assert_raises(ImageHasSnapshots, remove_image)
         self.image.remove_snap('snap1')
 
-    @blacklist_features([RBD_FEATURE_EXCLUSIVE_LOCK])
+    @blocklist_features([RBD_FEATURE_EXCLUSIVE_LOCK])
     def test_remove_with_watcher(self):
         data = rand_data(256)
         self.image.write(data, 0)
@@ -1915,19 +1915,19 @@ class TestExclusiveLock(object):
             image.lock_release()
 
     def test_break_lock(self):
-        blacklist_rados = Rados(conffile='')
-        blacklist_rados.connect()
+        blocklist_rados = Rados(conffile='')
+        blocklist_rados.connect()
         try:
-            blacklist_ioctx = blacklist_rados.open_ioctx(pool_name)
+            blocklist_ioctx = blocklist_rados.open_ioctx(pool_name)
             try:
-                rados2.conf_set('rbd_blacklist_on_break_lock', 'true')
+                rados2.conf_set('rbd_blocklist_on_break_lock', 'true')
                 with Image(ioctx2, image_name) as image, \
-                     Image(blacklist_ioctx, image_name) as blacklist_image:
+                     Image(blocklist_ioctx, image_name) as blocklist_image:
 
                     lock_owners = list(image.lock_get_owners())
                     eq(0, len(lock_owners))
 
-                    blacklist_image.lock_acquire(RBD_LOCK_MODE_EXCLUSIVE)
+                    blocklist_image.lock_acquire(RBD_LOCK_MODE_EXCLUSIVE)
                     assert_raises(ReadOnlyImage, image.lock_acquire,
                                   RBD_LOCK_MODE_EXCLUSIVE)
                     lock_owners = list(image.lock_get_owners())
@@ -1937,23 +1937,23 @@ class TestExclusiveLock(object):
                                      lock_owners[0]['owner'])
 
                     assert_raises(ConnectionShutdown,
-                                  blacklist_image.is_exclusive_lock_owner)
+                                  blocklist_image.is_exclusive_lock_owner)
 
-                    blacklist_rados.wait_for_latest_osdmap()
+                    blocklist_rados.wait_for_latest_osdmap()
                     data = rand_data(256)
                     assert_raises(ConnectionShutdown,
-                                  blacklist_image.write, data, 0)
+                                  blocklist_image.write, data, 0)
 
                     image.lock_acquire(RBD_LOCK_MODE_EXCLUSIVE)
 
                     try:
-                        blacklist_image.close()
+                        blocklist_image.close()
                     except ConnectionShutdown:
                         pass
             finally:
-                blacklist_ioctx.close()
+                blocklist_ioctx.close()
         finally:
-            blacklist_rados.shutdown()
+            blocklist_rados.shutdown()
 
 class TestMirroring(object):
 
index 3f810704a33ea7ec8139b36889f2167663217a0b..3b4927bba7c3b966a72667623a9e8c225d413949 100644 (file)
@@ -1308,9 +1308,9 @@ TEST_F(TestMockImageMap, AddErrorAndRemoveImage) {
   expect_listener_images_unmapped(mock_listener, 1, &released_global_image_ids,
                                   &release_peer_ack_ctxs);
 
-  // instance blacklisted -- ACQUIRE request fails
+  // instance blocklisted -- ACQUIRE request fails
   remote_peer_ack_nowait(mock_image_map.get(), shuffled_global_image_ids,
-                         -EBLACKLISTED, &peer_ack_ctxs);
+                         -EBLOCKLISTED, &peer_ack_ctxs);
   ASSERT_TRUE(wait_for_listener_notify(shuffled_global_image_ids.size()));
 
   std::map<std::string, Context*> remap_peer_ack_ctxs;
@@ -1318,7 +1318,7 @@ TEST_F(TestMockImageMap, AddErrorAndRemoveImage) {
                          mock_listener, shuffled_global_image_ids, 0,
                          &remap_peer_ack_ctxs);
 
-  // instance blacklisted -- RELEASE request fails
+  // instance blocklisted -- RELEASE request fails
   remote_peer_ack_listener_wait(mock_image_map.get(), shuffled_global_image_ids,
                                 -ENOENT, &release_peer_ack_ctxs);
   wait_for_scheduled_task();
index d2462c1f29c0b7126a97b5865d7607ab0b0a0a09..1cc64be60089ef45e70b6a044f4f374d9d079e65 100644 (file)
@@ -98,7 +98,7 @@ struct ImageReplayer<librbd::MockTestImageCtx> {
   MOCK_METHOD0(get_local_image_id, const std::string &());
   MOCK_METHOD0(is_running, bool());
   MOCK_METHOD0(is_stopped, bool());
-  MOCK_METHOD0(is_blacklisted, bool());
+  MOCK_METHOD0(is_blocklisted, bool());
 
   MOCK_CONST_METHOD0(is_finished, bool());
   MOCK_METHOD1(set_finished, void(bool));
@@ -199,7 +199,7 @@ TEST_F(TestMockInstanceReplayer, AcquireReleaseImage) {
   C_SaferCond on_acquire;
   EXPECT_CALL(mock_image_replayer, add_peer(_));
   EXPECT_CALL(mock_image_replayer, is_stopped()).WillOnce(Return(true));
-  EXPECT_CALL(mock_image_replayer, is_blacklisted()).WillOnce(Return(false));
+  EXPECT_CALL(mock_image_replayer, is_blocklisted()).WillOnce(Return(false));
   EXPECT_CALL(mock_image_replayer, is_finished()).WillOnce(Return(false));
   EXPECT_CALL(mock_image_replayer, start(_, false))
     .WillOnce(CompleteContext(0));
@@ -270,7 +270,7 @@ TEST_F(TestMockInstanceReplayer, RemoveFinishedImage) {
   C_SaferCond on_acquire;
   EXPECT_CALL(mock_image_replayer, add_peer(_));
   EXPECT_CALL(mock_image_replayer, is_stopped()).WillOnce(Return(true));
-  EXPECT_CALL(mock_image_replayer, is_blacklisted()).WillOnce(Return(false));
+  EXPECT_CALL(mock_image_replayer, is_blocklisted()).WillOnce(Return(false));
   EXPECT_CALL(mock_image_replayer, is_finished()).WillOnce(Return(false));
   EXPECT_CALL(mock_image_replayer, start(_, false))
     .WillOnce(CompleteContext(0));
@@ -300,7 +300,7 @@ TEST_F(TestMockInstanceReplayer, RemoveFinishedImage) {
   EXPECT_CALL(mock_image_replayer, get_health_state()).WillOnce(
     Return(image_replayer::HEALTH_STATE_OK));
   EXPECT_CALL(mock_image_replayer, is_stopped()).WillOnce(Return(true));
-  EXPECT_CALL(mock_image_replayer, is_blacklisted()).WillOnce(Return(false));
+  EXPECT_CALL(mock_image_replayer, is_blocklisted()).WillOnce(Return(false));
   EXPECT_CALL(mock_image_replayer, is_finished()).WillOnce(Return(true));
   EXPECT_CALL(mock_image_replayer, destroy());
   EXPECT_CALL(mock_service_daemon,
@@ -344,7 +344,7 @@ TEST_F(TestMockInstanceReplayer, Reacquire) {
 
   EXPECT_CALL(mock_image_replayer, add_peer(_));
   EXPECT_CALL(mock_image_replayer, is_stopped()).WillOnce(Return(true));
-  EXPECT_CALL(mock_image_replayer, is_blacklisted()).WillOnce(Return(false));
+  EXPECT_CALL(mock_image_replayer, is_blocklisted()).WillOnce(Return(false));
   EXPECT_CALL(mock_image_replayer, is_finished()).WillOnce(Return(false));
   EXPECT_CALL(mock_image_replayer, start(_, false))
     .WillOnce(CompleteContext(0));
index 9aadc33423aa0331893c87b6a96deaff4af57bda..f57654b367659822d31c2448ef00d3167c466a62 100644 (file)
@@ -32,8 +32,8 @@ struct ManagedLock<MockTestImageCtx> {
                              librbd::AsioEngine& asio_engine,
                              const std::string& oid, librbd::Watcher *watcher,
                              managed_lock::Mode  mode,
-                             bool blacklist_on_break_lock,
-                             uint32_t blacklist_expire_seconds) {
+                             bool blocklist_on_break_lock,
+                             uint32_t blocklist_expire_seconds) {
     ceph_assert(s_instance != nullptr);
     return s_instance;
   }
@@ -563,7 +563,7 @@ TEST_F(TestMockInstanceWatcher, PeerImageAcquireWatchDNE) {
   expect_acquire_lock(mock_managed_lock, 0);
   ASSERT_EQ(0, instance_watcher->init());
 
-  // Acquire image on dead (blacklisted) instance
+  // Acquire image on dead (blocklisted) instance
   C_SaferCond on_acquire;
   instance_watcher->notify_image_acquire("dead instance", "global image id",
                                          &on_acquire);
@@ -595,7 +595,7 @@ TEST_F(TestMockInstanceWatcher, PeerImageReleaseWatchDNE) {
   expect_acquire_lock(mock_managed_lock, 0);
   ASSERT_EQ(0, instance_watcher->init());
 
-  // Release image on dead (blacklisted) instance
+  // Release image on dead (blocklisted) instance
   C_SaferCond on_acquire;
   instance_watcher->notify_image_release("dead instance", "global image id",
                                          &on_acquire);
index 06ac8f69acbf625d55dde98ec48c4bdf271b9bc6..d4710f9dedcc1fe1587f78ca74dd96c284690ff2 100644 (file)
@@ -63,8 +63,8 @@ template <>
 struct ManagedLock<MockTestImageCtx> {
   ManagedLock(librados::IoCtx& ioctx, librbd::AsioEngine& asio_engine,
               const std::string& oid, librbd::Watcher *watcher,
-              managed_lock::Mode  mode, bool blacklist_on_break_lock,
-              uint32_t blacklist_expire_seconds)
+              managed_lock::Mode  mode, bool blocklist_on_break_lock,
+              uint32_t blocklist_expire_seconds)
     : m_work_queue(asio_engine.get_work_queue()) {
     MockManagedLock::get_instance().construct();
   }
index 3b262b775287ce85686c7b08e8c5ff9a5b94b576..ece1a339611559754ba8cb6e5fdbba1c5022f95b 100644 (file)
@@ -213,7 +213,7 @@ struct PoolWatcher<librbd::MockTestImageCtx> {
     return s_instances[pool_id];
   }
 
-  MOCK_METHOD0(is_blacklisted, bool());
+  MOCK_METHOD0(is_blocklisted, bool());
 
   MOCK_METHOD0(get_image_count, uint64_t());
 
index 0e2d44c4aab91f6b571e52f339e4fa31bda6612c..ebd27d7e1cba081d9b4f35cf956dd03572ac7493 100644 (file)
@@ -147,7 +147,7 @@ struct NamespaceReplayer<librbd::MockTestImageCtx> {
     return namespace_replayer;
   }
 
-  MOCK_METHOD0(is_blacklisted, bool());
+  MOCK_METHOD0(is_blocklisted, bool());
   MOCK_METHOD0(get_instance_id, std::string());
 
   MOCK_METHOD1(init, void(Context*));
@@ -186,7 +186,7 @@ struct LeaderWatcher<librbd::MockTestImageCtx> {
     return s_instance;
   }
 
-  MOCK_METHOD0(is_blacklisted, bool());
+  MOCK_METHOD0(is_blocklisted, bool());
   MOCK_METHOD0(is_leader, bool());
   MOCK_METHOD0(release_leader, void());
 
@@ -410,17 +410,17 @@ public:
                 }));
   }
 
-  void expect_leader_watcher_is_blacklisted(
-      MockLeaderWatcher &mock_leader_watcher, bool blacklisted) {
-    EXPECT_CALL(mock_leader_watcher, is_blacklisted())
-      .WillRepeatedly(Return(blacklisted));
+  void expect_leader_watcher_is_blocklisted(
+      MockLeaderWatcher &mock_leader_watcher, bool blocklisted) {
+    EXPECT_CALL(mock_leader_watcher, is_blocklisted())
+      .WillRepeatedly(Return(blocklisted));
   }
 
-  void expect_namespace_replayer_is_blacklisted(
+  void expect_namespace_replayer_is_blocklisted(
       MockNamespaceReplayer &mock_namespace_replayer,
-      bool blacklisted) {
-    EXPECT_CALL(mock_namespace_replayer, is_blacklisted())
-      .WillRepeatedly(Return(blacklisted));
+      bool blocklisted) {
+    EXPECT_CALL(mock_namespace_replayer, is_blocklisted())
+      .WillRepeatedly(Return(blocklisted));
   }
 
   void expect_namespace_replayer_get_instance_id(
@@ -542,7 +542,7 @@ TEST_F(TestMockPoolReplayer, ConfigKeyOverride) {
   peer_spec.key = "234";
 
   auto mock_default_namespace_replayer = new MockNamespaceReplayer();
-  expect_namespace_replayer_is_blacklisted(*mock_default_namespace_replayer,
+  expect_namespace_replayer_is_blocklisted(*mock_default_namespace_replayer,
                                            false);
 
   MockThreads mock_threads(m_threads);
@@ -550,7 +550,7 @@ TEST_F(TestMockPoolReplayer, ConfigKeyOverride) {
 
   auto mock_leader_watcher = new MockLeaderWatcher();
   expect_leader_watcher_get_leader_instance_id(*mock_leader_watcher);
-  expect_leader_watcher_is_blacklisted(*mock_leader_watcher, false);
+  expect_leader_watcher_is_blocklisted(*mock_leader_watcher, false);
 
   InSequence seq;
 
@@ -604,7 +604,7 @@ TEST_F(TestMockPoolReplayer, AcquireReleaseLeader) {
   peer_spec.key = "234";
 
   auto mock_default_namespace_replayer = new MockNamespaceReplayer();
-  expect_namespace_replayer_is_blacklisted(*mock_default_namespace_replayer,
+  expect_namespace_replayer_is_blocklisted(*mock_default_namespace_replayer,
                                            false);
 
   MockThreads mock_threads(m_threads);
@@ -613,7 +613,7 @@ TEST_F(TestMockPoolReplayer, AcquireReleaseLeader) {
   auto mock_leader_watcher = new MockLeaderWatcher();
   expect_leader_watcher_get_leader_instance_id(*mock_leader_watcher);
   expect_leader_watcher_list_instances(*mock_leader_watcher);
-  expect_leader_watcher_is_blacklisted(*mock_leader_watcher, false);
+  expect_leader_watcher_is_blocklisted(*mock_leader_watcher, false);
 
   InSequence seq;
 
@@ -684,15 +684,15 @@ TEST_F(TestMockPoolReplayer, Namespaces) {
   MockNamespace mock_namespace;
 
   auto mock_default_namespace_replayer = new MockNamespaceReplayer();
-  expect_namespace_replayer_is_blacklisted(*mock_default_namespace_replayer,
+  expect_namespace_replayer_is_blocklisted(*mock_default_namespace_replayer,
                                            false);
 
   auto mock_ns1_namespace_replayer = new MockNamespaceReplayer("ns1");
-  expect_namespace_replayer_is_blacklisted(*mock_ns1_namespace_replayer,
+  expect_namespace_replayer_is_blocklisted(*mock_ns1_namespace_replayer,
                                            false);
 
   auto mock_ns2_namespace_replayer = new MockNamespaceReplayer("ns2");
-  expect_namespace_replayer_is_blacklisted(*mock_ns2_namespace_replayer,
+  expect_namespace_replayer_is_blocklisted(*mock_ns2_namespace_replayer,
                                            false);
 
   MockThreads mock_threads(m_threads);
@@ -701,7 +701,7 @@ TEST_F(TestMockPoolReplayer, Namespaces) {
   auto mock_leader_watcher = new MockLeaderWatcher();
   expect_leader_watcher_get_leader_instance_id(*mock_leader_watcher);
   expect_leader_watcher_list_instances(*mock_leader_watcher);
-  expect_leader_watcher_is_blacklisted(*mock_leader_watcher, false);
+  expect_leader_watcher_is_blocklisted(*mock_leader_watcher, false);
 
   auto& mock_cluster = get_mock_cluster();
   auto mock_local_rados_client = mock_cluster.do_create_rados_client(
@@ -805,11 +805,11 @@ TEST_F(TestMockPoolReplayer, NamespacesError) {
   MockNamespace mock_namespace;
 
   auto mock_default_namespace_replayer = new MockNamespaceReplayer();
-  expect_namespace_replayer_is_blacklisted(*mock_default_namespace_replayer,
+  expect_namespace_replayer_is_blocklisted(*mock_default_namespace_replayer,
                                            false);
   auto mock_ns1_namespace_replayer = new MockNamespaceReplayer("ns1");
   auto mock_ns2_namespace_replayer = new MockNamespaceReplayer("ns2");
-  expect_namespace_replayer_is_blacklisted(*mock_ns2_namespace_replayer,
+  expect_namespace_replayer_is_blocklisted(*mock_ns2_namespace_replayer,
                                            false);
   auto mock_ns3_namespace_replayer = new MockNamespaceReplayer("ns3");
 
@@ -819,7 +819,7 @@ TEST_F(TestMockPoolReplayer, NamespacesError) {
   auto mock_leader_watcher = new MockLeaderWatcher();
   expect_leader_watcher_get_leader_instance_id(*mock_leader_watcher);
   expect_leader_watcher_list_instances(*mock_leader_watcher);
-  expect_leader_watcher_is_blacklisted(*mock_leader_watcher, false);
+  expect_leader_watcher_is_blocklisted(*mock_leader_watcher, false);
 
   auto& mock_cluster = get_mock_cluster();
   auto mock_local_rados_client = mock_cluster.do_create_rados_client(
index 0273133da81b8db2598d3e808bbde6ae7e9937cc..317b2756395de441cd416a9467bdb24ed1fcb8e9 100644 (file)
@@ -443,7 +443,7 @@ TEST_F(TestMockPoolWatcher, RegisterWatcherBlacklist) {
   C_SaferCond ctx;
   mock_pool_watcher.init(&ctx);
   ASSERT_EQ(-EBLACKLISTED, ctx.wait());
-  ASSERT_TRUE(mock_pool_watcher.is_blacklisted());
+  ASSERT_TRUE(mock_pool_watcher.is_blocklisted());
 
   expect_mirroring_watcher_unregister(mock_mirroring_watcher, 0);
   ASSERT_EQ(0, when_shut_down(mock_pool_watcher));
@@ -509,7 +509,7 @@ TEST_F(TestMockPoolWatcher, RegisterWatcherError) {
   ASSERT_EQ(0, when_shut_down(mock_pool_watcher));
 }
 
-TEST_F(TestMockPoolWatcher, RefreshBlacklist) {
+TEST_F(TestMockPoolWatcher, RefreshBlocklist) {
   MockThreads mock_threads(m_threads);
   expect_work_queue(mock_threads);
 
@@ -519,15 +519,15 @@ TEST_F(TestMockPoolWatcher, RefreshBlacklist) {
   expect_mirroring_watcher_register(mock_mirroring_watcher, 0);
 
   MockRefreshImagesRequest mock_refresh_images_request;
-  expect_refresh_images(mock_refresh_images_request, {}, -EBLACKLISTED);
+  expect_refresh_images(mock_refresh_images_request, {}, -EBLOCKLISTED);
 
   MockListener mock_listener(this);
   MockPoolWatcher mock_pool_watcher(&mock_threads, m_remote_io_ctx,
                                     "remote uuid", mock_listener);
   C_SaferCond ctx;
   mock_pool_watcher.init(&ctx);
-  ASSERT_EQ(-EBLACKLISTED, ctx.wait());
-  ASSERT_TRUE(mock_pool_watcher.is_blacklisted());
+  ASSERT_EQ(-EBLOCKLISTED, ctx.wait());
+  ASSERT_TRUE(mock_pool_watcher.is_blocklisted());
 
   expect_mirroring_watcher_unregister(mock_mirroring_watcher, 0);
   ASSERT_EQ(0, when_shut_down(mock_pool_watcher));
@@ -624,7 +624,7 @@ TEST_F(TestMockPoolWatcher, Rewatch) {
   ASSERT_EQ(0, when_shut_down(mock_pool_watcher));
 }
 
-TEST_F(TestMockPoolWatcher, RewatchBlacklist) {
+TEST_F(TestMockPoolWatcher, RewatchBlocklist) {
   MockThreads mock_threads(m_threads);
   expect_work_queue(mock_threads);
 
@@ -646,8 +646,8 @@ TEST_F(TestMockPoolWatcher, RewatchBlacklist) {
   ASSERT_EQ(0, ctx.wait());
   ASSERT_TRUE(wait_for_update(1));
 
-  MirroringWatcher::get_instance().handle_rewatch_complete(-EBLACKLISTED);
-  ASSERT_TRUE(mock_pool_watcher.is_blacklisted());
+  MirroringWatcher::get_instance().handle_rewatch_complete(-EBLOCKLISTED);
+  ASSERT_TRUE(mock_pool_watcher.is_blocklisted());
 
   expect_mirroring_watcher_unregister(mock_mirroring_watcher, 0);
   ASSERT_EQ(0, when_shut_down(mock_pool_watcher));
index 9f8e585cdf1bbceb5db4719cf122ce8451d1e935..7652e3c9f3ef17bf3252b5524d6ee5b11e30aef2 100644 (file)
@@ -850,11 +850,11 @@ protected:
   // 192.168.1.0/24
   const rgw::IAM::MaskedIP allowedIPv4Range = { false, rgw::IAM::Address("11000000101010000000000100000000"), 24 };
   // 192.168.1.1/32
-  const rgw::IAM::MaskedIP blacklistedIPv4 = { false, rgw::IAM::Address("11000000101010000000000100000001"), 32 };
+  const rgw::IAM::MaskedIP blocklistedIPv4 = { false, rgw::IAM::Address("11000000101010000000000100000001"), 32 };
   // 2001:db8:85a3:0:0:8a2e:370:7334/128
   const rgw::IAM::MaskedIP allowedIPv6 = { true, rgw::IAM::Address("00100000000000010000110110111000100001011010001100000000000000000000000000000000100010100010111000000011011100000111001100110100"), 128 };
   // ::1
-  const rgw::IAM::MaskedIP blacklistedIPv6 = { true, rgw::IAM::Address(1), 128 };
+  const rgw::IAM::MaskedIP blocklistedIPv6 = { true, rgw::IAM::Address(1), 128 };
   // 2001:db8:85a3:0:0:8a2e:370:7330/124
   const rgw::IAM::MaskedIP allowedIPv6Range = { true, rgw::IAM::Address("00100000000000010000110110111000100001011010001100000000000000000000000000000000100010100010111000000011011100000111001100110000"), 124 };
 public:
@@ -866,11 +866,11 @@ const string IPPolicyTest::arbitrary_tenant = "arbitrary_tenant";
 
 TEST_F(IPPolicyTest, MaskedIPOperations) {
   EXPECT_EQ(stringify(allowedIPv4Range), "192.168.1.0/24");
-  EXPECT_EQ(stringify(blacklistedIPv4), "192.168.1.1/32");
+  EXPECT_EQ(stringify(blocklistedIPv4), "192.168.1.1/32");
   EXPECT_EQ(stringify(allowedIPv6), "2001:db8:85a3:0:0:8a2e:370:7334/128");
   EXPECT_EQ(stringify(allowedIPv6Range), "2001:db8:85a3:0:0:8a2e:370:7330/124");
-  EXPECT_EQ(stringify(blacklistedIPv6), "0:0:0:0:0:0:0:1/128");
-  EXPECT_EQ(allowedIPv4Range, blacklistedIPv4);
+  EXPECT_EQ(stringify(blocklistedIPv6), "0:0:0:0:0:0:0:1/128");
+  EXPECT_EQ(allowedIPv4Range, blocklistedIPv4);
   EXPECT_EQ(allowedIPv6Range, allowedIPv6);
 }
 
@@ -883,7 +883,7 @@ TEST_F(IPPolicyTest, asNetworkIPv4Range) {
 TEST_F(IPPolicyTest, asNetworkIPv4) {
   auto actualIPv4 = rgw::IAM::Condition::as_network("192.168.1.1");
   ASSERT_TRUE(actualIPv4.is_initialized());
-  EXPECT_EQ(*actualIPv4, blacklistedIPv4);
+  EXPECT_EQ(*actualIPv4, blocklistedIPv4);
 }
 
 TEST_F(IPPolicyTest, asNetworkIPv6Range) {
@@ -1016,11 +1016,11 @@ TEST_F(IPPolicyTest, EvalIPAddress) {
   auto fullp  = Policy(cct.get(), arbitrary_tenant,
                   bufferlist::static_from_string(ip_address_full_example));
   Environment e;
-  Environment allowedIP, blacklistedIP, allowedIPv6, blacklistedIPv6;
+  Environment allowedIP, blocklistedIP, allowedIPv6, blocklistedIPv6;
   allowedIP["aws:SourceIp"] = "192.168.1.2";
   allowedIPv6["aws:SourceIp"] = "::1";
-  blacklistedIP["aws:SourceIp"] = "192.168.1.1";
-  blacklistedIPv6["aws:SourceIp"] = "2001:0db8:85a3:0000:0000:8a2e:0370:7334";
+  blocklistedIP["aws:SourceIp"] = "192.168.1.1";
+  blocklistedIPv6["aws:SourceIp"] = "2001:0db8:85a3:0000:0000:8a2e:0370:7334";
 
   auto trueacct = FakeIdentity(
     Principal::tenant("ACCOUNT-ID-WITHOUT-HYPHENS"));
@@ -1038,7 +1038,7 @@ TEST_F(IPPolicyTest, EvalIPAddress) {
                        ARN(Partition::aws, Service::s3,
                            "", arbitrary_tenant, "example_bucket")),
            Effect::Allow);
-  EXPECT_EQ(allowp.eval(blacklistedIPv6, trueacct, s3ListBucket,
+  EXPECT_EQ(allowp.eval(blocklistedIPv6, trueacct, s3ListBucket,
                        ARN(Partition::aws, Service::s3,
                            "", arbitrary_tenant, "example_bucket")),
            Effect::Pass);
@@ -1053,20 +1053,20 @@ TEST_F(IPPolicyTest, EvalIPAddress) {
                           "", arbitrary_tenant, "example_bucket/myobject")),
            Effect::Deny);
 
-  EXPECT_EQ(denyp.eval(blacklistedIP, trueacct, s3ListBucket,
+  EXPECT_EQ(denyp.eval(blocklistedIP, trueacct, s3ListBucket,
                       ARN(Partition::aws, Service::s3,
                           "", arbitrary_tenant, "example_bucket")),
            Effect::Pass);
-  EXPECT_EQ(denyp.eval(blacklistedIP, trueacct, s3ListBucket,
+  EXPECT_EQ(denyp.eval(blocklistedIP, trueacct, s3ListBucket,
                       ARN(Partition::aws, Service::s3,
                           "", arbitrary_tenant, "example_bucket/myobject")),
            Effect::Pass);
 
-  EXPECT_EQ(denyp.eval(blacklistedIPv6, trueacct, s3ListBucket,
+  EXPECT_EQ(denyp.eval(blocklistedIPv6, trueacct, s3ListBucket,
                       ARN(Partition::aws, Service::s3,
                           "", arbitrary_tenant, "example_bucket")),
            Effect::Pass);
-  EXPECT_EQ(denyp.eval(blacklistedIPv6, trueacct, s3ListBucket,
+  EXPECT_EQ(denyp.eval(blocklistedIPv6, trueacct, s3ListBucket,
                       ARN(Partition::aws, Service::s3,
                           "", arbitrary_tenant, "example_bucket/myobject")),
            Effect::Pass);
@@ -1088,11 +1088,11 @@ TEST_F(IPPolicyTest, EvalIPAddress) {
                           "", arbitrary_tenant, "example_bucket/myobject")),
            Effect::Allow);
 
-  EXPECT_EQ(fullp.eval(blacklistedIP, trueacct, s3ListBucket,
+  EXPECT_EQ(fullp.eval(blocklistedIP, trueacct, s3ListBucket,
                       ARN(Partition::aws, Service::s3,
                           "", arbitrary_tenant, "example_bucket")),
            Effect::Pass);
-  EXPECT_EQ(fullp.eval(blacklistedIP, trueacct, s3ListBucket,
+  EXPECT_EQ(fullp.eval(blocklistedIP, trueacct, s3ListBucket,
                       ARN(Partition::aws, Service::s3,
                           "", arbitrary_tenant, "example_bucket/myobject")),
            Effect::Pass);
@@ -1106,11 +1106,11 @@ TEST_F(IPPolicyTest, EvalIPAddress) {
                           "", arbitrary_tenant, "example_bucket/myobject")),
            Effect::Allow);
 
-  EXPECT_EQ(fullp.eval(blacklistedIPv6, trueacct, s3ListBucket,
+  EXPECT_EQ(fullp.eval(blocklistedIPv6, trueacct, s3ListBucket,
                       ARN(Partition::aws, Service::s3,
                           "", arbitrary_tenant, "example_bucket")),
            Effect::Pass);
-  EXPECT_EQ(fullp.eval(blacklistedIPv6, trueacct, s3ListBucket,
+  EXPECT_EQ(fullp.eval(blocklistedIPv6, trueacct, s3ListBucket,
                       ARN(Partition::aws, Service::s3,
                           "", arbitrary_tenant, "example_bucket/myobject")),
            Effect::Pass);
index ab72607b386c29f828815270c017221dd5c08e6c..5da2b58b154a8163e163133f2935c24239612202 100644 (file)
@@ -88,25 +88,25 @@ TEST_P(WatchStress, Stress1) {
     cluster.ioctx_create(pool_name.c_str(), ioctx);
     ASSERT_EQ(0, ioctx.watch("foo", 0, &handle, &ctx));
 
-    bool do_blacklist = i % 2;
-    if (do_blacklist) {
-      cluster.test_blacklist_self(true);
-      std::cerr << "blacklisted" << std::endl;
+    bool do_blocklist = i % 2;
+    if (do_blocklist) {
+      cluster.test_blocklist_self(true);
+      std::cerr << "blocklisted" << std::endl;
       sleep(1);
     }
 
     bufferlist bl2;
     ASSERT_EQ(0, nioctx.notify("foo", 0, bl2));
 
-    if (do_blacklist) {
+    if (do_blocklist) {
       sleep(1); // Give a change to see an incorrect notify
     } else {
       TestAlarm alarm;
       sem_wait(sem);
     }
 
-    if (do_blacklist) {
-      cluster.test_blacklist_self(false);
+    if (do_blocklist) {
+      cluster.test_blocklist_self(false);
     }
 
     ioctx.unwatch("foo", handle);
index b07b4333ac6cffebd56830463cfe8ccf19089555..fcdd1baad44c3a2eabd9e31e4d531e4712c7c513 100644 (file)
@@ -262,9 +262,9 @@ void ImageDeleter<I>::enqueue_failed_delete(DeleteInfoRef* delete_info,
                                             int error_code,
                                             double retry_delay) {
   dout(20) << "info=" << *delete_info << ", r=" << error_code << dendl;
-  if (error_code == -EBLACKLISTED) {
+  if (error_code == -EBLOCKLISTED) {
     std::lock_guard locker{m_lock};
-    derr << "blacklisted while deleting local image" << dendl;
+    derr << "blocklisted while deleting local image" << dendl;
     complete_active_delete(delete_info, error_code);
     return;
   }
index 9569f025bea2c906d8d3c9b5d66034e255a0f3ce..47f221278706bd01283aa5e9ce00b195a621596d 100644 (file)
@@ -85,9 +85,9 @@ public:
     m_finished = finished;
   }
 
-  inline bool is_blacklisted() const {
+  inline bool is_blocklisted() const {
     std::lock_guard locker{m_lock};
-    return (m_last_r == -EBLACKLISTED);
+    return (m_last_r == -EBLOCKLISTED);
   }
 
   image_replayer::HealthState get_health_state() const;
index 2def7ba03c76fccc5993717d36d5a668132fdbf5..7ef2a6ef6cffe71a90555412e476033b23bf8e70 100644 (file)
@@ -57,9 +57,9 @@ InstanceReplayer<I>::~InstanceReplayer() {
 }
 
 template <typename I>
-bool InstanceReplayer<I>::is_blacklisted() const {
+bool InstanceReplayer<I>::is_blocklisted() const {
   std::lock_guard locker{m_lock};
-  return m_blacklisted;
+  return m_blocklisted;
 }
 
 template <typename I>
@@ -335,10 +335,10 @@ void InstanceReplayer<I>::start_image_replayer(
   std::string global_image_id = image_replayer->get_global_image_id();
   if (!image_replayer->is_stopped()) {
     return;
-  } else if (image_replayer->is_blacklisted()) {
-    derr << "global_image_id=" << global_image_id << ": blacklisted detected "
+  } else if (image_replayer->is_blocklisted()) {
+    derr << "global_image_id=" << global_image_id << ": blocklisted detected "
          << "during image replay" << dendl;
-    m_blacklisted = true;
+    m_blocklisted = true;
     return;
   } else if (image_replayer->is_finished()) {
     // TODO temporary until policy integrated
index ec500fd5cb30a235038123d0c9b76d57829936e7..7a5c79723d3e61a01af1d9042b8990f337b04182 100644 (file)
@@ -52,7 +52,7 @@ public:
                    PoolMetaCache* pool_meta_cache);
   ~InstanceReplayer();
 
-  bool is_blacklisted() const;
+  bool is_blocklisted() const;
 
   int init();
   void shut_down();
@@ -111,7 +111,7 @@ private:
   Context *m_image_state_check_task = nullptr;
   Context *m_on_shut_down = nullptr;
   bool m_manual_stop = false;
-  bool m_blacklisted = false;
+  bool m_blocklisted = false;
 
   void wait_for_ops();
   void handle_wait_for_ops(int r);
index f7c310137431fc5908e25c19286efdd90888f42b..7b531064ded525e6fd01e3866f273d03e0a5c7b9 100644 (file)
@@ -336,7 +336,7 @@ InstanceWatcher<I>::InstanceWatcher(librados::IoCtx &io_ctx,
       unique_lock_name("rbd::mirror::InstanceWatcher::m_lock", this))),
     m_instance_lock(librbd::ManagedLock<I>::create(
       m_ioctx, asio_engine, m_oid, this, librbd::managed_lock::EXCLUSIVE, true,
-      m_cct->_conf.get_val<uint64_t>("rbd_blacklist_expire_seconds"))) {
+      m_cct->_conf.get_val<uint64_t>("rbd_blocklist_expire_seconds"))) {
 }
 
 template <typename I>
index 4b59365cd435851e5104f7d2ef82fe4596c2a226..ca291bb5fddc6dcf98293025f3d0e83d00dc3984 100644 (file)
@@ -278,7 +278,7 @@ void Instances<I>::handle_remove_instances(
   dout(10) << "r=" << r << ", instance_ids=" << instance_ids << dendl;
   ceph_assert(r == 0);
 
-  // fire removed notification now that instances have been blacklisted
+  // fire removed notification now that instances have been blocklisted
   m_threads->work_queue->queue(
     new C_NotifyInstancesRemoved(this, instance_ids), 0);
 
index c6eed29cf548da07283a5778f40d033335317b80..8f12af14c8cef1eaa441d2c54c74293728fc2c20 100644 (file)
@@ -38,7 +38,7 @@ LeaderWatcher<I>::LeaderWatcher(Threads<I> *threads, librados::IoCtx &io_ctx,
     m_instance_id(stringify(m_notifier_id)),
     m_leader_lock(new LeaderLock(m_ioctx, *m_threads->asio_engine, m_oid, this,
                                  true, m_cct->_conf.get_val<uint64_t>(
-                                   "rbd_blacklist_expire_seconds"))) {
+                                   "rbd_blocklist_expire_seconds"))) {
 }
 
 template <typename I>
@@ -250,9 +250,9 @@ void LeaderWatcher<I>::handle_wait_for_tasks() {
 }
 
 template <typename I>
-bool LeaderWatcher<I>::is_blacklisted() const {
+bool LeaderWatcher<I>::is_blocklisted() const {
   std::lock_guard locker{m_lock};
-  return m_blacklisted;
+  return m_blocklisted;
 }
 
 template <typename I>
@@ -1022,9 +1022,9 @@ template <typename I>
 void LeaderWatcher<I>::handle_rewatch_complete(int r) {
   dout(5) << "r=" << r << dendl;
 
-  if (r == -EBLACKLISTED) {
-    dout(1) << "blacklisted detected" << dendl;
-    m_blacklisted = true;
+  if (r == -EBLOCKLISTED) {
+    dout(1) << "blocklisted detected" << dendl;
+    m_blocklisted = true;
     return;
   }
 
index 223cf3e20c883135756367cefc1e7098098eb992..58f23148f622744b395e501dc6bde27c95e43bef 100644 (file)
@@ -47,7 +47,7 @@ public:
   void init(Context *on_finish);
   void shut_down(Context *on_finish);
 
-  bool is_blacklisted() const;
+  bool is_blocklisted() const;
   bool is_leader() const;
   bool is_releasing_leader() const;
   bool get_leader_instance_id(std::string *instance_id) const;
@@ -121,11 +121,11 @@ private:
 
     LeaderLock(librados::IoCtx& ioctx, librbd::AsioEngine& asio_engine,
                const std::string& oid, LeaderWatcher *watcher,
-               bool blacklist_on_break_lock,
-               uint32_t blacklist_expire_seconds)
+               bool blocklist_on_break_lock,
+               uint32_t blocklist_expire_seconds)
       : Parent(ioctx, asio_engine, oid, watcher,
-               librbd::managed_lock::EXCLUSIVE, blacklist_on_break_lock,
-               blacklist_expire_seconds),
+               librbd::managed_lock::EXCLUSIVE, blocklist_on_break_lock,
+               blocklist_expire_seconds),
         watcher(watcher) {
     }
 
@@ -220,7 +220,7 @@ private:
   Instances<ImageCtxT> *m_instances = nullptr;
   librbd::managed_lock::Locker m_locker;
 
-  bool m_blacklisted = false;
+  bool m_blocklisted = false;
 
   AsyncOpTracker m_timer_op_tracker;
   Context *m_timer_task = nullptr;
index 590336b12a42fa20e1357e0ea7ca86221386deb7..f02cfe65df56868780b0d407b0c51037a1c53a26 100644 (file)
@@ -713,8 +713,8 @@ void Mirror::update_pool_replayers(const PoolPeers &pool_peers,
           // TODO: make async
           pool_replayer->shut_down();
           pool_replayer->init(site_name);
-        } else if (pool_replayer->is_blacklisted()) {
-          derr << "restarting blacklisted pool replayer for " << peer << dendl;
+        } else if (pool_replayer->is_blocklisted()) {
+          derr << "restarting blocklisted pool replayer for " << peer << dendl;
           // TODO: make async
           pool_replayer->shut_down();
           pool_replayer->init(site_name);
index 2a45cd1c6a8a277cc404e411ef0fa42255b58242..d305d8472151a1ccbe638936b081ca49c37cd1cb 100644 (file)
@@ -70,13 +70,13 @@ NamespaceReplayer<I>::NamespaceReplayer(
 }
 
 template <typename I>
-bool NamespaceReplayer<I>::is_blacklisted() const {
+bool NamespaceReplayer<I>::is_blocklisted() const {
   std::lock_guard locker{m_lock};
-  return m_instance_replayer->is_blacklisted() ||
+  return m_instance_replayer->is_blocklisted() ||
          (m_local_pool_watcher &&
-          m_local_pool_watcher->is_blacklisted()) ||
+          m_local_pool_watcher->is_blocklisted()) ||
          (m_remote_pool_watcher &&
-          m_remote_pool_watcher->is_blacklisted());
+          m_remote_pool_watcher->is_blocklisted());
 }
 
 template <typename I>
@@ -808,7 +808,7 @@ void NamespaceReplayer<I>::shut_down_image_map(Context *on_finish) {
 template <typename I>
 void NamespaceReplayer<I>::handle_shut_down_image_map(int r, Context *on_finish) {
   dout(5) << "r=" << r << dendl;
-  if (r < 0 && r != -EBLACKLISTED) {
+  if (r < 0 && r != -EBLOCKLISTED) {
     derr << "failed to shut down image map: " << cpp_strerror(r) << dendl;
   }
 
index 4e0756ee2aba2179d048a0a3200b6b5645527001..e304b8253f850b36d5e05184f33a8ece9101730a 100644 (file)
@@ -78,7 +78,7 @@ public:
   NamespaceReplayer(const NamespaceReplayer&) = delete;
   NamespaceReplayer& operator=(const NamespaceReplayer&) = delete;
 
-  bool is_blacklisted() const;
+  bool is_blocklisted() const;
 
   void init(Context *on_finish);
   void shut_down(Context *on_finish);
index 42018d5d548a543b1a4850bd448ef2a474454735..a240b11c45ca3a329e6568844f2fb2140f5a90b2 100644 (file)
@@ -248,9 +248,9 @@ PoolReplayer<I>::~PoolReplayer()
 }
 
 template <typename I>
-bool PoolReplayer<I>::is_blacklisted() const {
+bool PoolReplayer<I>::is_blocklisted() const {
   std::lock_guard locker{m_lock};
-  return m_blacklisted;
+  return m_blocklisted;
 }
 
 template <typename I>
@@ -272,7 +272,7 @@ void PoolReplayer<I>::init(const std::string& site_name) {
 
   // reset state
   m_stopping = false;
-  m_blacklisted = false;
+  m_blocklisted = false;
   m_site_name = site_name;
 
   dout(10) << "replaying for " << m_peer << dendl;
@@ -589,15 +589,15 @@ void PoolReplayer<I>::run() {
 
     std::unique_lock locker{m_lock};
 
-    if (m_leader_watcher->is_blacklisted() ||
-        m_default_namespace_replayer->is_blacklisted()) {
-      m_blacklisted = true;
+    if (m_leader_watcher->is_blocklisted() ||
+        m_default_namespace_replayer->is_blocklisted()) {
+      m_blocklisted = true;
       m_stopping = true;
     }
 
     for (auto &it : m_namespace_replayers) {
-      if (it.second->is_blacklisted()) {
-        m_blacklisted = true;
+      if (it.second->is_blocklisted()) {
+        m_blocklisted = true;
         m_stopping = true;
         break;
       }
index 21437451c1a606e7da4d2ee5c6d4332a655b4474..e0fd753778d92c449cab3afd3f58aa95f1e9843a 100644 (file)
@@ -55,7 +55,7 @@ public:
   PoolReplayer(const PoolReplayer&) = delete;
   PoolReplayer& operator=(const PoolReplayer&) = delete;
 
-  bool is_blacklisted() const;
+  bool is_blocklisted() const;
   bool is_leader() const;
   bool is_running() const;
 
@@ -205,7 +205,7 @@ private:
   std::string m_site_name;
   bool m_stopping = false;
   bool m_manual_stop = false;
-  bool m_blacklisted = false;
+  bool m_blocklisted = false;
 
   RadosRef m_local_rados;
   RadosRef m_remote_rados;
index c3346dad11038f8a378c9871608885417c97310e..bec931cf39c8ed76ed9db91bb83d7214c5be809c 100644 (file)
@@ -88,9 +88,9 @@ PoolWatcher<I>::~PoolWatcher() {
 }
 
 template <typename I>
-bool PoolWatcher<I>::is_blacklisted() const {
+bool PoolWatcher<I>::is_blocklisted() const {
   std::lock_guard locker{m_lock};
-  return m_blacklisted;
+  return m_blocklisted;
 }
 
 template <typename I>
@@ -170,11 +170,11 @@ void PoolWatcher<I>::handle_register_watcher(int r) {
   Context *on_init_finish = nullptr;
   if (r >= 0) {
     refresh_images();
-  } else if (r == -EBLACKLISTED) {
-    dout(0) << "detected client is blacklisted" << dendl;
+  } else if (r == -EBLOCKLISTED) {
+    dout(0) << "detected client is blocklisted" << dendl;
 
     std::lock_guard locker{m_lock};
-    m_blacklisted = true;
+    m_blocklisted = true;
     std::swap(on_init_finish, m_on_init_finish);
   } else if (r == -ENOENT) {
     dout(5) << "mirroring directory does not exist" << dendl;
@@ -267,10 +267,10 @@ void PoolWatcher<I>::handle_refresh_images(int r) {
       std::swap(on_init_finish, m_on_init_finish);
 
       schedule_listener();
-    } else if (r == -EBLACKLISTED) {
-      dout(0) << "detected client is blacklisted during image refresh" << dendl;
+    } else if (r == -EBLOCKLISTED) {
+      dout(0) << "detected client is blocklisted during image refresh" << dendl;
 
-      m_blacklisted = true;
+      m_blocklisted = true;
       std::swap(on_init_finish, m_on_init_finish);
     } else {
       retry_refresh = true;
@@ -315,11 +315,11 @@ template <typename I>
 void PoolWatcher<I>::handle_rewatch_complete(int r) {
   dout(5) << "r=" << r << dendl;
 
-  if (r == -EBLACKLISTED) {
-    dout(0) << "detected client is blacklisted" << dendl;
+  if (r == -EBLOCKLISTED) {
+    dout(0) << "detected client is blocklisted" << dendl;
 
     std::lock_guard locker{m_lock};
-    m_blacklisted = true;
+    m_blocklisted = true;
     return;
   } else if (r == -ENOENT) {
     dout(5) << "mirroring directory deleted" << dendl;
index c5c84731da8cc2b069493659d5571db2bf3d6629..2905de15fba24c224dcd2d80f4df22cbb2654f1a 100644 (file)
@@ -48,7 +48,7 @@ public:
   PoolWatcher(const PoolWatcher&) = delete;
   PoolWatcher& operator=(const PoolWatcher&) = delete;
 
-  bool is_blacklisted() const;
+  bool is_blocklisted() const;
 
   void init(Context *on_finish = nullptr);
   void shut_down(Context *on_finish);
@@ -127,7 +127,7 @@ private:
   Context *m_timer_ctx = nullptr;
 
   AsyncOpTracker m_async_op_tracker;
-  bool m_blacklisted = false;
+  bool m_blocklisted = false;
   bool m_shutting_down = false;
   bool m_image_ids_invalid = true;
   bool m_refresh_in_progress = false;
index 7f5b8e34bd0920da405a4d58a5cb13cfb4fefbd6..beb64b66c9f79d325098ca7dd80656629e2efc4e 100644 (file)
@@ -96,7 +96,7 @@ void TrashWatcher<I>::handle_rewatch_complete(int r) {
   dout(5) << "r=" << r << dendl;
 
   if (r == -EBLACKLISTED) {
-    dout(0) << "detected client is blacklisted" << dendl;
+    dout(0) << "detected client is blocklisted" << dendl;
     return;
   } else if (r == -ENOENT) {
     dout(5) << "trash directory deleted" << dendl;
@@ -135,9 +135,9 @@ void TrashWatcher<I>::handle_create_trash(int r) {
   }
 
   Context* on_init_finish = nullptr;
-  if (r == -EBLACKLISTED || r == -ENOENT) {
-    if (r == -EBLACKLISTED) {
-      dout(0) << "detected client is blacklisted" << dendl;
+  if (r == -EBLOCKLISTED || r == -ENOENT) {
+    if (r == -EBLOCKLISTED) {
+      dout(0) << "detected client is blocklisted" << dendl;
     } else {
       dout(0) << "detected pool no longer exists" << dendl;
     }
@@ -201,8 +201,8 @@ void TrashWatcher<I>::handle_register_watcher(int r) {
   Context *on_init_finish = nullptr;
   if (r >= 0) {
     trash_list(true);
-  } else if (r == -EBLACKLISTED) {
-    dout(0) << "detected client is blacklisted" << dendl;
+  } else if (r == -EBLOCKLISTED) {
+    dout(0) << "detected client is blocklisted" << dendl;
 
     std::lock_guard locker{m_lock};
     std::swap(on_init_finish, m_on_init_finish);
@@ -287,8 +287,8 @@ void TrashWatcher<I>::handle_trash_list(int r) {
       r = 0;
     }
 
-    if (r == -EBLACKLISTED) {
-      dout(0) << "detected client is blacklisted during trash refresh" << dendl;
+    if (r == -EBLOCKLISTED) {
+      dout(0) << "detected client is blocklisted during trash refresh" << dendl;
       m_trash_list_in_progress = false;
       std::swap(on_init_finish, m_on_init_finish);
     } else if (r >= 0 && images.size() < MAX_RETURN) {
@@ -303,7 +303,7 @@ void TrashWatcher<I>::handle_trash_list(int r) {
     m_last_image_id = images.rbegin()->first;
     trash_list(false);
     return;
-  } else if (r < 0 && r != -EBLACKLISTED) {
+  } else if (r < 0 && r != -EBLOCKLISTED) {
     derr << "failed to retrieve trash directory: " << cpp_strerror(r) << dendl;
     schedule_trash_list(10);
   }