]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: chown block symlink targets
authorSage Weil <sage@redhat.com>
Fri, 31 Jan 2020 14:52:25 +0000 (08:52 -0600)
committerSage Weil <sage@redhat.com>
Fri, 31 Jan 2020 19:56:36 +0000 (13:56 -0600)
Again, these need to match the container's uid/gid, not the host's.

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

index c91c0ebbff8049626f9331beca6e8760ef3c8057..90f2cc5b27462962556bb9914e6cf7e310dc37d6 100755 (executable)
@@ -2319,6 +2319,12 @@ def command_adopt():
             if num_renamed:
                 logger.info('Renamed %d leveldb *.ldb files to *.sst',
                             num_renamed)
+        if daemon_type == 'osd':
+            for n in ['block', 'block.db', 'block.wal']:
+                p = os.path.join(data_dir_dst, n)
+                if os.path.exists(p):
+                    logger.info('Chowning %s...' % p)
+                    os.chown(p, uid, gid)
 
         # config
         config_src = '/etc/ceph/%s.conf' % (args.cluster)