Skip to content

Commit d00314d

Browse files
committed
Merge PR ceph#57291 into main
* refs/pull/57291/head: pybind/mgr/mirroring: Fix KeyError: 'directory_count' in daemon status Reviewed-by: Rishabh Dave <ridave@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
2 parents c50662d + b78baa2 commit d00314d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pybind/mgr/mirroring/fs/snapshot_mirror.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,13 +766,13 @@ def daemon_status(self):
766766
} # type: Dict[str, Any]
767767
daemon_status = self.mgr.get_daemon_status('cephfs-mirror', daemon_key)
768768
if not daemon_status:
769-
log.debug(f'daemon status not yet availble for cephfs-mirror daemon: {daemon_key}')
769+
log.debug(f'daemon status not yet available for cephfs-mirror daemon: {daemon_key}')
770770
continue
771771
status = json.loads(daemon_status['status_json'])
772772
for fs_id, fs_desc in status.items():
773773
fs = {'filesystem_id' : int(fs_id),
774774
'name' : fs_desc['name'],
775-
'directory_count' : fs_desc['directory_count'],
775+
'directory_count' : fs_desc.get('directory_count', 0),
776776
'peers' : []
777777
} # type: Dict[str, Any]
778778
for peer_uuid, peer_desc in fs_desc['peers'].items():

0 commit comments

Comments
 (0)