]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
9 years agolibrgw: avoid illegal rele()
Matt Benjamin [Tue, 27 Oct 2015 00:24:26 +0000 (20:24 -0400)]
librgw: avoid illegal rele()

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: don't create/delete in librgw_file.cc (unit test)
Matt Benjamin [Mon, 26 Oct 2015 23:57:58 +0000 (19:57 -0400)]
librgw: don't create/delete in librgw_file.cc (unit test)

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: fs->root_fh is a pointer (and assign it)
Matt Benjamin [Mon, 26 Oct 2015 23:44:58 +0000 (19:44 -0400)]
librgw: fs->root_fh is a pointer (and assign it)

Assign and expose the expanded root_fh indirectly from the mounted
root filesystem structure.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: bucket names can be const
Matt Benjamin [Mon, 26 Oct 2015 22:13:46 +0000 (18:13 -0400)]
librgw: bucket names can be const

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: reify root handles
Matt Benjamin [Mon, 26 Oct 2015 21:18:06 +0000 (17:18 -0400)]
librgw: reify root handles

Reify root handle, remove traces of legacy (counter) handles.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: incremental RGWPutObj work and almost-complete RGWFH refactor.
Matt Benjamin [Mon, 26 Oct 2015 20:36:56 +0000 (16:36 -0400)]
librgw: incremental RGWPutObj work and almost-complete RGWFH refactor.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agoxxHash: build internally
Matt Benjamin [Mon, 26 Oct 2015 19:56:06 +0000 (15:56 -0400)]
xxHash: build internally

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: add ZPage/ZPageSet abstraction (gp unit tests)
Matt Benjamin [Mon, 26 Oct 2015 02:33:54 +0000 (22:33 -0400)]
librgw: add ZPage/ZPageSet abstraction (gp unit tests)

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agoxxHash: add as submodule
Matt Benjamin [Mon, 26 Oct 2015 02:07:03 +0000 (22:07 -0400)]
xxHash: add as submodule

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: rgw_file_handle refactor, plus get/put
Matt Benjamin [Sun, 25 Oct 2015 21:22:43 +0000 (17:22 -0400)]
librgw: rgw_file_handle refactor, plus get/put

Implement encapsulation of RGWFileHandle in rgw_file_handle,
so return these from rgw_lookup(), add new rgw_fh_rele() to release
internal state.

Currently the rgw_fh_rele just deletes, in future might be extended
with refcnt support.

Implement the first (atomic) stage of i/o using GET and PUT, add a
new librgw_file_gp test driver for this.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: add options for bucket name, multi create, delete
Matt Benjamin [Fri, 23 Oct 2015 22:23:13 +0000 (18:23 -0400)]
librgw: add options for bucket name, multi create, delete

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: fix acl assignment in RGWCreateBucket_OS_Lib
Matt Benjamin [Fri, 23 Oct 2015 21:56:33 +0000 (17:56 -0400)]
librgw: fix acl assignment in RGWCreateBucket_OS_Lib

The logic to create a default S3 policy in
RGWCreateBucket_OS_Lib::get_params() was essentially correct, but
failed to store the resulting policy on the current request.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: don't fake hostname (real hostname isn't used yet)
Matt Benjamin [Fri, 23 Oct 2015 17:42:28 +0000 (13:42 -0400)]
librgw: don't fake hostname (real hostname isn't used yet)

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: don't allow running rgwfile tests as anon
Matt Benjamin [Fri, 23 Oct 2015 17:18:12 +0000 (13:18 -0400)]
librgw: don't allow running rgwfile tests as anon

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: partial delete/unlink support
Matt Benjamin [Fri, 23 Oct 2015 16:39:05 +0000 (12:39 -0400)]
librgw: partial delete/unlink support

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: return result code from execute_request
Matt Benjamin [Thu, 8 Oct 2015 17:12:48 +0000 (13:12 -0400)]
librgw: return result code from execute_request

Update rgw_mkdir and rgw_readdir to use it.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: fix uri, read_permissions virtual for create-bucket
Matt Benjamin [Thu, 8 Oct 2015 15:11:40 +0000 (11:11 -0400)]
librgw: fix uri, read_permissions virtual for create-bucket

* set uri in rgw_mkdir (duh)
* RGWCreateBucketRequest should override RGWHandler::read_permissions
  to return 0

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: block in create bucket, rgw_mkdir
Matt Benjamin [Wed, 7 Oct 2015 21:19:29 +0000 (17:19 -0400)]
librgw: block in create bucket, rgw_mkdir

Unit test runs, doesn't...seem to create a bucket.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: re-derive rgw_os_lib family
Matt Benjamin [Wed, 7 Oct 2015 18:23:13 +0000 (14:23 -0400)]
librgw: re-derive rgw_os_lib family

* shorten names to match files
* remove derivation through rgw_rest intermediates

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: s/rgw_rest_lib.{h,cc}/rgw_os_lib.{h,cc}
Matt Benjamin [Wed, 7 Oct 2015 17:50:26 +0000 (13:50 -0400)]
librgw: s/rgw_rest_lib.{h,cc}/rgw_os_lib.{h,cc}

There is no longer an explicit (e.g., inherited) dependency on REST
implementations.

The remaining coupling (via RGWLibEnv, and struct req_state), can
be factored out later.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolirgw: call RGWHanlder_Lib::init_from_header
Matt Benjamin [Wed, 7 Oct 2015 17:26:19 +0000 (13:26 -0400)]
lirgw: call RGWHanlder_Lib::init_from_header

Call this from the general RGWLibRequest init() method, after
descendant header_init() has run.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: cleanups, incremental ListBuckets fixes
Matt Benjamin [Tue, 6 Oct 2015 23:29:25 +0000 (19:29 -0400)]
librgw: cleanups, incremental ListBuckets fixes

1. remove unused RGWLibRequestEnv code marked to delete
2. restore call to RGWHandler::authorize
3. provide RGWLibRequest::authorize implementing it
   ** the implementation is incomplete, and shows need to expand
      the initial mount auth to deal with keystone, etc
4. since acl check is still not quite right in verify_permissions()
   disable this again (temporarily)
5. fix dout_subsys of rgw_request.cc

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: forward cmdline args to librgw_create
Matt Benjamin [Tue, 6 Oct 2015 20:59:58 +0000 (16:59 -0400)]
librgw: forward cmdline args to librgw_create

Verified w/-d.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: remove disabled RGWLib RGWREST::get_handler()
Matt Benjamin [Tue, 6 Oct 2015 20:41:47 +0000 (16:41 -0400)]
librgw: remove disabled RGWLib RGWREST::get_handler()

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: cleanups in process_request
Matt Benjamin [Tue, 6 Oct 2015 20:36:06 +0000 (16:36 -0400)]
librgw: cleanups in process_request

* remove disabled S3 authorize step (user authorized on mount)
* re-enable op->verify_permission()

Skipping the latter makes RGW unhappy (1s stalls on each request),
but no objects are listing yet.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: pull RGWUserinfo user into RGWLibRequest
Matt Benjamin [Tue, 6 Oct 2015 20:14:08 +0000 (16:14 -0400)]
librgw: pull RGWUserinfo user into RGWLibRequest

Also, return result from process_request(req, io) to caller.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: cache RGWUserInfo in rgw_fs private handle
Matt Benjamin [Tue, 6 Oct 2015 19:36:32 +0000 (15:36 -0400)]
librgw: cache RGWUserInfo in rgw_fs private handle

The private RGWLibFS type holds a RGWUserInfo, and
calls rgw_get_user_info_by_access_key and verifies the returned
secret, checks for suspended user, on rgw_mount.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: split RGWUserInfo from struct req_state
Matt Benjamin [Mon, 5 Oct 2015 19:42:35 +0000 (15:42 -0400)]
librgw: split RGWUserInfo from struct req_state

The immediate purpose is to permit auth caching in RGWLib, but
it seems likely that this will be useful for general req_state
de-bloatification.

For now, all request processing paths put a RGWUserInfo on the
stack, so the lifetime of the object is unchanged from when it was
an expanded member.  A later change will introduce caching of
the objects.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: RGWFileHandle and RGWLibFS
Matt Benjamin [Mon, 5 Oct 2015 18:58:09 +0000 (14:58 -0400)]
librgw: RGWFileHandle and RGWLibFS

Experimentally reframe the C interface objects as subobjects in
private internal types.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: fixes for RGWListBucketRequest callback
Matt Benjamin [Mon, 5 Oct 2015 15:13:19 +0000 (11:13 -0400)]
librgw: fixes for RGWListBucketRequest callback

The cached req_state is still not correct at RGWOp::execute().

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: untested RGWLibListBucketsRequest and caller.
Matt Benjamin [Sun, 4 Oct 2015 23:40:47 +0000 (19:40 -0400)]
librgw: untested RGWLibListBucketsRequest and caller.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: fix 2 bugs in RGWListBuckets, remove scaffolding
Matt Benjamin [Sun, 4 Oct 2015 18:51:52 +0000 (14:51 -0400)]
librgw: fix 2 bugs in RGWListBuckets, remove scaffolding

1. the prior commit had authorize cognate with S3
1.1 which may be right
1.2 but maybe not for each request
1.3 and lacked priming/forged auth data

The forging of auth data is now easy, but the interesting part is
caching and efficiently attaching it so I paused, and

2. disabled auth, which was now overriding and anonymizing all
requests (good!)

3. fixed another instance of reinterpret_cast where (one of)
dynamic_cast or a saved pointer descendant request (avoids a runtime
check, so will add later) is needed

4. fixed bad offset argument to rgw_readdir

The list bucket facility now works, modulo non-auth.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: process_request prologue fixups
Matt Benjamin [Sat, 3 Oct 2015 20:28:16 +0000 (16:28 -0400)]
librgw: process_request prologue fixups

* initialize RGWEnv with required HTTP_HOST (incorrectly!)
* assign req_state::cio (not really correctly)
* remove incorrect delete of RGWOp, which no longer alloc'd

Now runs, but don't see buckets.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: reprocess process_request
Matt Benjamin [Sat, 3 Oct 2015 17:58:24 +0000 (13:58 -0400)]
librgw: reprocess process_request

Refactor RGWLib variant of process_request(...) as a (actually 2,
one which puts an RGWLibIO on the stack) member function of
RGWLibProcess.

Also replace extern abort_early with static inline abort_req(),
since the rgw_rest extern assumes HTTP/REST.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: wire up RGWLibFrontend enqueue and exec operations
Matt Benjamin [Fri, 2 Oct 2015 21:51:22 +0000 (17:51 -0400)]
librgw: wire up RGWLibFrontend enqueue and exec operations

Adds the missing bits of RGWLibProcess and RGWLibFrontend, and
calls them from rgw_readdir().

Clients can call enqueue_req() to route a request through the
work queue, or execute_req() to run it inline.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: remove RGWLibRequestEnv
Matt Benjamin [Fri, 2 Oct 2015 20:30:21 +0000 (16:30 -0400)]
librgw: remove RGWLibRequestEnv

The REST cognates of this class largely deal with HTTP, and is 1-1
w/request, client-io, op, etc.  At worst, its functions can be absorbed
into one of those (client-io, initially).

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: wire up request initializers
Matt Benjamin [Fri, 2 Oct 2015 16:50:47 +0000 (12:50 -0400)]
librgw: wire up request initializers

There's some tricky overloading induced by multiple inheritance,
also this design makes repeatedly shared handles in current framework
very visible.

The most important non-boilerplate is in descendant RGWRequest
initializers (rgw_lib.h), which need to set up req_state appropriately
for their action/op.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: re-derive RGWLibRequest
Matt Benjamin [Thu, 1 Oct 2015 22:26:37 +0000 (18:26 -0400)]
librgw: re-derive RGWLibRequest

Derive RGWLibRequest from RGWRequest, RGWHandler.

This strategy defines the dialect of ops following the derivation
pattern for RGWLib actions to be their handler.

On the negative side, RGWLibRequest has struct req_state* s from two
ancestors.  Since we don't use virtal inheritance, the only overhead is
the extra copy, and need for disambiguation in the direct descendants
(this is only 1 method in 1 file, atm).

The motivation is as follows.  RGWHandler currently has 3 responsibilities:
1) op-chasing; 2) to hold authorize() and read_permissions() methods
3) to initialize req_state

RGWLib actions have no use for the op-chasing behavior, and authorize()
and read_permissions() methods are arguably more naturally expressed as
methods on the actions.  Meanwhile struct req_state appears to be a
candidate for refactoring into the RGWRequest class hierarchy, which would
mean that initalization probably should move from hanlder to request, as
well.  Refactoring req_state is would be quite intrusive, so this change
defers that for later, but keeps the 1-1 mappings from request to
handler at 0 cost.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: rename RGWHandler_REST_Lib (sic), inherit from RGWHandler
Matt Benjamin [Thu, 1 Oct 2015 20:53:23 +0000 (16:53 -0400)]
librgw: rename RGWHandler_REST_Lib (sic), inherit from RGWHandler

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: remove dead code, add comments in RGWLib
Matt Benjamin [Thu, 1 Oct 2015 20:35:30 +0000 (16:35 -0400)]
librgw: remove dead code, add comments in RGWLib

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: refactor RGWHandler HTTP/REST methods into _REST
Matt Benjamin [Thu, 1 Oct 2015 19:58:27 +0000 (15:58 -0400)]
librgw: refactor RGWHandler HTTP/REST methods into _REST

This change renames RGWHandler_ObjStore to RGWHandler_REST, and
moves the following protected, virtual, RESTful methods:

  virtual bool is_obj_update_op() { return false; }
  virtual RGWOp *op_get() { return NULL; }
  virtual RGWOp *op_put() { return NULL; }
  virtual RGWOp *op_delete() { return NULL; }
  virtual RGWOp *op_head() { return NULL; }
  virtual RGWOp *op_post() { return NULL; }
  virtual RGWOp *op_copy() { return NULL; }
  virtual RGWOp *op_options() { return NULL; }

and the following public, virtual methods not needed by the
prototyped RGWLibHandler:

  virtual RGWOp *get_op(RGWRados *store);
  virtual void put_op(RGWOp *op);

from RGWHandler into the renamed class.

The motivation for this change is to allow a (maybe) transitional
refactoring stage which allows to implement the RGWHandler
interface, without implementing get_handler() or get_op(), put_op(),
or op_*().

Prior refactoring (which could be reversed) moved authorize() and
read_permissions() into the precursor RGWHandler_ObjStore

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: call rcb in RGWListBucketsRequest operator()
Matt Benjamin [Sat, 23 Jan 2016 19:27:39 +0000 (14:27 -0500)]
librgw: call rcb in RGWListBucketsRequest operator()

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: add user_id to RGWListBucketsRequest
Matt Benjamin [Thu, 1 Oct 2015 16:53:00 +0000 (12:53 -0400)]
librgw: add user_id to RGWListBucketsRequest

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: header inclusion fix, actually call callbacks
Matt Benjamin [Thu, 1 Oct 2015 12:52:07 +0000 (08:52 -0400)]
librgw: header inclusion fix, actually call callbacks

Fix public header inclusion from rgw_file.h internal header, which
of course needs to see the public interface.

Finish up the minimal RGWListBucketsRequest callback functor.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: incremental
Matt Benjamin [Wed, 30 Sep 2015 21:34:50 +0000 (17:34 -0400)]
librgw: incremental

* move RGWLibRequest decls into rgw_file.h
* revise include guard token in rados/rgw_file.h (avoid conflict)
* save CephContext* in RGWLibRequest
* initialize RGWLibRequest cct in ctor, req_state in process_request

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: s/gen_request/enqueue_req/;
Matt Benjamin [Wed, 30 Sep 2015 20:15:59 +0000 (16:15 -0400)]
librgw: s/gen_request/enqueue_req/;

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: replace RGWHandler::put_op() in RGWLib path
Matt Benjamin [Wed, 30 Sep 2015 18:46:04 +0000 (14:46 -0400)]
librgw: replace RGWHandler::put_op() in RGWLib path

The method just called delete on the RGWOp pointer.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: move authorize() and read_permissions()
Matt Benjamin [Wed, 30 Sep 2015 17:55:26 +0000 (13:55 -0400)]
librgw: move authorize() and read_permissions()

all RGW_Auth_S3::authorize() from process_request().  Add a
read_permissions() primitive replacing RGWHandler's version in
RGWLibRequest.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: pre-assign req->op (as self), avoid dynamic_cast
Matt Benjamin [Wed, 30 Sep 2015 14:00:14 +0000 (10:00 -0400)]
librgw: pre-assign req->op (as self), avoid dynamic_cast

It would be nice to have some compile-type assistance w/the
dual RGWOp & RGWLibRequest boilerplate.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: breakthrough cleanups (I think)
Matt Benjamin [Wed, 30 Sep 2015 00:46:18 +0000 (20:46 -0400)]
librgw: breakthrough cleanups (I think)

* RGWLib bucket ops prototyped
* progress made on RGWOp+RGWRequest unification (RGWLib only)
* mostly-harmlessness of RGWHandler-free operation try-checked

The replacement for process_request is the next code to prototype--
RGWHandler-free operation, for great justice.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: incremental rgw_rest_lib internals
Matt Benjamin [Fri, 25 Sep 2015 18:27:09 +0000 (14:27 -0400)]
librgw: incremental rgw_rest_lib internals

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: include rgw_lib.h from rgw_rest.cc
Matt Benjamin [Wed, 23 Sep 2015 22:27:04 +0000 (18:27 -0400)]
librgw: include rgw_lib.h from rgw_rest.cc

RGWLibIO is forward declared in rgw_rest.h.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: tweaks to RGWREST::preprocess and fix a typo in RGWHandler_ObjStore_Lib defn.
Matt Benjamin [Fri, 11 Sep 2015 20:03:09 +0000 (16:03 -0400)]
librgw: tweaks to RGWREST::preprocess and fix a typo in RGWHandler_ObjStore_Lib defn.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agorefactor RGWClientIO
Matt Benjamin [Thu, 10 Sep 2015 17:21:17 +0000 (13:21 -0400)]
refactor RGWClientIO

In order to support direct/library clients, we want to
more fully decouple RGWOp processing from client HTTP
processing, since in the direct case, there is no HTTP
client.

This change tackles essentially just RGWClientIO, by moving
stream operations to a new subclass RGWStreamIO, and updating
the stream backends (e.g., SWIFT, S3) and REST handlers
accordingly.

In addition, the RGWLib backend is incrementally updated, with
RGWLibIO still deriving from the base RGWClientIO.  The RGWLib
path is incomplete as of this change, but is moving in the
direction of its own process_request call path (incomplete,
partly due to header conflicts that will be resolved in
subsequent commits).

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: comments
Matt Benjamin [Wed, 9 Sep 2015 22:20:36 +0000 (18:20 -0400)]
librgw: comments

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: widen rgw_mount, open-code list buckets
Matt Benjamin [Wed, 9 Sep 2015 18:11:28 +0000 (14:11 -0400)]
librgw: widen rgw_mount, open-code list buckets

Widen rgw_mount(...) to take the library context, which from
there on follows struct rgw_fs.

Implement an open-coded version of list buckets in rgw_readdir(...),
which now...lists buckets.

The future home of this and the rest of the rgw_file impl. logic
looks to be a more fully elaborated RGWLib* class family.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: add LOOKUP_BUCKETS and LIST_OBJECTS
Matt Benjamin [Wed, 9 Sep 2015 13:11:46 +0000 (09:11 -0400)]
librgw: add LOOKUP_BUCKETS and LIST_OBJECTS

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: add list bucket test
Matt Benjamin [Tue, 8 Sep 2015 23:46:33 +0000 (19:46 -0400)]
librgw: add list bucket test

The operation on store is missing, but interface works.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: test rgw_(u)mount(...)
Matt Benjamin [Tue, 8 Sep 2015 23:26:18 +0000 (19:26 -0400)]
librgw: test rgw_(u)mount(...)

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: take keys in test
Matt Benjamin [Tue, 8 Sep 2015 23:12:24 +0000 (19:12 -0400)]
librgw: take keys in test

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: fe::init must create RGWLibProcess
Matt Benjamin [Tue, 8 Sep 2015 22:51:55 +0000 (18:51 -0400)]
librgw: fe::init must create RGWLibProcess

All evidence suggests RGWLibFrontend::init needs to create
an RGWLibProcess, and assign to pprocess.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: introduce struct rgw_fs
Matt Benjamin [Tue, 8 Sep 2015 21:48:11 +0000 (17:48 -0400)]
librgw: introduce struct rgw_fs

Pretending for a moment that we can definitely use the "mount"
based model, rgw_file like libcephfs requires a context reprsenting
the mounted fs.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: remove classes from extern, argv
Matt Benjamin [Tue, 8 Sep 2015 14:56:30 +0000 (10:56 -0400)]
librgw: remove classes from extern, argv

Remove class definitions from extern "C" block, which was
illogical.

Block in support for passing a C-style argument list to the
librgw_create library initializer, so code won't be tempted to
use one from librados.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: fix type of rgw_readdir eof argument (C-11 bool)
Matt Benjamin [Fri, 4 Sep 2015 19:18:43 +0000 (15:18 -0400)]
librgw: fix type of rgw_readdir eof argument (C-11 bool)

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: revise rgw_* method signatures
Matt Benjamin [Fri, 4 Sep 2015 19:01:59 +0000 (15:01 -0400)]
librgw: revise rgw_* method signatures

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: update rgw_rename signature
Matt Benjamin [Fri, 4 Sep 2015 00:11:51 +0000 (20:11 -0400)]
librgw: update rgw_rename signature

Currently unimplemented.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: define an rgw_setattr
Matt Benjamin [Fri, 4 Sep 2015 00:01:24 +0000 (20:01 -0400)]
librgw: define an rgw_setattr

Currently, this operation has no effect.  It may be unsafe to
assume that NFS clients can tolerate errors or inconsistency after
SETATTR protocol ops.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: make rgw_readdir take a bool* for eof
Matt Benjamin [Thu, 3 Sep 2015 19:40:19 +0000 (15:40 -0400)]
librgw: make rgw_readdir take a bool* for eof

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: update rgw_readdir interface (stub impl)
Matt Benjamin [Thu, 3 Sep 2015 19:11:10 +0000 (15:11 -0400)]
librgw: update rgw_readdir interface (stub impl)

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: add hypothetical rgw_statfs call
Matt Benjamin [Thu, 3 Sep 2015 14:43:38 +0000 (10:43 -0400)]
librgw: add hypothetical rgw_statfs call

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: stub implement rgw_getattr
Matt Benjamin [Thu, 3 Sep 2015 14:03:23 +0000 (10:03 -0400)]
librgw: stub implement rgw_getattr

This method returns Unix attributes for an object, represented
by an rgw_file_handle.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: add a library version (1.0.0)
Matt Benjamin [Tue, 1 Sep 2015 21:11:55 +0000 (17:11 -0400)]
librgw: add a library version (1.0.0)

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: rgw shared library
Matt Benjamin [Tue, 1 Sep 2015 18:20:02 +0000 (14:20 -0400)]
librgw: rgw shared library

Refactor rgw_a and radosgw_srcs, and add librgw_srcs, permitting
librgw to contain a smaller subset of objects, and in particular,
not link with fcgi or civitweb.

Fix aliasing of librgw_t rgw in test_rgw_file.  Also remove global_init
there, since it can't do the right thing.  Instead, assign g_ceph_context
(ref'd) in librgw_create, if not present.

(The current rgw codebase has many dependencies on g_ceph_context to
trivially remove--it would be easier to remove it entirely, and that seems
likely to happen eventually.)

We link librgw as SHARED, with PRIVATE dependencies.  The test_librgw_file
link test demonstrates that librgw.a can be linked with no Ceph library
dependencies except librados (and its dependencies, platform dependencies,
etc).

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: compile and implement more of rgw_file
Matt Benjamin [Sun, 30 Aug 2015 20:28:48 +0000 (16:28 -0400)]
librgw: compile and implement more of rgw_file

The rgw_file body wasn't being built, so had some impossible
constructs.  More had been added by the commit which renamed
struct nfs_handle to struct rgw_file_handle.

Several key RGWLib methods hadn't been implemented (in progress).

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: the external type of librgw_t must be void*
Matt Benjamin [Fri, 22 Jan 2016 18:05:58 +0000 (13:05 -0500)]
librgw: the external type of librgw_t must be void*

The C interface cannot contain a C++ forward declaration of
class CephContext.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: install librgw.h
Matt Benjamin [Fri, 28 Aug 2015 20:11:49 +0000 (16:11 -0400)]
librgw: install librgw.h

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: s/nfs_file_handle/rgw_file_handle/;
Matt Benjamin [Fri, 28 Aug 2015 17:49:45 +0000 (13:49 -0400)]
librgw: s/nfs_file_handle/rgw_file_handle/;

The interface is in rgw_file.h, so make it match.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agorgw_file.h: preserve cosnt correctness
Matt Benjamin [Thu, 27 Aug 2015 22:26:06 +0000 (18:26 -0400)]
rgw_file.h: preserve cosnt correctness

/s

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agolibrgw: fix some return warnings (and cosmetic)
Matt Benjamin [Thu, 27 Aug 2015 20:44:34 +0000 (16:44 -0400)]
librgw: fix some return warnings (and cosmetic)

Fix return codes for several exported functions in the rgw_file
interface.

Fix spacing and pointer, reference type notation, editor boilerplate,
in files added or touched in the prior commit introducing librgw.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agorgw: introduce libradosgw
Orit Wasserman [Tue, 12 May 2015 10:12:03 +0000 (12:12 +0200)]
rgw: introduce libradosgw

This change exposes the radosgw service as a dynamic
library, and also introduces a file-oriented view of the
RGW corpus as a namespace (e.g., for interop with NFS
clients).

The change concatenates the following commits:
    * rgw: add rgw_file.h
    * rgw: add RGWLibRequest, RGWLibFrontend and RGWLibProcess
    * rgw: Add user command interface for librgw
    *     user_commands
    *     Implement gen_request
    *    Install librgw.a
    *     add rgw_request.cc to Makefile.am
    *    Add empty API to librgw.h
    *    Add rgw_file.cc
    *    Make RGWLib a global object
    *    Implement lookup and readdir - wip
    *    Add rgw_rest_lib.cc
    *    Install rgw_file.h
    *    wip implement mount
    *      RGWLibIO

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agorgw: refactor rgw_main
Matt Benjamin [Fri, 8 May 2015 18:07:01 +0000 (20:07 +0200)]
rgw: refactor rgw_main

This change is an extended version of work by Orit Wasserman
moving some request-processing class headers and definition to
their own files (RGWProcess, RGWProcessEnv, RGWProcessFrontend),
along with process_request.

I have taken the refactoring further, so as to remove all class
declarations and member definitions from rgw_main.cc, so that the
file retains just:

* the responsibility to parse arguments and supervise the daemon
* the responsibility to select from front-ends/configure the RGW service
* usage

I have made small adjustments:
* moving some processing out of headers, to remove circular deps
* removed unused headers from rgw_main.cc
* added editor boilerplate and tweaked include guards in some files

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9 years agoMerge pull request #7351 from fmeppo/master
Loic Dachary [Fri, 12 Feb 2016 16:10:18 +0000 (23:10 +0700)]
Merge pull request #7351 from fmeppo/master

Add --setuser and --setgroup options for ceph-disk

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #7605 from dachary/wip-python-wheelhouse
Kefu Chai [Fri, 12 Feb 2016 11:59:08 +0000 (19:59 +0800)]
Merge pull request #7605 from dachary/wip-python-wheelhouse

python: use pip instead of python setup.py

Reviewed-by: Kefu Chai <kchai@redhat.com>
9 years agoceph-disk,ceph-detect-init: clean the build directory 7605/head
Loic Dachary [Thu, 11 Feb 2016 17:09:44 +0000 (00:09 +0700)]
ceph-disk,ceph-detect-init: clean the build directory

b030d8fc113736b479e84246b6b36d5f698a2da3 should have kept the build
directory in .gitignore and the clean target. Re-adding.

Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agopython: use pip instead of python setup.py
Loic Dachary [Thu, 11 Feb 2016 11:47:55 +0000 (18:47 +0700)]
python: use pip instead of python setup.py

python setup.py develop may try to pull dependencies from the net and
has no way to collect them from the wheelhouse that was populated by
install-deps.sh. Use pip install -e instead

Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agoMerge pull request #7528 from objoo/YD-jewel-mailmap-updates-take2
Loic Dachary [Fri, 12 Feb 2016 06:14:17 +0000 (13:14 +0700)]
Merge pull request #7528 from objoo/YD-jewel-mailmap-updates-take2

mailmap updates

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #7609 from dillaman/wip-librbd-flatten-test
Josh Durgin [Fri, 12 Feb 2016 05:10:13 +0000 (21:10 -0800)]
Merge pull request #7609 from dillaman/wip-librbd-flatten-test

test: new librbd flatten test case

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
9 years agoMerge pull request #7583 from dillaman/wip-librbd-journal-fsx
Josh Durgin [Fri, 12 Feb 2016 05:09:01 +0000 (21:09 -0800)]
Merge pull request #7583 from dillaman/wip-librbd-journal-fsx

librbd: integrate journal replay with fsx testing

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
9 years agoMerge pull request #7613 from wjwithagen/patch-1
Sage Weil [Thu, 11 Feb 2016 21:32:44 +0000 (16:32 -0500)]
Merge pull request #7613 from wjwithagen/patch-1

osd: add missing newline to usage message

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agosrc/ceph_osd.cc Add missing newline to usage message 7613/head
Willem Jan Withagen [Thu, 11 Feb 2016 18:18:19 +0000 (19:18 +0100)]
src/ceph_osd.cc Add missing newline to usage message

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
9 years agocommon: fix build error with Graylog
Sage Weil [Thu, 11 Feb 2016 18:24:29 +0000 (13:24 -0500)]
common: fix build error with Graylog

Graylog includes boost stuff, which clobbers our assert macros.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6920 from oritwas/wip-mstart-cmake
Casey Bodley [Thu, 11 Feb 2016 17:43:04 +0000 (12:43 -0500)]
Merge pull request #6920 from oritwas/wip-mstart-cmake

ajdust mstart and mstop script to run with cmake build

9 years agoMerge pull request #7523 from tchaikov/wip-fix-cmake
Ali Maredia [Thu, 11 Feb 2016 17:40:41 +0000 (12:40 -0500)]
Merge pull request #7523 from tchaikov/wip-fix-cmake

cmake: fix the build of tests

9 years agoMerge pull request #7607 from FlorentCoppint/master
Sage Weil [Thu, 11 Feb 2016 17:30:54 +0000 (12:30 -0500)]
Merge pull request #7607 from FlorentCoppint/master

mount.fuse.ceph: better parsing of arguments passed to mount.fuse.ceph by mount command

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agotest: new librbd flatten test case 7609/head
Jason Dillaman [Tue, 2 Feb 2016 15:54:53 +0000 (10:54 -0500)]
test: new librbd flatten test case

AIO operations after a flatten operation were previously
hanging during the close of the parent image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agoBetter parsing of arguments passed to mount.fuse.ceph by mount command. 7607/head
Florent [Thu, 11 Feb 2016 13:51:49 +0000 (14:51 +0100)]
Better parsing of arguments passed to mount.fuse.ceph by mount command.

Signed-off-by: Florent Bautista <florent@coppint.com>
9 years agoMerge pull request #5961 from majianpeng/small-fix
Sage Weil [Thu, 11 Feb 2016 13:46:22 +0000 (08:46 -0500)]
Merge pull request #5961 from majianpeng/small-fix

osd: clean up CMPXATTR checks

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #7533 from Cdiscount/master
Sage Weil [Thu, 11 Feb 2016 13:45:17 +0000 (08:45 -0500)]
Merge pull request #7533 from Cdiscount/master

debian: include cpio in build-requiers

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #7537 from ifed01/wip-no-promote-for-delete-fix
Sage Weil [Thu, 11 Feb 2016 13:44:35 +0000 (08:44 -0500)]
Merge pull request #7537 from ifed01/wip-no-promote-for-delete-fix

osd: fix unnecessary object promotion when deleting from cache pool

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #7567 from branch-predictor/bp-slimdown-conns
Sage Weil [Thu, 11 Feb 2016 13:43:46 +0000 (08:43 -0500)]
Merge pull request #7567 from branch-predictor/bp-slimdown-conns

msg: significantly reduce minimal memory usage of connections

Reviewed-by: Sage Weil <sage@redhat.com>