]> git-server-git.apps.pok.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)
committerJoao Eduardo Luis <joao@suse.com>
Mon, 9 Dec 2019 19:36:54 +0000 (19:36 +0000)
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>
(cherry picked from commit 383006a5cc2da3e0b643a9dc600e75e1ce088bd6)

Conflicts:
src/pybind/mgr/telemetry/module.py
          Due to missing scaffolding that exists in master but was not
          backported to luminous.

src/pybind/mgr/telemetry/module.py

index 7e6cb84bb0645cdd3ecac36e542c21557c67e9bc..dba4b5ededd502b54154c67a8c3d7a683c84639d 100644 (file)
@@ -137,10 +137,6 @@ class Module(MgrModule):
 
         return False
 
-    @staticmethod
-    def parse_timestamp(timestamp):
-        return datetime.strptime(timestamp, '%Y-%m-%d %H:%M:%S.%f')
-
     def set_config_option(self, option, value):
         if option not in self.config_keys.keys():
             raise RuntimeError('{0} is a unknown configuration '
@@ -239,7 +235,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']),