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>
It would be nice to have some compile-type assistance w/the
dual RGWOp & RGWLibRequest boilerplate.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* 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>
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>
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>
All evidence suggests RGWLibFrontend::init needs to create
an RGWLibProcess, and assign to pprocess.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
AIO operations after a flatten operation were previously
hanging during the close of the parent image.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>