From 4b26a704c527cfa26f35781c9e259753449f0f3e Mon Sep 17 00:00:00 2001 From: Ramana Raja Date: Fri, 13 Mar 2020 19:30:05 +0530 Subject: [PATCH] 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 --- src/pybind/mgr/volumes/fs/async_cloner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/volumes/fs/async_cloner.py b/src/pybind/mgr/volumes/fs/async_cloner.py index 6d25ebae53001..b5545c91091f6 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: -- 2.39.5