Yehuda Sadeh [Fri, 30 Jan 2015 15:03:30 +0000 (07:03 -0800)]
rgw: fail s3 POST auth if keystone not configured
Fixes: #10698
This fixes issue introduced in 8b3dfc9472022ea45ad24e02e0aa21dfdad798f8,
where if user does not exist, we try keystone authentication. However,
if keystone is not configured we justt fall through without failing.
This would have failed later on due to bucket permissions, unless bucket
had a public write permissions.
Jianpeng Ma [Fri, 30 Jan 2015 03:29:00 +0000 (11:29 +0800)]
osdc: add new filed dontneed in BufferHead.
For read/write op with LIBRADOS_OP_FLAG_FADVISE_DONTNEED,
the hit bh set this as true and later move into the tail of LRU in
order to remove in case in short future no ony access.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Dongmao Zhang [Fri, 30 Jan 2015 03:20:50 +0000 (11:20 +0800)]
Fix ReplicatedPG do_xattr_cmp_u64
1. bufferlist.c_str() will return a string which is longer than its real length.
This could cause an error result from do_xattr_cmp_u64. So use
std::string to receive the xattr
2. s/atoll/strtoull
Sage Weil [Thu, 29 Jan 2015 21:00:15 +0000 (13:00 -0800)]
librados: rename NOREUSE to NOCACHE
As far as I can tell, the posix_fadvise() distinction between WONTNEED and
NOREUSE is subtle: one says I won't access the data, and the other says
I will access it one more time and then not access it. That is, the
distinction is about time. This thread seems to confirm this
interpretation:
https://lkml.org/lkml/2011/6/27/44
Since we are attaching hints to the IO operations themselves, this
distinction doesn't make much sense for us. (Backends should be careful
about which hint they use; or rather, they should use WONTNEED *after*
doing the IO since NOREUSE is presenting a no-op in Linux.)
However, we want to make a totally different distinction:
WONTNEED - nobody will access this -> drop it from the cache
NOCACHE - *i* won't access this again -> don't let me affect your caching
decisions or the working set you're maintaining for other
clients.
The NOCACHE name is made-up and distinct from NOREUSE only so that it is
different from POSIX and doesn't introduce confusion for people familiar
with the POSIX meaning. Perhaps a more accurate name would be IWONTNEED
but that is only one character apart and too error-prone IMO.
Petr Machata [Thu, 29 Jan 2015 17:15:02 +0000 (10:15 -0700)]
support Boost 1.57.0
Sometime after 1.55, boost introduced a forward declaration of
operator<< in optional.hpp. In 1.55 and earlier, when << was used
without the _io having been included, what got dumped was an implicit
bool conversion.
http://tracker.ceph.com/issues/10688 Refs: #10688 Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Sage Weil [Thu, 29 Jan 2015 19:26:23 +0000 (11:26 -0800)]
osd: preserve extra_reqids in PGLog
The log scraping is unfortunately O(n) in the size of the log. We can
also follow objects and then the prior_version pointers, but we don't have
a version->entry index at the moment.
Only index by reqid if reqid_is_index. Always index extra_reqids.
Notably, the PROMOTE op does not return true for reqid_is_indexed, but this
is where the promotion extra_reqids will appear.
Yehuda Sadeh [Wed, 26 Nov 2014 22:11:13 +0000 (14:11 -0800)]
rgw: reuse fcgx connection structure
Fixes: #10194
Reuse the fcgx connection structure. It forces FCGX_Accept_r() freeing
up or reusing the connection if possible. This is needed for certain
fastcgi module (mod-proxy-fcgi) that sets the FCGI_KEEP_CONN, which
prevents the connection from being closed when calling FCGX_Finish_r().
Jason Dillaman [Tue, 27 Jan 2015 11:07:13 +0000 (06:07 -0500)]
librbd: object map updates should use AIO
Update the existing AbstractWrite state machine to handle
updating the object map before and after the object update.
Also convert the resize/trim maintenance operations to use
new state machines which handle the pre-/post-operation
updates to the object map.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Tue, 27 Jan 2015 22:29:03 +0000 (17:29 -0500)]
test: correct two issues with the librados_test_stub
Corrected a problem where the snapshot id was being incorrectly
replaced on history object versions. Also corrected an issue
with handling flushing the AIO worker threads.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Tue, 27 Jan 2015 03:12:24 +0000 (22:12 -0500)]
librbd: refactor existing object map code to its own class
As a preparation for switching all current object map manipulations
within librados callbacks to AIO, the existing object map code
was moved to its own class for future maintainability.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Sun, 25 Jan 2015 18:56:02 +0000 (13:56 -0500)]
cls_rbd: object_map_resize shrink protection
When shrinking an object map, object_map_resize now ensures
that the objects being removed are initialized to default
state to protect against losing track of in-use objects.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Sat, 24 Jan 2015 09:44:09 +0000 (04:44 -0500)]
rbd: only enable object map if enabled in ceph config
As a way to introduce the RBD object map as an optional tech
preview, only enable it for new images/clones if the
rbd_object_map configuration parameter is enabled.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Tue, 18 Nov 2014 11:24:33 +0000 (06:24 -0500)]
librbd: Protect object map updates with a lock assertion
Use the new assert_locked functionality to protect object
map updates to only the single client that holds the lock.
This is to protect against possible race conditions during
lock ownership transitions.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Mon, 10 Nov 2014 15:25:13 +0000 (10:25 -0500)]
librbd: Implement object map for tracking in-use objects
The object map is stored in a new 'rbd_object_map.<id>'
object in the image's pool. The object map tracks blocks
that are in-use, non-existent, and are pending deletion.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Yehuda Sadeh [Wed, 21 Jan 2015 00:36:34 +0000 (16:36 -0800)]
rgw: convert old replicalog entries if needed
If reading a bucket replicalog entry and one doesn't exist, fall back to
the old key, and convert it to the new one. When updating entries, if
entry does not exist do the same.