Scaling down multi-site to single-site

Scaling down a RADOS Gateway multi-site replication back to single site is performed by removing the multi-site relation. Post scale-down, both sites (primary and secondary) split identically with their local zones configured as the master zones. Further, subsequent writes will not be synchronised across sites after scale-down.

To remove the multi-site relation:

juju remove-relation ceph-radosgw:primary secondary-ceph-radosgw:secondary

Post scale-down, sync status (Realm and Zonegroup configs are preserved but local zone is promoted to master zone):

The command to query sync status is as follows:

sudo radosgw-admin --id=rgw.$(hostname -s) sync status

Sample output looks like:

[Primary Site]
          realm 3a7acb0c-c7a3-4b74-8d52-43a330c7a9f0 (replicated)
      zonegroup 170a884a-6610-40f8-aec8-24117aa7f088 (us)
           zone 77218517-8bf7-4c29-af0e-bb5312861cf8 (us-east)
  metadata sync no sync (zone is master)

And

[Secondary Site]
          realm 3a7acb0c-c7a3-4b74-8d52-43a330c7a9f0 (replicated)
      zonegroup 170a884a-6610-40f8-aec8-24117aa7f088 (us)
           zone aac90d5a-f4ac-4dd7-acbe-61879b7ea4b8 (us-west)
  metadata sync no sync (zone is master)