From: Sage Weil Date: Thu, 31 Oct 2019 18:06:35 +0000 (-0500) Subject: ceph-daemon: handle 'rgw' type daemons X-Git-Tag: v15.1.0~1031^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1d61bfb3af4a239d74628a3d40a506508a30c0e4;p=ceph.git ceph-daemon: handle 'rgw' type daemons - weird data dir: /var/lib/ceph/radosgw/ceph-rgw.$id (not /var/lib/ceph/rgw/ceph-$id) - weird auth name: client.rgw.$id (not rgw.$id) - weird entrypoint: /usr/bin/radosgw (not /usr/bin/ceph-rgw) Signed-off-by: Sage Weil --- diff --git a/src/ceph-daemon b/src/ceph-daemon index 742c64d700da..a13bfd83b2da 100755 --- a/src/ceph-daemon +++ b/src/ceph-daemon @@ -379,7 +379,10 @@ def get_container_mounts(fsid, daemon_type, daemon_id): if daemon_id: data_dir = get_data_dir(fsid, daemon_type, daemon_id) - cdata_dir = '/var/lib/ceph/%s/ceph-%s' % (daemon_type, daemon_id) + if daemon_type == 'rgw': + cdata_dir = '/var/lib/ceph/radosgw/ceph-rgw.%s' % (daemon_id) + else: + cdata_dir = '/var/lib/ceph/%s/ceph-%s' % (daemon_type, daemon_id) mounts[data_dir] = cdata_dir + ':z' mounts[data_dir + '/config'] = '/etc/ceph/ceph.conf:z' @@ -399,11 +402,17 @@ def get_container(fsid, daemon_type, daemon_id, privileged=False, podman_args = [] if daemon_type == 'osd' or privileged: podman_args += ['--privileged'] + if daemon_type == 'rgw': + entrypoint = '/usr/bin/radosgw' + name = 'client.rgw.%s' % daemon_id + else: + entrypoint = '/usr/bin/ceph-' + daemon_type + name = '%s.%s' % (daemon_type, daemon_id) return CephContainer( image=args.image, - entrypoint='/usr/bin/ceph-' + daemon_type, + entrypoint=entrypoint, args=[ - '-n', '%s.%s' % (daemon_type, daemon_id), + '-n', name, '-f', # foreground ] + get_daemon_args(fsid, daemon_type, daemon_id), podman_args=podman_args,