rgw: abstract RGWProcess

RGWProcess is a generic request handler that sends request to the
workqueue for processing.
Add RGWFCGXProcess specialization. Later we'll add a new frontend that
will leverage that.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: add some debug output

Dump request environment when starting processing request. We used to do
it before, but it was recently dropped as part of a cleanup.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
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>
erasure-code: add chunk size calculation helpers

With the current erasure code interface, figuring out the size of a
chunk and the number of chunks for a given object can only be achieved
by calling the encode() method on an actual buffer.

The get_chunk_count, get_data_chunk_count and get_chunk_size helpers are
added and documented.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: refactor the example to use chunk size helpers

The get_chunk_size and get_chunk_count methods are implemented using the
code found in the encode() method. The encode method is modified to use
the chunk size helpers.

The unit tests are modified to use the helpers.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: jerasure implementation of chunk size helpers

The encode methode uses the get_chunk_size method which is a translation
of the code it previously used for the same purpose. The chunk_count and
chunk_data_count methods return k+m and k respectively. But that will
no longer be the case after local parity is implemented.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: erasure code decode interface helper

The decode_concat method is implemented, documented and tested. It is a
convenience method to concatenate chunks into a single bufferlist.

Signed-off-by: Loic Dachary <loic@dachary.org>
mon: debug propagate_snaps_to_tiers

Signed-off-by: Sage Weil <sage@inktank.com>
osd: fix propagation of removed snaps to other tiers

When we update removed_snaps we do not update snap_seq.  Drop this broken
optimization.

Signed-off-by: Sage Weil <sage@inktank.com>
osd/OSDMonitor: fix 'osd tier add ...' pool mangling

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1072 from ceph/wip-tier-snap

Reviewed-by: Greg Farnum <greg@inktank.com>
erasure-code: use uintptr_t instead of long long

Checking the pointer alignment using a cast to long long raises a
warning when --Wpointer-to-int-cast is given.

Signed-off-by: Loic Dachary <loic@dachary.org>
v0.75
buffer: do not append trailing newline when appending empty istream

If we call

 bl.append(some_istream);

do not include a \n if the istream is empty (which is apparently is not
the same thing as eof).  This was causing 'ceph pg getmap' to include a
trailing newline.

Probably we don't want this newline at all!  But all callers need to be
fixed for that change.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph-dencoder: include offset in 'stray data' error message

Signed-off-by: Sage Weil <sage@inktank.com>
mon/PGMap: make decode version match encode version

These should have been bumped way back in 091809b8.

Signed-off-by: Sage Weil <sage@inktank.com>