Subject: Fix python3 compatibility
 In python3 self.get_fsid() is represented as binary.
 This patch is fixing this.
Author: Michal Arbet <michal.arbet@ultimum.io>
Date: Wed, 06 Feb 2019 17:09:10 +0100
Change-Id: Icbb0b341be19f87bd23064a2b4f98e68bf492a25
Forwarded: https://review.openstack.org/#/c/635220/
Last-Update: 2019-02-06

diff --git a/nova/virt/libvirt/storage/rbd_utils.py b/nova/virt/libvirt/storage/rbd_utils.py
index d51d8e5..b0dddc9 100644
--- a/nova/virt/libvirt/storage/rbd_utils.py
+++ b/nova/virt/libvirt/storage/rbd_utils.py
@@ -28,6 +28,7 @@
 from oslo_log import log as logging
 from oslo_serialization import jsonutils
 from oslo_service import loopingcall
+from oslo_utils import encodeutils
 from oslo_utils import excutils
 from oslo_utils import units
 
@@ -204,7 +205,7 @@
             LOG.debug('not cloneable: %s', e)
             return False
 
-        if self.get_fsid() != fsid:
+        if encodeutils.safe_decode(self.get_fsid()) != fsid:
             reason = '%s is in a different ceph cluster' % url
             LOG.debug(reason)
             return False
