From: Ramana Raja Date: Mon, 10 Feb 2020 17:05:59 +0000 (-0500) Subject: mgr/volumes: type convert uid and gid to int X-Git-Tag: v14.2.8~49^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=96bcad5e4183d9206013e20ced7692056bc2ef5b;p=ceph.git 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 --- diff --git a/src/pybind/mgr/volumes/fs/async_cloner.py b/src/pybind/mgr/volumes/fs/async_cloner.py index c67dbde1abe..6554a1c34ca 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)