From: Ramana Raja Date: Mon, 3 Jun 2019 09:46:18 +0000 (+0530) Subject: mgr/volumes: fix subvolume creation with quota X-Git-Tag: v15.1.0~2567^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F28384%2Fhead;p=ceph.git mgr/volumes: fix subvolume creation with quota A quota is set on a subvolume by setting a quota virtual xattr on a fs subdirectory. The value of the quota xattr should be a bytes object. The quota value wasn't correctly converted to a bytes object. Fix this. Fixes: http://tracker.ceph.com/issues/40152 Signed-off-by: Ramana Raja --- diff --git a/src/pybind/mgr/volumes/fs/subvolume.py b/src/pybind/mgr/volumes/fs/subvolume.py index 40327e5c5a54..b1ec7b3f8500 100644 --- a/src/pybind/mgr/volumes/fs/subvolume.py +++ b/src/pybind/mgr/volumes/fs/subvolume.py @@ -159,7 +159,7 @@ class SubvolumeClient(object): self._mkdir_p(path, mode) if size is not None: - self.fs.setxattr(path, 'ceph.quota.max_bytes', size.encode('utf-8'), 0) + self.fs.setxattr(path, 'ceph.quota.max_bytes', str(size).encode('utf-8'), 0) # enforce security isolation, use separate namespace for this subvolume if namespace_isolated: