Skip to content

Commit 4c9887d

Browse files
authored
Merge pull request ceph#65309 from joscollin/wip-72683-peer-add-deprecate
cephfs_mirror: deprecate peer_add command Reviewed-by: Venky Shankar <[email protected]> Reviewed-by: Anthony D'Atri <[email protected]>
2 parents 5ec86b6 + d19d3f5 commit 4c9887d

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

PendingReleaseNotes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* DASHBOARD: Removed the older landing page which was deprecated in Quincy.
99
Admins can no longer enable the older, deprecated landing page layout by
1010
adjusting FEATURE_TOGGLE_DASHBOARD.
11+
* CephFS: The `peer_add` command is deprecated in favor of the `peer_bootstrap` command.
1112

1213
>=20.0.0
1314

doc/cephfs/cephfs-mirroring.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ and the user key. However, bootstrapping a peer is the recommended way to add a
173173
peer.
174174

175175
.. note:: Only a single peer is currently supported.
176+
The ``peer_add`` command is deprecated and will be removed in a future release.
177+
Use the ``peer_bootstrap`` command instead.
176178

177179
To remove a peer, run a command of the following form:
178180

doc/dev/cephfs-mirroring.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ cluster's monitor address and user key. However, bootstrapping a peer is the
170170
recommended way to add a peer.
171171

172172
.. note:: Only a single peer is supported right now.
173+
The ``peer_add`` command is deprecated and will be removed in a future release.
174+
Use the ``peer_bootstrap`` command instead.
173175

174176
To remove a peer, run a command of the following form:
175177

src/pybind/mgr/mirroring/module.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ def snapshot_mirorr_peer_add(self,
3939
if remote_mon_host and cephx_key:
4040
conf['mon_host'] = remote_mon_host
4141
conf['key'] = cephx_key
42-
return self.fs_snapshot_mirror.peer_add(fs_name, remote_cluster_spec,
43-
remote_fs_name, remote_conf=conf)
42+
r, out, err = self.fs_snapshot_mirror.peer_add(fs_name, remote_cluster_spec,
43+
remote_fs_name, remote_conf=conf)
44+
out = (f"{out}\n"
45+
"Warning: The 'peer_add' command is deprecated and will be removed in a "
46+
"future release. Use 'peer_bootstrap' instead.\n")
47+
return r, out, err
4448

4549
@CLIReadCommand('fs snapshot mirror peer_list')
4650
def snapshot_mirror_peer_list(self,

0 commit comments

Comments
 (0)