]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes: return string type to ceph-manager 30451/head
authorVenky Shankar <vshankar@redhat.com>
Tue, 17 Sep 2019 19:01:59 +0000 (15:01 -0400)
committerRamana Raja <rraja@redhat.com>
Thu, 19 Sep 2019 09:26:26 +0000 (14:56 +0530)
The 'volumes' ceph-mgr module returns a byte type instead of a string
type as the stdout result of commands, `fs subvolume getpath` and
`fs subvolumegroup getpath` to the ceph-mgr. This causes the commands
to hang and the ceph-mgr to utilize 100% CPU. Fix the 'volumes'
ceph-mgr module to return string type to ceph-mgr as the stdout
result of the commands.

Introduced-by: 3d63cd947f55a8508f972ee249ea6a04836429ae
Fixes: https://tracker.ceph.com/issues/41903
Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/pybind/mgr/volumes/fs/volume.py

index ad189c1dc0a34a44ac82de585207ffe97c257d76..791eab5f33236f7defcd131c16f7120ca89ff0d5 100644 (file)
@@ -419,7 +419,7 @@ class VolumeClient(object):
                 if not path:
                     raise VolumeException(
                         -errno.ENOENT, "Subvolume '{0}' not found".format(subvolname))
-                ret = 0, path, ""
+                ret = 0, path.decode("utf-8"), ""
         except VolumeException as ve:
             ret = self.volume_exception_to_retval(ve)
         return ret
@@ -520,7 +520,7 @@ class VolumeClient(object):
                 if path is None:
                     raise VolumeException(
                         -errno.ENOENT, "Subvolume group '{0}' not found".format(groupname))
-                return 0, path, ""
+                return 0, path.decode("utf-8"), ""
         except VolumeException as ve:
             return self.volume_exception_to_retval(ve)