rgw: add compatibility for MultipartUpload

Fixes: #6677
It seems that there's some external library that uses MultipartUpload
instead of CompleteMultipartUpload, even though it's not part of the
documented api. Support it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
monc: let users specify a callback when they reopen their monitor session

Then the callback is triggered when a new session is established, and the
daemon can do whatever it likes. There are no guarantees about how long it
might take to trigger, though. In particular we call the provided callback
while not holding our own lock in order to avoid deadlock. This could lead
to some funny ordering from the user's perspective if they call
reopen_session() again before getting the callback, but there's no way around
that, so they just have to use it appropriately.

Signed-off-by: Greg Farnum <greg@inktank.com>
monc: set "hunting" to true when we reopen the mon session

If we don't have a connecton to a monitor, we want to retry to another
monitor regardless of whether it's the first time or not.

Signed-off-by: Greg Farnum <greg@inktank.com>
monc: backoff the timeout period when reconnecting

If the monitors are systematically slowing down, we don't want to spam
them with reconnect attempts every three seconds. Instead, every time
we issue a reconnect, multiply our timeout period by a configurable; when
we complete the connection, reduce that multipler by 50%. This should let
us respond to monitor load.
Of course, we don't want to do that for initial startup in the case of a
couple down monitors, so don't apply the backoff until we've successfully
connected to a monitor at least once.

Signed-off-by: Greg Farnum <greg@inktank.com>
OSD: disable the PGStatsAck timeout when we are reconnecting to a monitor

Previously, the timeout counter started as soon as we issued the reopen,
but if the reconnect process itself took a while, we might time out and
issue another reopen just as we get to the point where it's possible to
get work done. Since the mon client has its own reconnect timeouts (that is,
the OSD doesn't need to trigger those), we instead disable our timeouts
while the reconnect is happening, and then turn them back on again starting
from when we get the reconnect callback.

Signed-off-by: Greg Farnum <greg@inktank.com>
SimpleMessenger: init_local_connection whenever my_inst changes

This is necessary to correctly handle messages to self.

Signed-off-by: Samuel Just <sam.just@inktank.com>
librados: add calls to expose required write alignment

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: reject unaligned writes on ec pools

Signed-off-by: Samuel Just <sam.just@inktank.com>
TestRados: send aligned appends on erasure pools

Signed-off-by: Samuel Just <sam.just@inktank.com>
ObjectStore: fix OP_COLL_ADD dump output

Signed-off-by: Samuel Just <sam.just@inktank.com>
ErasureCodeJerasure: fix alignement issues in encode/decode

Signed-off-by: Samuel Just <sam.just@inktank.com>
ErasureCodeJerasure: fill in decoded if all shards are included

This causes it to match minimum_to_decode.

Signed-off-by: Samuel Just <sam.just@inktank.com>
FileStore: permit NULL onreadable callback

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: release_op_ctx_locks in all-applied, not all-committed

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: handle xattr cache on rollback and delete_head

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: find_object_context debugging: output oi

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG:: remove_snap_mapped_object already removes the object

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG,osd_types: seperate require_rollback from ec_pool

It's handy to allow a pool to answer false to ec_pool() and
true to require_rollback() in order to allow a replicated
pool to test the rollback mechanisms without allowing
non-NO_SHARD shards.

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: take clone write lock as well in make_writeable

Otherwise, we might start backfilling the clone before the op is
complete.

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: release backfill state on_global_recover not peer recover

There may now be multiple backfill peers.

Signed-off-by: Samuel Just <sam.just@inktank.com>