Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion salt/srv/salt/_modules/ceph.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,16 @@ def cluster_status(cluster_handle, cluster_name):
fsid = status['fsid']
mon_epoch = status['monmap']['epoch']
osd_epoch = status['osdmap']['osdmap']['epoch']
mds_epoch = status['mdsmap']['epoch']

# for ceph version begin from jewel, the 'mdsmap' has been changed to 'fsmap'.
ceph_version_str = __salt__['pkg.version']('ceph') # noqa
if ceph_version_str:
ceph_version_list = ceph_version_str.split('.')

if ceph_version_list and int(ceph_version_list[0]) >= 10:
mds_epoch = status['fsmap']['epoch']
else:
mds_epoch = status['mdsmap']['epoch']

# FIXME: even on a healthy system, 'health detail' contains some statistics
# that change on their own, such as 'last_updated' and the mon space usage.
Expand Down