Commit Graph

21220 Commits

Author SHA1 Message Date
John Wilkins
d50aab8442 doc: Added enabling Swift access to rgw config.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-19 16:26:40 -07:00
John Wilkins
4958063518 doc; Added troubleshooting to index.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-19 16:25:49 -07:00
John Wilkins
a83f50389e doc: Copied contents of rgw troubleshooting over to the new ops section.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-19 16:25:11 -07:00
John Wilkins
280aeaf035 doc: Reverted so that we don't force yes or non-interactive.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-19 16:24:12 -07:00
John Wilkins
9c8061fe5d doc: Removed legacy usage.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-19 16:23:26 -07:00
John Wilkins
b3651dac76 doc: Cleanup, spell check, grammar check mostly.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-19 16:22:38 -07:00
John Wilkins
b311a408a3 doc: Updating the index to remove legacy and uneeded entries.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-19 16:21:08 -07:00
Alex Elder
ed43d4de12 rbd/copy.sh: fix typo
Or maybe it was a spello, or a thinko, or something.  In any case
I'm pretty sure Josh intended to call the function he added in
commit 78d6a60ca, and not the non-existent "test_import_args".

Signed-off-by: Alex Elder <elder@inktank.com>
2012-09-18 22:51:10 -05:00
Sage Weil
471acda426 Merge remote-tracking branch 'gh/next' 2012-09-18 16:49:58 -07:00
Josh Durgin
f530659786 Merge remote branch 'origin/wip-librbd-locking'
Conflicts:
	qa/workunits/rbd/copy.sh

Reviewed-by: Sage Weil <sage.weil@inktank.com>
2012-09-18 16:06:25 -07:00
Josh Durgin
7a3d1e66ef librbd: bump version
This marks the availability of the cloning and locking functions.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:51:38 -07:00
Josh Durgin
855dff62ae cls_rbd: remove locking methods
These are unnecessary now that librbd is using the generic cls_lock.

Fixes: #2951
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:45:54 -07:00
Josh Durgin
8f2a0d91ab rbd: add locking commands
The locker (entity_name_t) will be different each time the rbd
command line tool is run, so 'lock remove' is always breaking a lock.

Fixes: #2556
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:45:43 -07:00
Josh Durgin
b66ef430a0 qa: update rbd tests and runner
* no longer need to wait for watch timeout since #2948 was fixed
* use --format 2 instead of --new-format
* add test_cls_rbd to run-rbd-tests script

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:43:45 -07:00
Josh Durgin
3a9e6650af librbd: use generic cls_lock instead of cls_rbd's locking
Update the librbd locking api to make more sense:
 * Add an optional tag to shared locking
 * only make shared vs exclusive different functions in the user-visible api
 * return a list of structs instead of a set of pairs
 * fix incorrect range checking in the C api
 * rename locks to lockers to be consistent with the generic locking class
 * rename other_locker parameter to client, to match the list_lockers usage

Fixes: #2952
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:43:13 -07:00
Josh Durgin
69ee9afa27 cls_lock_client: add ObjectOperation-based get_lock_info
This will be used by librbd to grab lock info along with
the rest of its header information in a single request.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:42:37 -07:00
Josh Durgin
6dcbbbb6fc cls_lock_types: add missing include
msg_types defines entity-related types used here.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:40:19 -07:00
Josh Durgin
67bbcf2c27 cls_lock_client: return error when decoding fails
Library code shouldn't be using cerr either.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:40:05 -07:00
Josh Durgin
d1252ea21e cls_lock_client: fix indentation
Add indentation settings to header, and reindent.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:39:56 -07:00
Josh Durgin
bf2e489248 cls_lock_client: change modified reference parameters to pointers
This makes it clear which parameters are modified,
as our style guide states.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:39:43 -07:00
Josh Durgin
2dca3a8616 cls_lock_client: clean up reference parameters
These should all be const. The remaining reference parameters
will be converted to pointers in another commit.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:36:11 -07:00
Josh Durgin
e71fdc75be cls_lock: fix some spacing
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:36:08 -07:00
Yehuda Sadeh
b69a9599d8 cls_lock: specify librados namespace explicitly
librados namespace was not specified, hence required including
source files to add using namespace. This fixes it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-18 15:35:30 -07:00
Sage Weil
55673babb9 radosgw-admin: fix cli test
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-18 15:28:32 -07:00
Josh Durgin
3372f1471c rbd: only open the destination pool for import
Otherwise importing into another pool when the default pool, rbd,
doesn't exist results in an error trying to open the rbd pool.

Reported-by: Sébastien Han <han.sebastien@gmail.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:21:49 -07:00
Josh Durgin
ad2ba8e606 qa: test args for rbd import
Make sure that --pool/--dest-pool and --image/--dest all work
interchangeably.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:21:43 -07:00
Josh Durgin
d14a31d387 rbd: make --pool/--image args easier to understand for import
There's no need to set the default pool in set_pool_image_name - this
is done later, in a way that doesn't ignore --pool if --dest-pool
is not specified.

This means --pool and --image can be used with import, just like
the rest of the commands. Without this change, --dest and --dest-pool
had to be used, and --pool would be silently ignored for rbd import.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:21:39 -07:00
Josh Durgin
a583a605aa librbd, cls_rbd: close snapshot creation race with old format
If two clients created a snapshot at the same time, the one with the
higher snapshot id might be created first, so the lower snapshot id
would be added to the snapshot context and the snaphot seq would be
set to the lower one.

Instead of allowing this to happen, return -ESTALE if the snapshot id
is lower than the currently stored snapshot sequence number. On the
client side, get a new id and retry if this error is encountered.

Backport: argonaut
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-09-18 15:21:21 -07:00
Sage Weil
a4833bb293 librbd: fix delete[]
CID 716902: Non-array delete for scalars (DELETE_ARRAY)
At (15): Deleting array variable "buf" with non-array delete in "delete buf".

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-18 15:19:47 -07:00
Josh Durgin
3401f004cd doc: clarify rbd man page (esp. layering)
* a clone's size can't be overridden
* note which commands require format 2
* clarify details of copy
* add examples for cloning
* add pool to map example for consistency
* fix a couple warnings and re-sync man page with rst

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:19:17 -07:00
Josh Durgin
582001eb49 rbd: add --format option
This chooses whether to use the original (supported by krbd)
or the new (supports layering) format.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:19:07 -07:00
Josh Durgin
a1124193c2 librbd: prevent racing clone and snap unprotect
If the following sequence of events occured,
a clone could be created of an unprotected snapshot:

1. A: begin clone - check that snap foo is protected
2. B: rbd unprotect snap foo
3. B: check that all pools have no clones of foo
4. B: unprotect snap foo
5. A: finish creating clone of foo, add it as a child

To stop this from happening, check at the beginning and end of
cloning that the parent snapshot is protected. If it is not,
or checking protection status fails (possibly because the parent
snapshot was removed), remove the clone and return an error.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:18:59 -07:00
Dan Mick
e85a238303 rbd: add "children" command, update cli test files
Fixes: #2720
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 15:18:50 -07:00
Dan Mick
bd9405844b librbd: add {rbd_}list_children() methods
These iterate over all pools and check for children of a
particular snapshot.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2012-09-18 15:18:27 -07:00
John Wilkins
f418172e80 Merge branch 'master' of https://github.com/ceph/ceph 2012-09-18 14:17:19 -07:00
John Wilkins
ed18eea47d :doc: Changed rados.gateway to radosgw.gateway. Start with /etc/init.d.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-18 14:16:44 -07:00
Sage Weil
900e4ceb83 workqueue: allow thread pool size to be adjusted dynamically
Allow thread pool sizes to be adjusted on the fly by telling the
ThreadPool which config option to monitor.  Add some basic unit tests
for resizing.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-09-18 14:16:22 -07:00
John Wilkins
5e095ec889 :doc: Trimmed up the stack diagram and fixed a few hyperlink refs.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-18 13:55:18 -07:00
John Wilkins
53508306b3 :doc: Modified hostname to hostname -s.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-18 13:44:16 -07:00
John Wilkins
7c178be1a6 :doc: Modified hostname to hostname -s.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-18 13:43:47 -07:00
John Wilkins
5936ded85a :doc: Modified hostname to hostname -s.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-18 13:43:25 -07:00
Yehuda Sadeh
9b628efee1 Merge branch 'wip-3127'
Conflicts:
	src/rgw/rgw_rados.cc

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-18 13:24:52 -07:00
Yehuda Sadeh
fa93ea117e rgw: fix unused warning message
Remove unused variable.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-18 13:20:06 -07:00
Yehuda Sadeh
496c5d458e rgw: fix uninitialized var in error message
Used the wrong variable in error message.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-18 13:13:48 -07:00
Yehuda Sadeh
6bc1ef0aa2 rgw, cls_rgw: a tool to rebuild bucket stats
radosgw-admin bucket check [--fix] --bucket=<bucket>

The command will dump the existing bucket header stats,
and the calculated bucket header stats. If --fix is provided
the bucket stats will be overwritten by the recalculated
stats.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-18 13:08:56 -07:00
John Wilkins
11b80ae78b :doc: Changed title to RBD from RADOS. Clearer.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-18 13:02:17 -07:00
John Wilkins
9829039eb9 :doc: Made notice to stop i/o a warning. Initial format clean up.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-18 13:01:50 -07:00
John Wilkins
84c50dd8de :doc: Added discussion and stack diagram. Initial format cleanup.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-18 13:00:58 -07:00
John Wilkins
171fcd8133 :doc: Remove legacy usage. Initial format cleanup.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-18 13:00:07 -07:00
Yehuda Sadeh
08e9fc02fe rgw: obj_stat() returns object version (epoch), use it
We now pass the object version returned by obj_stat. We use that
epoch for setting the object version through the index suggestion
mechanism. This was broken by a recent change that switched from
reading the obj stats by (wrongly) calling directly to ioctx->stat()
to calling get_obj_state().

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-18 12:57:05 -07:00