rgw: fix etag in multipart complete

Fixes: #6830
The etag member variable was not set correctly.

Reported-by: Benjamin Gilbert <bgilbert@backtick.net>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix swift range response

Fixes: #7099
Backport: dumpling
The range response header was broken in swift.

Reported-by: Julien Calvet <julien.calvet@neurea.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Merge pull request #1256 from ceph/wip-librados-ops-and-rvals

librados c api for object operations and a few bug fixes

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
osd/,mon/: add (up|acting)_primary to pg_stat_t

We use pg_stat_t information to determine pg create targeting.

Fixes: #7481
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
doc/release-notes: v0.67.7

Signed-off-by: Sage Weil <sage@inktank.com>
doc/release-notes: v0.77

Also pending notes for v0.78

Signed-off-by: Sage Weil <sage@inktank.com>
OSDMap::_apply_primary_affinity: skip CRUSH_ITEM_NONE in non-default check

Fixes: #7482
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
ReplicatedPG: fix stat uses to use the correct shard

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::fill_in_copy_get, use getattr_maybe_cache

Also, add user_only flag to getattr_maybe_cache and cleanup
the other user.

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: ensure that ec appends are aligned

When not writing out the last chunk, _write_copy_chunk
will trim the chunk to a stripe boundary for ec pools
and adjust cursor.data_offset to compensate.

Signed-off-by: Samuel Just <sam.just@inktank.com>
ECBackend: handle short reads

async reads may have a length past the end of the object.

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: assert no omap for ec pool in _write_copy_chunk and skip

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: fix scrub feature check

acting[0] isn't necessarily the primary.  Start at
0 and explicitely skip the primary.

Signed-off-by: Samuel Just <sam.just@inktank.com>
RadosModel: copyfrom should result in a dirty object

Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge branch 'next'

Conflicts:
	src/test/admin_socket.cc

Signed-off-by: Ken Dreyer <ken.dreyer@inktank.com>
mds: Add encode/decode/dump for use with dencoder

This is for the MDSTable subclasses: AnchorServer,
SnapServer, InoTable.  AnchorServer was partially there
but didn't work in practice dumped objects because of
the version prefix on the object.

This adds a skip argument to ceph-dencoder for getting
past fixed size prefixes.  The encode_server_state method
is also made const to avoid the need for const_casting (and
because it really is const)

Signed-off-by: John Spray <john.spray@inktank.com>
Fix generate keystone token from credentials

Request to v2.0/tokens must be a POST request and the request
should specify JSON in the content-type header and fix request
body JSON generation to have the right JSON format.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Mouad Benchchaoui <m.benchchaoui@x-ion.de>
mds: Remove some unused #defines

Signed-off-by: John Spray <john.spray@inktank.com>
mds/CDir: Remove a few lines of cruft

Signed-off-by: John Spray <john.spray@inktank.com>
mds: Don't create the /.ceph directory

This was entirely unused.  On existing filesystems
it will live on, on new ones it will never be created.

Signed-off-by: John Spray <john.spray@inktank.com>