From 1d61bfb3af4a239d74628a3d40a506508a30c0e4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 31 Oct 2019 13:06:35 -0500 Subject: [PATCH] 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 --- src/ceph-daemon | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/ceph-daemon b/src/ceph-daemon index 742c64d700d..a13bfd83b2d 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, -- 2.39.5