OpenStack Object Storage API v1 defines two ways for the client to tell which response format it understands.
Until now RGW looked at query variable 'format' only. This commit implements the second way of setting the format by
providing 'Accept' HTTP-header with the desirable response mime-type.
Backport: hammer
Fixes: #10746
Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Dmytro Iurchenko <diurchenko@mirantis.com>
Fixes#10719
Since we now let the gc clean the aborter multipart uploads, we need to
clear the multipart entries from the bucket index when cleaning up the
meta object.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
We weren't encoding orig_obj, however, it's now needed so that we can
call get_index_key() on decoded objects. Only encode/decode it if ns or
instance are not empty.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
diagnostic push|pop are not present before 4.6, so each use gives a
warning. Temporarily ignore these by disabling/reenabling -Wpragmas.
Note that this means the other disabled warnings are not scoped on
old gcc. I don't think this is worth fixing, since newer gcc will
respect the scope and show us the warnings outside of it.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
librbd has three different methods for flushing asynchronous
operations. These have all been consolidated down to a single,
shared method to fix an existing issue and simplify maintenance
going forward.
Fixes: #10783
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
The xlist header references NULL without including
the header which defines it.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
For not a monitor leader, if a received command is not supported
locally, but is supported by the leader, it is forwarded to the
leader.
For some commands that may have undesirable behaviour. E.g. for the
recently added "ceph tell mon.x version", if the mon.x is not a leader
and does not support "version" command yet, but the leader does, the
user will receive the version of the leader, and can't be actually
sure about a non leader version.
Fix this by adding noforward flag to commands that are not supposed to
be forwarded. Set the flag for "version" command. Although there are
other non-forwardable commands (like injectargs) it is not necessary
to add the flag to them, as the commands are too old to suffer from
the describe problem.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
This was kind of easy to miss, and if users
just paste in the command as given then their
first few OSDs will work, and from their
4th OSD onwards things will get weird.
Signed-off-by: John Spray <john.spray@redhat.com>
Originally we use "in_seq==0" to judge whether need to exchange in_seq,
it's wrong when peer side already receive message and need to reply new
in_seq to this side.
Now use "is_reset_from_peer" to indicate whether not need to exchange
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Fixes: #10758
write_full was returning ENOENT when the file did not exists, while it should just have created it without complaining.
Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
The remove_objs param is needed to atomically remove multiple entries
from the bucket index, e.g., when cancelling a multipart upload.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>