]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/MonmapMonitor: clean up empty created stamp in monmap 27327/head
authorSage Weil <sage@redhat.com>
Tue, 2 Apr 2019 21:50:08 +0000 (16:50 -0500)
committerSage Weil <sage@redhat.com>
Wed, 3 Apr 2019 13:52:04 +0000 (08:52 -0500)
commit3046d17f61d1fa11fe2f35f7cfe9428312a78593
treeb7870c0ede1a85f200da9c3596a9f5a2333592d8
parentb8757a878fefd66a8ae43dbc48b0f787dad4bf84
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>
src/mon/MonmapMonitor.cc
src/mon/MonmapMonitor.h