]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/MonmapMonitor: clean up empty created stamp in monmap 27399/head
authorSage Weil <sage@redhat.com>
Tue, 2 Apr 2019 21:50:08 +0000 (16:50 -0500)
committerSage Weil <sage@redhat.com>
Fri, 5 Apr 2019 13:40:22 +0000 (08:40 -0500)
commitca0965ee65f1976251ff7818e4ea503365715c88
tree333e1505b16ba2c91b99dfdabdc7f40653ac2d99
parent0b7445d33a0e253b32105f3db9fd8b046df999f8
mon/MonmapMonitor: clean up empty created stamp in monmap

Some old clusters have an empty created timestamp.  This is mostly
harmless, but it is confusing/wrong, and it does currently break the
telemetry module with errors like

 ValueError: time data '0.000000' does not match format '%Y-%m-%d %H:%M:%S.%f'

from 'ceph telemetry show'.

If we detect an empty created stamp, look at old monmap and use the oldest
modified stamp we can find.

Fixes: http://tracker.ceph.com/issues/39085
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 3046d17f61d1fa11fe2f35f7cfe9428312a78593)
src/mon/MonmapMonitor.cc
src/mon/MonmapMonitor.h