From: Venky Shankar Date: Mon, 2 Aug 2021 04:23:23 +0000 (-0400) Subject: mgr/mirroring: `daemon status` command does not require file system name X-Git-Tag: v17.1.0~876^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=746278727e10c9a2b28f0f9a43401ed88d23de70;p=ceph.git mgr/mirroring: `daemon status` command does not require file system name Signed-off-by: Venky Shankar --- diff --git a/src/pybind/mgr/mirroring/fs/snapshot_mirror.py b/src/pybind/mgr/mirroring/fs/snapshot_mirror.py index a3295514c2d9..ad9e550435d8 100644 --- a/src/pybind/mgr/mirroring/fs/snapshot_mirror.py +++ b/src/pybind/mgr/mirroring/fs/snapshot_mirror.py @@ -749,14 +749,9 @@ class FSSnapshotMirror: except MirrorException as me: return me.args[0], '', me.args[1] - def daemon_status(self, filesystem): + def daemon_status(self): try: with self.lock: - if not self.filesystem_exist(filesystem): - raise MirrorException(-errno.ENOENT, f'filesystem {filesystem} does not exist') - fspolicy = self.pool_policy.get(filesystem, None) - if not fspolicy: - raise MirrorException(-errno.EINVAL, f'filesystem {filesystem} is not mirrored') daemons = [] sm = self.mgr.get('service_map') daemon_entry = sm['services'].get('cephfs-mirror', None) diff --git a/src/pybind/mgr/mirroring/module.py b/src/pybind/mgr/mirroring/module.py index 19b0f76edbac..b9223111ae90 100644 --- a/src/pybind/mgr/mirroring/module.py +++ b/src/pybind/mgr/mirroring/module.py @@ -97,7 +97,6 @@ class Module(MgrModule): return self.fs_snapshot_mirror.show_distribution(fs_name) @CLIReadCommand('fs snapshot mirror daemon status') - def snapshot_mirror_daemon_status(self, - fs_name: str): + def snapshot_mirror_daemon_status(self): """Get mirror daemon status""" - return self.fs_snapshot_mirror.daemon_status(fs_name) + return self.fs_snapshot_mirror.daemon_status()