Fixes: #10698
This fixes issue introduced in 8b3dfc9472,
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.
Reported-by: Valery Tschopp <valery.tschopp@switch.ch>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Currently POST request on container returns 202 if success. But in Swift
the code is 204. Let's use 204 to keep align with the Swift API.
Fixes#10667
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
crush: new straw2 bucket
Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
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.
Signed-off-by: Sage Weil <sage@redhat.com>
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().
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
When clearing a bucket, if instance is not found, set it to "null",
otherwise we'll just create a delete marker.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
bufferlist::c_str() returns NULL if bufferlist is empty. We were
clearing the state, later on assigning s->obj_tag to a string.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Add a check that validates that object still exists. This shouldn't really be
an issue, as we later compare the tag.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
We convert old entries anyway, just complicates everything. Only use
that was kept is the one needed for the conversion function.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
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.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>