We're not using `ceph-volume simple activate` anymore, so need to
add `chown ceph:ceph` for each of block, block.db and block.wal
to ensure old-style simple OSDs are able to start.
Fixes: https://tracker.ceph.com/issues/45129
Signed-off-by: Tim Serong <tserong@suse.com>
if daemon_type == 'osd':
# osds have a pre-start step
assert osd_fsid
+ f.write('# Simple OSDs need chown on startup:\n')
+ for n in ['block', 'block.db', 'block.wal']:
+ p = os.path.join(data_dir, n)
+ f.write('[ ! -L {p} ] || chown {uid}:{gid} {p}\n'.format(p=p, uid=uid, gid=gid))
+ f.write('# LVM OSDs use ceph-volume lvm activate:\n')
prestart = CephContainer(
image=args.image,
entrypoint='/usr/sbin/ceph-volume',