Commit Graph

48995 Commits

Author SHA1 Message Date
Matt Benjamin
9d6c78ff8b 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>
2016-02-12 11:58:08 -05:00
Matt Benjamin
ab2349c492 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>
2016-02-12 11:58:07 -05:00
Matt Benjamin
7e8ecc58ac 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>
2016-02-12 11:58:06 -05:00
Matt Benjamin
f4994c84b1 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>
2016-02-12 11:58:05 -05:00
Matt Benjamin
f1720d882d librgw: incremental rgw_rest_lib internals
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:58:04 -05:00
Matt Benjamin
35a5e5016a 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>
2016-02-12 11:58:03 -05:00
Matt Benjamin
5cc096d040 librgw: tweaks to RGWREST::preprocess and fix a typo in RGWHandler_ObjStore_Lib defn.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:58:02 -05:00
Matt Benjamin
df8f3920c7 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>
2016-02-12 11:58:01 -05:00
Matt Benjamin
79d3879cf3 librgw: comments
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:57:59 -05:00
Matt Benjamin
2903d754dd 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>
2016-02-12 11:57:58 -05:00
Matt Benjamin
a719a0bdd3 librgw: add LOOKUP_BUCKETS and LIST_OBJECTS
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:57:57 -05:00
Matt Benjamin
f6a95fc19b librgw: add list bucket test
The operation on store is missing, but interface works.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:57:56 -05:00
Matt Benjamin
5521c7abaa librgw: test rgw_(u)mount(...)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:57:55 -05:00
Matt Benjamin
84e21660cb librgw: take keys in test
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:57:54 -05:00
Matt Benjamin
9eeba4fb28 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>
2016-02-12 11:57:53 -05:00
Matt Benjamin
d1bbfe9442 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>
2016-02-12 11:57:52 -05:00
Matt Benjamin
fae842d2a1 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>
2016-02-12 11:57:51 -05:00
Matt Benjamin
eb2ac51c07 librgw: fix type of rgw_readdir eof argument (C-11 bool)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:57:50 -05:00
Matt Benjamin
2035fcc105 librgw: revise rgw_* method signatures
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:57:49 -05:00
Matt Benjamin
e7d0300cce librgw: update rgw_rename signature
Currently unimplemented.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:57:48 -05:00
Matt Benjamin
8fb8f002e8 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>
2016-02-12 11:57:47 -05:00
Matt Benjamin
763f434bf6 librgw: make rgw_readdir take a bool* for eof
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:57:46 -05:00
Matt Benjamin
5dd73b91a5 librgw: update rgw_readdir interface (stub impl)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:57:44 -05:00
Matt Benjamin
c4262b29c4 librgw: add hypothetical rgw_statfs call
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:57:43 -05:00
Matt Benjamin
c81b85d291 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>
2016-02-12 11:57:42 -05:00
Matt Benjamin
27e066de78 librgw: add a library version (1.0.0)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:57:41 -05:00
Matt Benjamin
c52a9fad0a 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>
2016-02-12 11:57:40 -05:00
Matt Benjamin
ce5ba5d685 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>
2016-02-12 11:56:01 -05:00
Matt Benjamin
e769655412 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>
2016-02-12 11:56:00 -05:00
Matt Benjamin
f23cd03b63 librgw: install librgw.h
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:55:59 -05:00
Matt Benjamin
3f6030074a 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>
2016-02-12 11:55:58 -05:00
Matt Benjamin
9830941704 rgw_file.h: preserve cosnt correctness
/s

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-02-12 11:55:57 -05:00
Matt Benjamin
2aa79deb0a 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>
2016-02-12 11:55:56 -05:00
Orit Wasserman
08b89a5f6a 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>
2016-02-12 11:55:55 -05:00
Matt Benjamin
76f1dcaf80 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>
2016-02-12 11:54:17 -05:00
Loic Dachary
b709f7ce1d Merge pull request #7351 from fmeppo/master
Add --setuser and --setgroup options for ceph-disk

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-02-12 23:10:18 +07:00
Kefu Chai
fb72714326 Merge pull request #7605 from dachary/wip-python-wheelhouse
python: use pip instead of python setup.py

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-02-12 19:59:08 +08:00
Loic Dachary
cd87bd48de ceph-disk,ceph-detect-init: clean the build directory
b030d8fc11 should have kept the build
directory in .gitignore and the clean target. Re-adding.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-02-12 17:10:41 +07:00
Loic Dachary
c1d8faad26 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>
2016-02-12 17:10:41 +07:00
Loic Dachary
18e64820aa Merge pull request #7528 from objoo/YD-jewel-mailmap-updates-take2
mailmap updates

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-02-12 13:14:17 +07:00
Josh Durgin
a2888e0ad8 Merge pull request #7609 from dillaman/wip-librbd-flatten-test
test: new librbd flatten test case

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-02-11 21:10:13 -08:00
Josh Durgin
bc22c0f327 Merge pull request #7583 from dillaman/wip-librbd-journal-fsx
librbd: integrate journal replay with fsx testing

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-02-11 21:09:01 -08:00
Sage Weil
90d93fe938 Merge pull request #7613 from wjwithagen/patch-1
osd: add missing newline to usage message

Reviewed-by: Sage Weil <sage@redhat.com>
2016-02-11 16:32:44 -05:00
Willem Jan Withagen
34f896b0db src/ceph_osd.cc Add missing newline to usage message
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-02-11 21:29:19 +01:00
Sage Weil
d7f0304aec common: fix build error with Graylog
Graylog includes boost stuff, which clobbers our assert macros.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-02-11 13:24:29 -05:00
Casey Bodley
05a4811c57 Merge pull request #6920 from oritwas/wip-mstart-cmake
ajdust mstart and mstop script to run with cmake build
2016-02-11 12:43:04 -05:00
Ali Maredia
aa6d0a9c65 Merge pull request #7523 from tchaikov/wip-fix-cmake
cmake: fix the build of tests
2016-02-11 12:40:41 -05:00
Sage Weil
6adb6944a4 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>
2016-02-11 12:30:54 -05:00
Jason Dillaman
5b3a4d2cbc 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>
2016-02-11 10:01:38 -05:00
Florent
8fe75846bd Better parsing of arguments passed to mount.fuse.ceph by mount command.
Signed-off-by: Florent Bautista <florent@coppint.com>
2016-02-11 14:51:49 +01:00