#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=[
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