]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes: type convert uid and gid to int 33877/head
authorRamana Raja <rraja@redhat.com>
Fri, 13 Mar 2020 14:00:05 +0000 (19:30 +0530)
committerRamana Raja <rraja@redhat.com>
Mon, 16 Mar 2020 09:48:58 +0000 (15:18 +0530)
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 <rraja@redhat.com>
src/pybind/mgr/volumes/fs/async_cloner.py

index 6d25ebae53001e108aaebc838efb63da4c9e9dff..b5545c91091f6057ef560a0a6c6b3e00816f80b5 100644 (file)
@@ -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: