Otherwise our keyring default location, or any other similarly formatted
location, will be taken as the actual location for the keyring and fail.
Reported-by: tziOm (at) #ceph
Fixes: 3276
Backport: argonaut
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
As well as doxygen doc, we document a few parts of
the interface that are otherwise undocumented and
don't match the standard calls.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Moved all the functionality tests for the libcephfs
API into the gtest framework. Also adds tests for
directories to improve test coverage of the libcephfs
interfaces.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
If a client sets an xattr and then attempts to remove in a short
time window, the xattr may not have been committed to the journal
and will only be set on the projected xattrs of the inode. This
results in a removexattr returning ENODATA at present. The fix
here checks the xattr name in the projected xattrs, and only
returns ENODATA in the case where the name doesn't exist in that
map either.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
CID 731938 (#1 of 1): Dereference after null check (FORWARD_NULL)
At (15): Passing null pointer "f" to function "ceph::Formatter::dump_int(char const *, int64_t)", which dereferences it. (The dereference happens because this is a virtual function call.)
Signed-off-by: Sage Weil <sage@inktank.com>
CID 731939 (#1 of 1): Dereference after null check (FORWARD_NULL)
At (5): Passing null pointer "out" to function "std::operator << <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> > &, char const *)", which dereferences it.
Broken by 13b841c746.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 731940 (#1 of 1): Missing break in switch (MISSING_BREAK)
This case (value 23) is not terminated by a 'break' statement.
1719 case CEPH_MSG_CLIENT_RECONNECT:
1720 ALLOW_MESSAGES_FROM(CEPH_ENTITY_TYPE_CLIENT);
The above case falls through to this one.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 731941 (#1 of 2): Argument cannot be negative (NEGATIVE_RETURNS)
At (6): "fd" is passed to a parameter that cannot be negative.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 731942 (#1 of 1): Resource leak (RESOURCE_LEAK)
At (12): Variable "peermap" going out of scope leaks the storage it points to.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 731943 (#1 of 1): Uninitialized scalar variable (UNINIT)
At (5): Using uninitialized element of array "buf" when calling "pwrite(int, void const *, size_t, __off64_t)".
Signed-off-by: Sage Weil <sage@inktank.com>
Using part of a block device doesn't make much sense. This makes the
common case, where you partition a disk to act as several journals,
easier to configure.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Fixes: #3114
Instead of having a few hard coded attrs that are
special cased, make it more generic. This allows supporting
more header fields, such as cache-control, expires, etc.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
When we do a check_disk_state() on an object that is not complete,
we need to also update etag, content_type, owner, and display_name.
Otherwise, we'd end up missing that from the bucket index. In
practice this only affects swift, as only there we're actually
looking at that info (when listing a container).
Fixes: #3234
Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This reverts commit c65ffe9f7f.
oneiric, where the doc gitbuilder runs, doesn't have the
--system-site-packages option; let's get docs back and sort this out
offline. (virtualenv 1.6.4-0ubuntu1 on oneiric, 1.7.1.2-1 on precise)
Removed special casing of virtual bucket handling
and just prepending it to the URI. So now virtual
bucket also affects admin and swift* protocols.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
We didn't update buffer size according to read data.
Also, didn't update the total obj_size (was doing it only
for the second chunk being put, but for chunked input that
only had a single piece we ended up with zero obj_size). Also
remove assertion that second call to handle_data() means that
ofs > chunk size. This isn't true for chunked input.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
The formatter might not have been initialized, as we
abort early (e.g., when protocol handler wasn't found)
so we need to initialize it in order to dump error
status.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
We can now specify which set of apis the gateway supports. Also,
passed resource should not start with a slash, we prepend that
automatically.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
User info now holds caps map, which contains a mapping between
a freestyle cap name string to permissions bitfield (read, write).
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Use json formatter by default for new usage stuff. Also
make it configurable.
We use the JSON formatter for the swift auth.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>