Skip to content

rgw: followup for 'user rename'#29540

Merged
cbodley merged 7 commits intoceph:masterfrom
cbodley:wip-rgw-user-rename
Aug 9, 2019
Merged

rgw: followup for 'user rename'#29540
cbodley merged 7 commits intoceph:masterfrom
cbodley:wip-rgw-user-rename

Conversation

@cbodley
Copy link
Contributor

@cbodley cbodley commented Aug 7, 2019

some cleanup and refactoring to make it closer to the new user interfaces in #29118. allows overwriting the --new-uid user when --yes-i-really-mean-it is given

cbodley added 7 commits August 7, 2019 16:25
removes unused 'attrs' argument, and takes uid + display name instead
of RGWUserInfo

Signed-off-by: Casey Bodley <cbodley@redhat.com>
helper function to remove the user:buckets object.
rgw_remove_uid_index() now omits the object version tracker argument to
avoid reading the user info

Signed-off-by: Casey Bodley <cbodley@redhat.com>
user rename creates a 'stub' user and links all buckets to that before
modifying the existing user. once everything succeeds, the stub user is
updated to match the existing user and all index objects are updated to
point at it

Signed-off-by: Casey Bodley <cbodley@redhat.com>
if a previous rename attempt fails to complete, it can be restarted with
--yes-i-really-mean-it to overwrite the 'stub' user created previously

Signed-off-by: Casey Bodley <cbodley@redhat.com>
this calls remove_old_indexes() to clean up the uid and buckets index
objects, and also sets 'old_info = user_info' so that radosgw-admin
dumps the json output of the renamed user instead of the old user

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley cbodley added the rgw label Aug 7, 2019
@cbodley cbodley requested a review from smanjara August 7, 2019 20:28
@cbodley
Copy link
Contributor Author

cbodley commented Aug 7, 2019

the rgw suite succeeded in http://pulpito.ceph.com/cbodley-2019-08-06_18:28:01-rgw-wip-rgw-user-rename-distro-basic-smithi before i added the final 'add rename_swift_keys for user rename' commit. a rerun of the rgw:singleton suite with that extra commit is pending in http://pulpito.ceph.com/cbodley-2019-08-07_18:49:03-rgw:singleton-wip-rgw-user-rename-distro-basic-smithi/

Copy link
Contributor

@smanjara smanjara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@cbodley
Copy link
Contributor Author

cbodley commented Aug 9, 2019

i rescheduled that last rgw:singleton run and it passed in http://pulpito.ceph.com/cbodley-2019-08-09_15:08:00-rgw:singleton-wip-rgw-user-rename-distro-basic-smithi/

Copy link
Contributor

@mattbenjamin mattbenjamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I follow and it looks ok

// update the 'stub user' with all of the other fields and rewrite all of the
// associated index objects
RGWUserInfo user_info = old_user_info;
user_info.user_id = stub_user_info.user_id;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

@cbodley cbodley merged commit bc45261 into ceph:master Aug 9, 2019
@cbodley cbodley deleted the wip-rgw-user-rename branch August 9, 2019 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants