From: Kotresh HR Date: Tue, 17 Feb 2026 18:43:21 +0000 (+0530) Subject: mgr/mirroring: Display remote fsid and mon_host in daemon status X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c1262399d0758823639b97c4ca93bdd045b72865;p=ceph-ci.git mgr/mirroring: Display remote fsid and mon_host in daemon status The cephfs_mirror daemon returns the basic remote info. Fetch the remote fsid and mon_host from the monitor config map and append it. Sample output: [ { "daemon_id": 4153, "filesystems": [ { "filesystem_id": 1, "name": "a", "directory_count": 0, "peers": [ { "uuid": "29304477-1fd7-4709-b9f7-8153acebbafd", "remote": { "client_name": "client.mirror_remote", "cluster_name": "remote-site", "fs_name": "a", "mon_host": "[v2:192.168.64.5:40183,v1:192.168.64.5:40184]", "fsid": "5682c8e5-50cd-4cfd-b75c-5354dcdda487" }, "stats": { "failure_count": 0, "recovery_count": 0 } } ] } ] } ] Fixes: https://tracker.ceph.com/issues/73455 Signed-off-by: Kotresh HR --- diff --git a/src/pybind/mgr/mirroring/fs/snapshot_mirror.py b/src/pybind/mgr/mirroring/fs/snapshot_mirror.py index c348ce82de1..d34e10295f4 100644 --- a/src/pybind/mgr/mirroring/fs/snapshot_mirror.py +++ b/src/pybind/mgr/mirroring/fs/snapshot_mirror.py @@ -790,9 +790,23 @@ class FSSnapshotMirror: 'peers' : [] } # type: Dict[str, Any] for peer_uuid, peer_desc in fs_desc['peers'].items(): + # Get basic peer info from daemon status (FSMap data) + remote = peer_desc['remote'].copy() # Don't modify original + + # Fetch mon_host and fsid from config database + config_key = FSSnapshotMirror.peer_config_key(fs_desc['name'], peer_uuid) + try: + remote_config = self.config_get(config_key) + if remote_config: + if 'mon_host' in remote_config: + remote['mon_host'] = remote_config['mon_host'] + if 'fsid' in remote_config: + remote['fsid'] = remote_config['fsid'] + except Exception as e: + log.warning(f'failed to fetch config for fs={fs_desc["name"]}, peer={peer_uuid}: {e}') peer = { 'uuid' : peer_uuid, - 'remote' : peer_desc['remote'], + 'remote' : remote, 'stats' : peer_desc['stats'] } fs['peers'].append(peer)