From 611dce09f3e485985b2b2c8629aa6f3c2244f829 Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Fri, 29 Aug 2025 17:36:07 +0530 Subject: [PATCH] cephfs_mirror: deprecate 'peer_add' command Fixes: https://tracker.ceph.com/issues/72683 Signed-off-by: Jos Collin --- src/pybind/mgr/mirroring/module.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/mirroring/module.py b/src/pybind/mgr/mirroring/module.py index 67f0942147e88..83abff612d193 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, -- 2.39.5