]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
nautilus: mgr/telemetry: fix UUID and STR concat 33666/head
authorYaarit Hatuka <yaarit@redhat.com>
Mon, 2 Mar 2020 14:36:10 +0000 (09:36 -0500)
committerYaarit Hatuka <yaarit@redhat.com>
Mon, 2 Mar 2020 14:36:10 +0000 (09:36 -0500)
Cast UUID object to string when anonymizing device's serial, otherwise
Python2 throws a TypeError.

Fixes: https://tracker.ceph.com/issues/44376
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
src/pybind/mgr/telemetry/module.py

index c2f9657e686e5482bdae74e6697344d10610005f..ef89e350702218986b9d6738496e6db8c40de463 100644 (file)
@@ -402,7 +402,7 @@ class Module(MgrModule):
             # anonymize device id
             anon_devid = self.get_store('devid-id/%s' % devid)
             if not anon_devid:
-                anon_devid = devid[:devid.rfind('_')] + '_' + uuid.uuid1()
+                anon_devid = devid[:devid.rfind('_')] + '_' + str(uuid.uuid1())
                 self.set_store('devid-id/%s' % devid, anon_devid)
             self.log.info('devid %s / %s, host %s / %s' % (devid, anon_devid,
                                                            host, anon_host))