]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: add 'last_upload' to status 33409/head
authorYaarit Hatuka <yaarit@redhat.com>
Fri, 7 Feb 2020 15:04:50 +0000 (10:04 -0500)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Wed, 19 Feb 2020 08:42:44 +0000 (15:42 +0700)
'ceph telemetry status' now shows the last sent report date.

Fixes: https://tracker.ceph.com/issues/44040
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
(cherry picked from commit 3a25c912a702c7ec93002a105217a7ff80a67dc9)

Conflicts:
- path: src/pybind/mgr/telemetry/module.py
  comment: nautilus version of json.dumps() don't have sort_keys arg.

src/pybind/mgr/telemetry/module.py

index c2f9657e686e5482bdae74e6697344d10610005f..e859a97ed000261acee836ad23603c7a5648fd25 100644 (file)
@@ -747,6 +747,7 @@ class Module(MgrModule):
             r = {}
             for opt in self.MODULE_OPTIONS:
                 r[opt['name']] = getattr(self, opt['name'])
+            r['last_upload'] = time.ctime(self.last_upload) if self.last_upload else self.last_upload
             return 0, json.dumps(r, indent=4), ''
         elif command['prefix'] == 'telemetry on':
             if command.get('license') != LICENSE: