]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephadm: Add RGW
authorSebastian Wagner <sebastian.wagner@suse.com>
Thu, 14 May 2020 14:19:45 +0000 (16:19 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Mon, 8 Jun 2020 11:52:24 +0000 (13:52 +0200)
Fixes: https://tracker.ceph.com/issues/43911
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit ffef64d046cb175732b4b97f898dabac5d83df10)

qa/suites/rados/cephadm/smoke/fixed-2.yaml
qa/tasks/cephadm.py

index 387053022aef33f70fd89cea6569a84fcd7734ec..8a3ad9f58c3b445d6c4d75c3129e6d6eddefc7f3 100644 (file)
@@ -7,6 +7,7 @@ roles:
   - osd.2
   - osd.3
   - client.0
+  - ceph.rgw.realm.zone.a
   - node-exporter.a
   - alertmanager.a
 - - mon.b
index b8990ef085e08f7dc336b11f31bc28690f72b5bd..09f57b1521fff7b96f19ad7d0ff926742a1e0c0d 100644 (file)
@@ -456,9 +456,13 @@ def ceph_bootstrap(ctx, config):
         #ctx.cluster.run(args=['sudo', 'systemctl', 'stop', 'ceph.target'])
 
         # so, stop them individually
-        for role in ctx.daemons.resolve_role_list(None, CEPH_ROLE_TYPES):
+        for role in ctx.daemons.resolve_role_list(None, CEPH_ROLE_TYPES, True):
             cluster, type_, id_ = teuthology.split_role(role)
-            ctx.daemons.get_daemon(type_, id_, cluster).stop()
+            try:
+                ctx.daemons.get_daemon(type_, id_, cluster).stop()
+            except Exception:
+                log.exception(f'Failed to stop "{role}"')
+                raise 
 
         # clean up /etc/ceph
         ctx.cluster.run(args=[
@@ -719,12 +723,27 @@ def ceph_rgw(ctx, config):
                 nodes[realmzone] = []
             nodes[realmzone].append(remote.shortname + '=' + id_)
             daemons[role] = (remote, id_)
+
+    for realmzone in nodes.keys():
+        (realm, zone) = realmzone.split('.', 1)
+
+        # TODO: those should be moved to mgr/cephadm
+        _shell(ctx, cluster_name, remote,
+               ['radosgw-admin', 'realm', 'create', '--rgw-realm', realm, '--default']
+        )
+        _shell(ctx, cluster_name, remote,
+               ['radosgw-admin', 'zonegroup', 'create', '--rgw-zonegroup=default', '--master', '--default']
+        )
+        _shell(ctx, cluster_name, remote,
+               ['radosgw-admin', 'zone', 'create', '--rgw-zonegroup=default', '--rgw-zone', zone,  '--master', '--default']
+        )
+
     for realmzone, nodes in nodes.items():
         (realm, zone) = realmzone.split('.', 1)
         _shell(ctx, cluster_name, remote, [
-            'ceph', 'orch', 'apply', 'rgw',
-            realm, zone,
-            str(len(nodes)) + ';' + ';'.join(nodes)]
+            'ceph', 'orch', 'apply', 'rgw', realm, zone,
+             '--placement',
+             str(len(nodes)) + ';' + ';'.join(nodes)]
         )
     for role, i in daemons.items():
         remote, id_ = i