]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: use cluster-provided timestamp unmolested
authorSage Weil <sage@redhat.com>
Mon, 29 Apr 2019 19:32:44 +0000 (14:32 -0500)
committerSage Weil <sage@redhat.com>
Wed, 29 May 2019 19:12:15 +0000 (14:12 -0500)
The cluster stamp is now ISO 8601; just use that.

(The isoformat() puts a : in +hh:mm the timezone offset, which is slightly
different than what Ceph does; just pass Ceph's value through for
consistency.)

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/telemetry/module.py

index e986bbb42347c11973e98f0d8c752bb746da94ce..9b05c19a94b1ff8ad65e913fd70b42e32a70c45b 100644 (file)
@@ -122,10 +122,6 @@ class Module(MgrModule):
                     self.get_module_option(opt['name']))
             self.log.debug(' %s = %s', opt['name'], getattr(self, opt['name']))
 
-    @staticmethod
-    def parse_timestamp(timestamp):
-        return datetime.strptime(timestamp, '%Y-%m-%d %H:%M:%S.%f')
-
     def load(self):
         self.last_upload = self.get_store('last_upload', None)
         if self.last_upload is not None:
@@ -205,7 +201,7 @@ class Module(MgrModule):
         df = self.get('df')
 
         report['report_id'] = self.report_id
-        report['created'] = self.parse_timestamp(mon_map['created']).isoformat()
+        report['created'] = mon_map['created']
 
         report['mon'] = {
             'count': len(mon_map['mons']),