]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: adopt: chown data content
authorSage Weil <sage@redhat.com>
Thu, 30 Jan 2020 19:06:12 +0000 (13:06 -0600)
committerSage Weil <sage@redhat.com>
Fri, 31 Jan 2020 19:56:36 +0000 (13:56 -0600)
The ceph uid/gid vary between distros.  Chown everything to match the
target distro.

Signed-off-by: Sage Weil <sage@redhat.com>
src/cephadm/cephadm

index f2a6c9884fcfe970e767291dd332401376fb0a50..3fffbe8e21401ce0b46e5ebf2d54e6c0b21b3531 100755 (executable)
@@ -2292,6 +2292,8 @@ def command_adopt():
         move_files(glob(os.path.join(data_dir_src, '*')),
                    data_dir_dst,
                    uid=uid, gid=gid)
+        logger.info('Chowning content...')
+        call_throws(['chown', '-c', '-R', '%d.%d' % (uid, gid), data_dir_dst])
         logger.debug('Remove dir \'%s\'' % (data_dir_src))
         if os.path.ismount(data_dir_src):
             call_throws(['umount', data_dir_src])