]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-daemon: handle 'rgw' type daemons
authorSage Weil <sage@redhat.com>
Thu, 31 Oct 2019 18:06:35 +0000 (13:06 -0500)
committerSage Weil <sage@redhat.com>
Tue, 5 Nov 2019 14:46:00 +0000 (08:46 -0600)
- 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 <sage@redhat.com>
src/ceph-daemon

index 742c64d700daadc8729680cdf6fd464e1feff251..a13bfd83b2dab8d8415488016c86816605327b82 100755 (executable)
@@ -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,