From: Ramana Raja Date: Fri, 13 Mar 2020 14:00:05 +0000 (+0530) Subject: mgr/volumes: type convert uid and gid to int X-Git-Tag: v14.2.10~199^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F33877%2Fhead;p=ceph.git mgr/volumes: type convert uid and gid to int This fix is only needed in nautilus. The issue was observed during upstream teuthology testing in CentOS 7.5 machines. File "/usr/share/ceph/mgr/volumes/fs/async_cloner.py", line 153, in do_clone bulk_copy(fs_handle, src_path, dst_path, should_cancel) File "/usr/share/ceph/mgr/volumes/fs/async_cloner.py", line 144, in bulk_copy cptree(source_path, dst_path) File "/usr/share/ceph/mgr/volumes/fs/async_cloner.py", line 134, in cptree sync_attrs(fs_handle, d_full_dst, stx) File "/usr/share/ceph/mgr/volumes/fs/async_cloner.py", line 77, in sync_attrs fs_handle.lchown(target_path, source_statx["uid"], source_statx["gid"]) The issue wasn't observed in master/octopus teuthology testing. Signed-off-by: Ramana Raja --- diff --git a/src/pybind/mgr/volumes/fs/async_cloner.py b/src/pybind/mgr/volumes/fs/async_cloner.py index 6d25ebae5300..b5545c91091f 100644 --- a/src/pybind/mgr/volumes/fs/async_cloner.py +++ b/src/pybind/mgr/volumes/fs/async_cloner.py @@ -74,7 +74,7 @@ def handle_clone_pending(volume_client, volname, index, groupname, subvolname, s def sync_attrs(fs_handle, target_path, source_statx): try: - fs_handle.lchown(target_path, source_statx["uid"], source_statx["gid"]) + fs_handle.lchown(target_path, int(source_statx["uid"]), int(source_statx["gid"])) fs_handle.lutimes(target_path, (time.mktime(source_statx["atime"].timetuple()), time.mktime(source_statx["mtime"].timetuple()))) except cephfs.Error as e: