]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agorgw: change configurable
Yehuda Sadeh [Tue, 6 Nov 2012 22:28:42 +0000 (14:28 -0800)]
rgw: change configurable

rgw keystone accepted roles

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix build
Yehuda Sadeh [Tue, 6 Nov 2012 19:02:04 +0000 (11:02 -0800)]
rgw: fix build

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: use a different boost thread library
Yehuda Sadeh [Tue, 6 Nov 2012 02:10:41 +0000 (18:10 -0800)]
rgw: use a different boost thread library

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: keystone tokens revocation thread
Yehuda Sadeh [Tue, 6 Nov 2012 01:29:52 +0000 (17:29 -0800)]
rgw: keystone tokens revocation thread

Use a thread to invalidate revoked tokens.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agojson_spirit: thread safe
Yehuda Sadeh [Tue, 6 Nov 2012 01:29:20 +0000 (17:29 -0800)]
json_spirit: thread safe

apparently the library is not thread safe by default.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: decode pki tokens
Yehuda Sadeh [Mon, 5 Nov 2012 22:14:09 +0000 (14:14 -0800)]
rgw: decode pki tokens

If we can decode pki tokens then we don't need to send them to
the Keystone server for verification.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: invalidate revoked tokens
Yehuda Sadeh [Mon, 5 Nov 2012 21:48:37 +0000 (13:48 -0800)]
rgw: invalidate revoked tokens

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: keep pki tokens by hash
Yehuda Sadeh [Mon, 5 Nov 2012 21:38:51 +0000 (13:38 -0800)]
rgw: keep pki tokens by hash

and also fix the token parsing (needed after the json
parser fix).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: decode revocation message
Yehuda Sadeh [Sat, 3 Nov 2012 00:00:49 +0000 (17:00 -0700)]
rgw: decode revocation message

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agocrypto: add cms utility function
Yehuda Sadeh [Fri, 2 Nov 2012 20:13:38 +0000 (13:13 -0700)]
crypto: add cms utility function

Taken from a libnss tool (cmsutil), stripped code so that we
only get the decode functionality that we need.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: parse keystone token expiration
Yehuda Sadeh [Wed, 31 Oct 2012 23:12:16 +0000 (16:12 -0700)]
rgw: parse keystone token expiration

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: cache keystone tokens
Yehuda Sadeh [Wed, 31 Oct 2012 21:49:12 +0000 (14:49 -0700)]
rgw: cache keystone tokens

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: map keystone tenant id to rgw user
Yehuda Sadeh [Wed, 31 Oct 2012 18:23:28 +0000 (11:23 -0700)]
rgw: map keystone tenant id to rgw user

Instead of mapping the tenant name. Keep the name as the display_name.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: handle keystone roles
Yehuda Sadeh [Wed, 31 Oct 2012 00:34:06 +0000 (17:34 -0700)]
rgw: handle keystone roles

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: auto create rgw user for new keystone users
Yehuda Sadeh [Tue, 30 Oct 2012 23:38:33 +0000 (16:38 -0700)]
rgw: auto create rgw user for new keystone users

We now also read the user info when authenticating the keystone
user.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: handle keystone tokens
Yehuda Sadeh [Tue, 30 Oct 2012 22:52:53 +0000 (15:52 -0700)]
rgw: handle keystone tokens

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: extend rgw json parser api
Yehuda Sadeh [Tue, 30 Oct 2012 22:52:25 +0000 (15:52 -0700)]
rgw: extend rgw json parser api

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: refactor curl functionality
Yehuda Sadeh [Tue, 30 Oct 2012 20:12:23 +0000 (13:12 -0700)]
rgw: refactor curl functionality

Move curl stuff into its own class, use it in swift token validation.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: configurable swift auth url
Yehuda Sadeh [Tue, 30 Oct 2012 19:39:29 +0000 (12:39 -0700)]
rgw: configurable swift auth url

This is relevant when using external swift v1 authentication. The
url was hard coded, now it's configurable.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: better error responses, logging for specific error cases
Yehuda Sadeh [Mon, 15 Oct 2012 21:04:46 +0000 (14:04 -0700)]
rgw: better error responses, logging for specific error cases

Also, adjusting return values

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: POST fixes, policy range, policy expiration
Yehuda Sadeh [Thu, 11 Oct 2012 22:36:07 +0000 (15:36 -0700)]
rgw: POST fixes, policy range, policy expiration

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: handle expiration and content length policy conditions.
caleb miles [Thu, 11 Oct 2012 17:00:48 +0000 (13:00 -0400)]
rgw: handle expiration and content length policy conditions.

Signed-off-by: caleb miles <caleb.miles@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: implement POST key can use ${filename}
Yehuda Sadeh [Thu, 11 Oct 2012 21:27:16 +0000 (14:27 -0700)]
rgw: implement POST key can use ${filename}

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: return correct responses with POST
Yehuda Sadeh [Thu, 11 Oct 2012 20:51:48 +0000 (13:51 -0700)]
rgw: return correct responses with POST

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: handle success_action_redirect
Yehuda Sadeh [Thu, 11 Oct 2012 16:40:39 +0000 (09:40 -0700)]
rgw: handle success_action_redirect

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: handle policy as case insensitive where required
Yehuda Sadeh [Wed, 10 Oct 2012 23:16:01 +0000 (16:16 -0700)]
rgw: handle policy as case insensitive where required

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: handle missing content length in POST
Yehuda Sadeh [Wed, 10 Oct 2012 20:29:14 +0000 (13:29 -0700)]
rgw: handle missing content length in POST

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: handle x-ignore- in POST request
Yehuda Sadeh [Wed, 10 Oct 2012 19:50:11 +0000 (12:50 -0700)]
rgw: handle x-ignore- in POST request

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: verify that request variables are in policy
Yehuda Sadeh [Wed, 10 Oct 2012 19:39:34 +0000 (12:39 -0700)]
rgw: verify that request variables are in policy

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agojson_spirit: update grammar
Yehuda Sadeh [Tue, 9 Oct 2012 22:30:45 +0000 (15:30 -0700)]
json_spirit: update grammar

Support a more relaxed grammar, where last entity in an array
or an object can have a comma trailing.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: add policy decoding code
Yehuda Sadeh [Tue, 9 Oct 2012 18:24:46 +0000 (11:24 -0700)]
rgw: add policy decoding code

merge in changes from commit 57668c14 by caleb

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: basic policy functionality
Yehuda Sadeh [Tue, 23 Oct 2012 17:15:36 +0000 (10:15 -0700)]
rgw: basic policy functionality

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: add a test tool for json parser
Yehuda Sadeh [Sat, 20 Oct 2012 00:27:53 +0000 (17:27 -0700)]
rgw: add a test tool for json parser

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: adjustments for 100-continue
Yehuda Sadeh [Thu, 4 Oct 2012 20:02:22 +0000 (13:02 -0700)]
rgw: adjustments for 100-continue

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: handle content_type, meta
Yehuda Sadeh [Thu, 4 Oct 2012 00:36:50 +0000 (17:36 -0700)]
rgw: handle content_type, meta

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: helper functions to parse multipart form
Yehuda Sadeh [Tue, 2 Oct 2012 20:09:56 +0000 (13:09 -0700)]
rgw: helper functions to parse multipart form

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: Create JSON parser
caleb miles [Mon, 1 Oct 2012 16:39:20 +0000 (12:39 -0400)]
rgw: Create JSON parser

Create JSON object and parser classes similar to the XMLObj and
RGWXMLParser based on JSON Spirit.

Signed-off-by: caleb miles <caleb.miles@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: Implement POST object to publicly writeable buckets.
caleb miles [Thu, 27 Sep 2012 23:28:35 +0000 (19:28 -0400)]
rgw: Implement POST object to publicly writeable buckets.

The S3 API supports object upload using POST requests, for browser based
uploads, the specification is described at:

http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPOST.html

In response to feature request 771:

http://tracker.newdream.net/issues/771

Signed-off-by: caleb miles <caleb.miles@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorbd: don't issue usage on errors
Dan Mick [Wed, 10 Oct 2012 17:41:05 +0000 (10:41 -0700)]
rbd: don't issue usage on errors

Change bare calls to usage() to an informative targeted error message
Remove all calls to usage() except when requested with -h/--help
Regularize all errors to start with rbd:
Remove a few commented cerrs, wrap cerr calls at 80 cols

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Wed, 10 Oct 2012 22:16:17 +0000 (15:16 -0700)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agodoc: Added radosgw temp remove.
John Wilkins [Wed, 10 Oct 2012 22:15:32 +0000 (15:15 -0700)]
doc: Added radosgw temp remove.

fixes: #3278

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Minor clean-up.
John Wilkins [Wed, 10 Oct 2012 22:14:05 +0000 (15:14 -0700)]
doc: Minor clean-up.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: minor clean-up.
John Wilkins [Wed, 10 Oct 2012 22:13:41 +0000 (15:13 -0700)]
doc: minor clean-up.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agorgw: fix compilation
Noah Watkins [Wed, 10 Oct 2012 21:59:16 +0000 (14:59 -0700)]
rgw: fix compilation

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Wed, 10 Oct 2012 21:38:50 +0000 (14:38 -0700)]
Merge branch 'master' of https://github.com/ceph/ceph

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Wed, 10 Oct 2012 21:36:51 +0000 (14:36 -0700)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agoMerge branch 'wip-rbd-openstack-doc'
John Wilkins [Wed, 10 Oct 2012 21:36:13 +0000 (14:36 -0700)]
Merge branch 'wip-rbd-openstack-doc'

12 years agomon: drop command replies on paxos reset
Sage Weil [Tue, 9 Oct 2012 00:14:22 +0000 (17:14 -0700)]
mon: drop command replies on paxos reset

If paxos resets, do not send the reply for the commit we were waiting for;
let the command be reprocessed and re-proposed.

Among other things, this could lead to nondeterministic results for
'ceph osd create <uuid>'.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: Editing and cleanup.
John Wilkins [Wed, 10 Oct 2012 20:22:47 +0000 (13:22 -0700)]
doc: Editing and cleanup.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agorbd cli tests: copy.sh was looking for old version of rbd ls -l output
Dan Mick [Wed, 10 Oct 2012 00:13:03 +0000 (17:13 -0700)]
rbd cli tests: copy.sh was looking for old version of rbd ls -l output

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoclean up of rbd functionality script
tamil [Tue, 9 Oct 2012 23:42:57 +0000 (16:42 -0700)]
clean up of rbd functionality script

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agocleaned up the perl module
tamil [Tue, 9 Oct 2012 23:40:55 +0000 (16:40 -0700)]
cleaned up the perl module

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agocleaned up the script
tamil [Tue, 9 Oct 2012 22:50:29 +0000 (15:50 -0700)]
cleaned up the script

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agoradosgw-admin: don't try to parse date if wasn't specified
Yehuda Sadeh [Tue, 9 Oct 2012 21:56:28 +0000 (14:56 -0700)]
radosgw-admin: don't try to parse date if wasn't specified

This fixes a regression following the merge of wip-admin-rest.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoceph-debugpack: updates
Sage Weil [Tue, 9 Oct 2012 21:10:48 +0000 (14:10 -0700)]
ceph-debugpack: updates

- avoid copying data around; tar things directly into the tgz
- 'ceph report' instead of all the little bits
- unrotated logs only
- ensure target doesn't already exist

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: separate config from I/O in openstack diagram
Josh Durgin [Tue, 9 Oct 2012 21:06:40 +0000 (14:06 -0700)]
doc: separate config from I/O in openstack diagram

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: clarify rbd openstack docs
Josh Durgin [Tue, 9 Oct 2012 20:53:37 +0000 (13:53 -0700)]
doc: clarify rbd openstack docs

* give upstart example
* restart all relevant services
* explain OpenStack terminology more

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agogitignore: Update to match packaging changes and additions, rest-bench addition.
Tommi Virtanen [Tue, 9 Oct 2012 20:23:37 +0000 (13:23 -0700)]
gitignore: Update to match packaging changes and additions, rest-bench addition.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
12 years agoconfigure.ac: Typo in human-readable description.
Tommi Virtanen [Tue, 9 Oct 2012 19:47:22 +0000 (12:47 -0700)]
configure.ac: Typo in human-readable description.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
12 years agomon: Monitor: resolve keyring option to a file before loading keyring
Joao Eduardo Luis [Tue, 9 Oct 2012 20:25:54 +0000 (21:25 +0100)]
mon: Monitor: resolve keyring option to a file before loading keyring

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>
12 years agodoc: simplify wording for rbd-openstack config
Josh Durgin [Tue, 9 Oct 2012 17:34:51 +0000 (10:34 -0700)]
doc: simplify wording for rbd-openstack config

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-gtest-libcephfs'
Sage Weil [Tue, 9 Oct 2012 16:43:42 +0000 (09:43 -0700)]
Merge remote-tracking branch 'gh/wip-gtest-libcephfs'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc: Add doxygen style documentation for libcephfs
Sam Lang [Tue, 9 Oct 2012 14:09:37 +0000 (09:09 -0500)]
doc: Add doxygen style documentation for libcephfs

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>
12 years agotest: Refactored testceph.cc into gtest framework
Sam Lang [Tue, 9 Oct 2012 14:06:16 +0000 (09:06 -0500)]
test: Refactored testceph.cc into gtest framework

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>
12 years agotest: Allow readdir test to be repeated
Sam Lang [Tue, 9 Oct 2012 14:14:35 +0000 (09:14 -0500)]
test: Allow readdir test to be repeated

Use test dir/files that include the pid to avoid
hitting errors when running the same test twice.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agolibcephfs: Check that buffer is non-null
Sam Lang [Tue, 9 Oct 2012 14:11:37 +0000 (09:11 -0500)]
libcephfs: Check that buffer is non-null

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-client-stale'
Sage Weil [Tue, 9 Oct 2012 03:56:05 +0000 (20:56 -0700)]
Merge remote-tracking branch 'gh/wip-client-stale'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomds: Fix removexattr ENODATA error
Sam Lang [Mon, 8 Oct 2012 17:04:57 +0000 (12:04 -0500)]
mds: Fix removexattr ENODATA error

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>
12 years agoosdmap: fix null deref in dump
Sage Weil [Tue, 9 Oct 2012 03:50:12 +0000 (20:50 -0700)]
osdmap: fix null deref in dump

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>
12 years agoosdmap: fix osdmap dump null check
Sage Weil [Tue, 9 Oct 2012 03:49:41 +0000 (20:49 -0700)]
osdmap: fix osdmap dump null check

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 13b841c74605d67a172d787079bcef007d1a8fa5.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: note fall-thru to please coverity
Sage Weil [Tue, 9 Oct 2012 03:48:30 +0000 (20:48 -0700)]
mds: note fall-thru to please coverity

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>
12 years agotest_cfuse_cache_invalidate: check for errors
Sage Weil [Tue, 9 Oct 2012 03:47:16 +0000 (20:47 -0700)]
test_cfuse_cache_invalidate: check for errors

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>
12 years agomon/Elector: fix leak on monmap from peer
Sage Weil [Tue, 9 Oct 2012 03:44:54 +0000 (20:44 -0700)]
mon/Elector: fix leak on monmap from peer

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>
12 years agotest_cfuse_cache_invalidate: zero buffer
Sage Weil [Tue, 9 Oct 2012 03:44:10 +0000 (20:44 -0700)]
test_cfuse_cache_invalidate: zero buffer

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>
12 years agoFileJournal: ignore osd journal size for block devices
Josh Durgin [Tue, 9 Oct 2012 00:59:36 +0000 (17:59 -0700)]
FileJournal: ignore osd journal size for block devices

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>
12 years agorgw: switch perm to uint32_t
Yehuda Sadeh [Mon, 8 Oct 2012 23:34:12 +0000 (16:34 -0700)]
rgw: switch perm to uint32_t

Should fix a warning.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: flexible attr fields
Yehuda Sadeh [Mon, 8 Oct 2012 23:13:04 +0000 (16:13 -0700)]
rgw: flexible attr fields

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>
12 years agorgw: get bucket logging stub
Yehuda Sadeh [Wed, 26 Sep 2012 23:41:17 +0000 (16:41 -0700)]
rgw: get bucket logging stub

Trivial implementation that just returns that
bucket logging is not enabled.

Fixes: #3225
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: check_disk_state also updates other object metadata
Yehuda Sadeh [Fri, 28 Sep 2012 18:11:04 +0000 (11:11 -0700)]
rgw: check_disk_state also updates other object metadata

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>
12 years agoMerge branch 'wip-rgw-coverity2'
Yehuda Sadeh [Mon, 8 Oct 2012 22:23:08 +0000 (15:23 -0700)]
Merge branch 'wip-rgw-coverity2'

12 years agorgw: set null termination explicitly
Yehuda Sadeh [Thu, 27 Sep 2012 23:02:21 +0000 (16:02 -0700)]
rgw: set null termination explicitly

Make sure that string is null terminated.
Fixes coverity issue.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agocls_rgw: return returned ret code
Yehuda Sadeh [Thu, 27 Sep 2012 22:33:28 +0000 (15:33 -0700)]
cls_rgw: return returned ret code

Wasn't setting the ret code. A coverity issue.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: add missing parantheses
Yehuda Sadeh [Thu, 27 Sep 2012 22:30:16 +0000 (15:30 -0700)]
rgw: add missing parantheses

.. around logic operations at process_intent_log().
Another coverity fix.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: check NULL before dereference
Yehuda Sadeh [Thu, 27 Sep 2012 22:27:00 +0000 (15:27 -0700)]
rgw: check NULL before dereference

