rgw: can set temp url key on user

Either through new through new rest api call, or via
radosgw-admin

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: add optional tenant name for swift urls

In order to maintain compatibility with swift clients that expect the
url to also contain a reference to the tenant name, add an optional
param (empty by default) that would add it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: handle temp url key authorization

Fixes: #3454
Implement auth handling code that checks temp url signature and
expiration. The key that is used for the signature is the bucket owner's
temp url key.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: support multiple temp url keys

Apparently the swift api defines two temp url keys. Add internal support
for multiple keys, radosgw-admin can config two keys.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix temp url restful apis and support multiple keys

the set temp url api didn't do anything, fix that. Also add support for
multiple temp url keys.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
doc: Updated paths for OSDs using the OS disk.

fixes: #6682

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
Merge pull request #963 from dachary/wip-erasure-code-api

erasure code interface helpers

Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge pull request #1089 from dachary/wip-mailmap

mailmap: add athanatos <sam.just@inktank.com>

Reviewed-by: Samuel Just <sam.just@inktank.com>
radosgw-admin: add temp url params to usage

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Merge pull request #978 from ceph/wip-3454

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
PG: do not use role == 0 as a determinant of primacy

We already have an is_primary() function to use instead.

Signed-off-by: Greg Farnum <greg@inktank.com>
osd: do not misuse calc_pg_role

We've been using the role returned from this to determine if we're
the primary or not. Don't.
This is mostly about removing a few asserts; while in there I also
redirected some calls to use static dereference instead of going through
the osdmap lookup path.

Signed-off-by: Greg Farnum <greg@inktank.com>
OSDMap: doc the different pg->OSD mapping functions

Some of these look like what you should use for mapping and they absolutely
are not suitable for that. Make it clearer.

Signed-off-by: Greg Farnum <greg@inktank.com>
OSDMap: remove get_pg_primary() function

This was used only by SyntheticClient, and that wants get_pg_acting_primary()
anyway. Delete the easily-misused get_pg_primary() and switch.

Signed-off-by: Greg Farnum <greg@inktank.com>
OSDMap: unify the pg_to_acting_osds and pg_to_up_acting_osds implementations

These were the same except for a call to _raw_to_up_osds(). Move the
existing pg_to_up_acting_osds into a private function taking a pointer,
only fill in the up vector if it's a non-NULL pointer, and call it via
the obvious header implementations.

Signed-off-by: Greg Farnum <greg@inktank.com>
OSDMap: rename _raw_to_temp_osds() -> _get_temp_osds()

This function does not (and never has!) used the raw vector, so remove it
and don't use a name which implies it is doing any sort of conversion.

Signed-off-by: Greg Farnum <greg@inktank.com>
OSDMap: switch pg_to_osds to have an explicit primary param

Use pointers instead of references for the out params, too!

Signed-off-by: Greg Farnum <greg@inktank.com>
OSDMap: implement pg_to_up_acting_osds with primary interface

Use our pointer calling conventions instead of a reference for the
new version of the function.

Right now we're just setting the primaries equal to the first member
of up and acting (or -1 if none), but very shortly we'll modify our
private OSDMap functions to export them based on the contents of temp_primary.
While in general anybody querying for the mapping information will
need to pay attention to whom the primary is as well, we have lots
of callers who will need real code changes to do so. To serve them,
we keep a version that does not export the primary, but asserts
that the primary matches the first entry in its list.

Signed-off-by: Greg Farnum <greg@inktank.com>
mon, osdmaptool: switch to primary-specifying pg_to_up_acting_osds

Signed-off-by: Greg Farnum <greg@inktank.com>
OSDMap: add primary-specifying pg_to_acting_osds

This works the same as pg_to_up_acting_osds

Signed-off-by: Greg Farnum <greg@inktank.com>