Repository navigation
rgw: followup for 'user rename' - #29540
Conversation
removes unused 'attrs' argument, and takes uid + display name instead of RGWUserInfo Signed-off-by: Casey Bodley <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Signed-off-by: Casey Bodley <[email protected]>
Signed-off-by: Casey Bodley <[email protected]>
|
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/ |
|
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/ |
mattbenjamin
left a comment
There was a problem hiding this comment.
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; |
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