All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abhishek Lekshmanan <abhishek@suse.com>
To: ceph-devel@vger.kernel.org
Subject: Moving RGW buckets under tenant namespaces
Date: Tue, 30 Jan 2018 17:27:39 +0100	[thread overview]
Message-ID: <87po5rl3b8.fsf@suse.com> (raw)


I was looking into moving buckets owned by a user under a tenant
namespace; (a common usecase is in openstack installations where tenant
namespaces are preferred with openstack keystone for eg.). Doing this
manually with rados and radosgw-admin cli would involve something in the
lines of:

1. Copying the user and user.buckets object under the users.uid pool with
  the tenant$user name with rados cp which seems to preserve omaps

2 radosgw-admin metadata get user:<uid> > uid.json # change uid to
  reflect the tenant field

3 radosgw-admin metadata get bucket:<bucket-name> modifying the empty
  tenant field with the tenant info; and owner to the tenant$user format
  and finally metadata put bucket:tenant/<bucket-name>

4 repeating the same metadata get/put for
  bucket.instance 

5 metadata rm user:<old-username> bucket:<old-bucket-name>
  bucket.instance:<old-instance>

6 radosgw-admin metadata put < modified-uid.json

I'm not sure whether this covers all the bases or any other metadata is
left behind? 

Current RGW Bucket link/unlink does steps 2,3 and getting
the ACLs right and correctly adding and removing the omap entries in the
user.bucket object, though in the current form it would fail as
version checks for a non existent object would fail. 

Given these complexities would it also make sense supporting this in
radosgw-admin? (with the caveat that we want no buckets or user
metadata of the concerned user also modified during this time frame)

--
Abhishek Lekshmanan
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
HRB 21284 (AG Nürnberg)

                 reply	other threads:[~2018-01-30 16:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87po5rl3b8.fsf@suse.com \
    --to=abhishek@suse.com \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.