]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: Fix subuser harder with tenants 7618/head
authorPete Zaitcev <zaitcev@kotori.zaitcev.us>
Fri, 12 Feb 2016 01:01:06 +0000 (18:01 -0700)
committerPete Zaitcev <zaitcev@kotori.zaitcev.us>
Fri, 12 Feb 2016 01:01:06 +0000 (18:01 -0700)
commitf88c8522287b0bb4e8eed627f79646a8f7bcf4b5
treed614d1030cc6a254a81bf3e760ae120f9e39dfaa
parent90d93fe9384c83388bcf01bb678dcbf64b5b56ca
rgw: Fix subuser harder with tenants

We have several ways to set the tenant and user in the operation
state now:

radosgw-admin --uid=user <command>  # default empty tenant
radosgw-admin --tenant=ten --uid=user <command>
radosgw-admin --uid='ten$user' <command>
radosgw-admin --subuser='ten$user:sub' <command>

The previous commit a51fbf2d fixed some of these but broke the others.
The root of the difficulty is that rgw_op.set_subuser() has a magical
side effect of setting rgw_op.user_id, but the code pretends that it's
one of many other setters.

Unfortunately, getting rid of the side effect is not easy here.
It is exactly what we want for historic compatibility, so killing
the magic requires a pile of code elsewhere, or worse, implicit
ordering requirements (invoke set_subuser before set_user or else).

For now we doubled down on the magic. This way at least it is all
in one place and you do not have to flip pages of code to understand
what is going on.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
src/rgw/rgw_user.h