From 96bcad5e4183d9206013e20ced7692056bc2ef5b Mon Sep 17 00:00:00 2001 From: Ramana Raja Date: Mon, 10 Feb 2020 12:05:59 -0500 Subject: [PATCH] mgr/volumes: type convert uid and gid to int This fix is only needed in nautilus, and the issue was observed during upstream teuthology testing. File "/usr/share/ceph/mgr/volumes/fs/async_cloner.py", line 114, in cptree copy_file(fs_handle, d_full_src, d_full_dst, mo, st.st_uid, st.st_gid) File "/usr/share/ceph/mgr/volumes/fs/fs_util.py", line 97, in copy_file fs.chown(dst, uid, gid) File "cephfs.pyx", line 855, in cephfs.LibCephFS.chown TypeError: uid must be an int The issue wasn't observed in master/octopus teuthology testing. Signed-off-by: Ramana Raja --- src/pybind/mgr/volumes/fs/async_cloner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/volumes/fs/async_cloner.py b/src/pybind/mgr/volumes/fs/async_cloner.py index c67dbde1abef3..6554a1c34ca81 100644 --- a/src/pybind/mgr/volumes/fs/async_cloner.py +++ b/src/pybind/mgr/volumes/fs/async_cloner.py @@ -96,7 +96,7 @@ def bulk_copy(fs_handle, source_path, dst_path, should_cancel): log.debug("cptree: (DIR) {0}".format(d_full_src)) try: fs_handle.mkdir(d_full_dst, mo) - fs_handle.chown(d_full_dst, st.st_uid, st.st_gid) + fs_handle.chown(d_full_dst, int(st.st_uid), int(st.st_gid)) except cephfs.Error as e: if not e.args[0] == errno.EEXIST: raise @@ -111,7 +111,7 @@ def bulk_copy(fs_handle, source_path, dst_path, should_cancel): raise elif stat.S_ISREG(st.st_mode): log.debug("cptree: (REG) {0}".format(d_full_src)) - copy_file(fs_handle, d_full_src, d_full_dst, mo, st.st_uid, st.st_gid) + copy_file(fs_handle, d_full_src, d_full_dst, mo, int(st.st_uid), int(st.st_gid)) else: log.warn("cptree: (IGNORE) {0}".format(d_full_src)) d = fs_handle.readdir(dir_handle) -- 2.39.5