diff --git a/PendingReleaseNotes b/PendingReleaseNotes index c2adac12729..8a4b13f31a1 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -8,6 +8,7 @@ * DASHBOARD: Removed the older landing page which was deprecated in Quincy. Admins can no longer enable the older, deprecated landing page layout by adjusting FEATURE_TOGGLE_DASHBOARD. +* CephFS: The `peer_add` command is deprecated in favor of the `peer_bootstrap` command. >=20.0.0 diff --git a/doc/cephfs/cephfs-mirroring.rst b/doc/cephfs/cephfs-mirroring.rst index 1cf9aa6119d..509ff4d8f38 100644 --- a/doc/cephfs/cephfs-mirroring.rst +++ b/doc/cephfs/cephfs-mirroring.rst @@ -173,6 +173,8 @@ and the user key. However, bootstrapping a peer is the recommended way to add a peer. .. note:: Only a single peer is currently supported. + The ``peer_add`` command is deprecated and will be removed in a future release. + Use the ``peer_bootstrap`` command instead. To remove a peer, run a command of the following form: diff --git a/doc/dev/cephfs-mirroring.rst b/doc/dev/cephfs-mirroring.rst index 50d64f4a398..9fe072967f3 100644 --- a/doc/dev/cephfs-mirroring.rst +++ b/doc/dev/cephfs-mirroring.rst @@ -170,6 +170,8 @@ cluster's monitor address and user key. However, bootstrapping a peer is the recommended way to add a peer. .. note:: Only a single peer is supported right now. + The ``peer_add`` command is deprecated and will be removed in a future release. + Use the ``peer_bootstrap`` command instead. To remove a peer, run a command of the following form: diff --git a/src/pybind/mgr/mirroring/module.py b/src/pybind/mgr/mirroring/module.py index 5ba7dde5587..2ea3e1b067c 100644 --- a/src/pybind/mgr/mirroring/module.py +++ b/src/pybind/mgr/mirroring/module.py @@ -39,8 +39,12 @@ class Module(MgrModule): if remote_mon_host and cephx_key: conf['mon_host'] = remote_mon_host conf['key'] = cephx_key - return self.fs_snapshot_mirror.peer_add(fs_name, remote_cluster_spec, - remote_fs_name, remote_conf=conf) + r, out, err = self.fs_snapshot_mirror.peer_add(fs_name, remote_cluster_spec, + remote_fs_name, remote_conf=conf) + out = (f"{out}\n" + "Warning: The 'peer_add' command is deprecated and will be removed in a " + "future release. Use 'peer_bootstrap' instead.\n") + return r, out, err @CLIReadCommand('fs snapshot mirror peer_list') def snapshot_mirror_peer_list(self,