Another coverity fix.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw-admin: pass object by reference
Yehuda Sadeh [Thu, 27 Sep 2012 22:24:45 +0000 (15:24 -0700)]
rgw-admin: pass object by reference

Large object should be passed by reference (coverity fix).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix leaks in certain error paths
Yehuda Sadeh [Thu, 27 Sep 2012 22:13:46 +0000 (15:13 -0700)]
rgw: fix leaks in certain error paths

Fixes a few coverity issues

Conflicts:
src/rgw/rgw_rados.cc

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix (im)possible leak
Yehuda Sadeh [Thu, 27 Sep 2012 22:00:09 +0000 (15:00 -0700)]
rgw: fix (im)possible leak

Fixes coverity issue

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: catch possible exception
Yehuda Sadeh [Thu, 27 Sep 2012 21:58:12 +0000 (14:58 -0700)]
rgw: catch possible exception

Fix coverity issue 717168.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: initialize member variables at req_state
Yehuda Sadeh [Thu, 27 Sep 2012 21:50:56 +0000 (14:50 -0700)]
rgw: initialize member variables at req_state

Fixes more coverity issues

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: initialize data members
Yehuda Sadeh [Thu, 27 Sep 2012 21:43:53 +0000 (14:43 -0700)]
rgw: initialize data members

Fixes a few coverity issues.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: RGWObjState() initialize memebers
Yehuda Sadeh [Thu, 27 Sep 2012 21:38:21 +0000 (14:38 -0700)]
rgw: RGWObjState() initialize memebers

Initialize members at constructor. Fixes coverity issues.

Conflicts:
src/rgw/rgw_rados.h

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: initialize members at RGWRados()
Yehuda Sadeh [Thu, 27 Sep 2012 21:35:35 +0000 (14:35 -0700)]
rgw: initialize members at RGWRados()

fixes coverity issues

Conflicts:
src/rgw/rgw_rados.h

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agocls_rgw: check pointer before dereferencing
Yehuda Sadeh [Thu, 27 Sep 2012 21:29:55 +0000 (14:29 -0700)]
cls_rgw: check pointer before dereferencing

Fixes coverity issue 719577

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: multiple coverity fixes of uninitialized fields
Yehuda Sadeh [Thu, 27 Sep 2012 20:14:37 +0000 (13:14 -0700)]
rgw: multiple coverity fixes of uninitialized fields

Fields were not initialized explicitly by constractor.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: trivial fix
Yehuda Sadeh [Thu, 27 Sep 2012 20:09:36 +0000 (13:09 -0700)]
rgw: trivial fix

fix coverity issue 728052

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: change size_t to ssize_t for string.rfind() result
Yehuda Sadeh [Thu, 27 Sep 2012 20:07:14 +0000 (13:07 -0700)]
rgw: change size_t to ssize_t for string.rfind() result

fixes coverity bug 728053

string.rfind() may return negative value, switch to ssize_t instead
of size_t.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix resource leak
Yehuda Sadeh [Thu, 27 Sep 2012 19:44:33 +0000 (12:44 -0700)]
rgw: fix resource leak

coverity bug 728055

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoRevert "admin/build-doc: Use installed Sphinx and its dependencies, when possible."
Dan Mick [Mon, 8 Oct 2012 20:35:38 +0000 (13:35 -0700)]
Revert "admin/build-doc: Use installed Sphinx and its dependencies, when possible."

This reverts commit c65ffe9f7f27bc0fe5afab36e9ef0de42bc3c74c.

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)

12 years agoMerge branch 'wip-admin-rest'
Yehuda Sadeh [Mon, 8 Oct 2012 21:30:17 +0000 (14:30 -0700)]
Merge branch 'wip-admin-rest'

Conflicts:
doc/radosgw/index.rst
src/rgw/rgw_admin.cc
src/rgw/rgw_main.cc
src/rgw/rgw_op.cc
src/rgw/rgw_op.h
src/rgw/rgw_rest.cc
src/rgw/rgw_rest.h
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_s3.h
src/rgw/rgw_rest_swift.cc
src/rgw/rgw_rest_swift.h
src/rgw/rgw_swift_auth.cc
src/rgw/rgw_swift_auth.h

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: virtual bucket affects resource lookup
Yehuda Sadeh [Wed, 26 Sep 2012 00:06:05 +0000 (17:06 -0700)]
rgw: virtual bucket affects resource lookup

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>