Commit Graph

20841 Commits

Author SHA1 Message Date
Sage Weil
6ae216e50e osd: fix warning
signed/unsigned comp

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-20 13:30:50 -07:00
Travis Rhoden
60fdb6fda6 init-ceph: use SSH in "service ceph status -a" to get version
When running "service ceph status -a", a version number was never
returned for remote hosts, only for the local.  This was because
the command to query the version number didn't use the do_cmd
function, which is responsible for running the command over SSH
when needed.

Modify the ceph init.d script to use do_cmd for querying the
Ceph version.

Signed-off-by: Travis Rhoden <trhoden@gmail.com>
2012-08-20 13:29:11 -07:00
Travis Rhoden
5c70392720 doc: mkcephfs man page, -c ceph.conf is not optional
[ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "ANSI_X3.4-1968" character set.  ]
    [ Some characters may be displayed incorrectly. ]

The man page for mkcephfs and the output of mkcephfs --help
do not agree with each other.  the man page says -c ceph.conf
is optional, while mkcephfs --help says it is required.

Through empirical evidence, I believe it is required.  Update
the man page to make it so.

Signed-off-by: Travis Rhoden <trhoden@gmail.com>
2012-08-20 13:26:06 -07:00
Sage Weil
7e417bd801 osd: make notify debug output less noisy
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-20 13:23:21 -07:00
Sage Weil
5e761b4e15 mds: do not return null dentry lease on getattr
Specifically, /foo may exist and client may try to mount /foo/bar.  That
GETATTR request is on #1/foo/bar, but we cannot return a null dentry on bar
because the client is not prepared to handle it and will crash in
fill_trace().

Fixes: #2959
Reported-by: Yan Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-20 12:47:16 -07:00
Sage Weil
19ea31268b mon: add MonitorStore::sync()
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-20 11:07:35 -07:00
Sage Weil
bfd046e003 Merge remote-tracking branch 'gh/wip-rbd-layer' 2012-08-20 10:49:31 -07:00
Sage Weil
223d6fa8df crypto: cache CryptoHandler in CryptoKey
This avoids a call into cct and a switch to get the handler every time.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-20 10:19:18 -07:00
Sage Weil
cfe211af13 doc: fix key export syntax
'ceph auth export mon.' no longer works as a side-effect of switching
around the mon. key handling.  'get' works, though; use that for now.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-20 09:15:01 -07:00
Dan Mick
ecd279f4af Merge branch 'wip-rbd-layering'
Conflicts:
	src/librbd/internal.cc
2012-08-17 19:29:13 -07:00
Dan Mick
f9653589af Roll up loose ends from a marathon merge/rebase session
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-08-17 18:56:37 -07:00
Dan Mick
380b04768e Review:
standardize on "*_id" form of variable names
log errors in parameter decode in rbd_children methods
whitespace, assert -> comment
2012-08-17 18:48:22 -07:00
Dan Mick
5a295c85ca librbd: snap_protect: verify layering is supported 2012-08-17 18:48:13 -07:00
Dan Mick
2b6863ecdc librbd: review: don't call to the OSD to get current protection status 2012-08-17 18:48:07 -07:00
Dan Mick
f38dd48893 test_rbd.py: actually make unprotect_with_children work, and clean up 2012-08-17 18:48:00 -07:00
Dan Mick
491bd8d87a librbd: change EINVAL to EBUSY on "can't unprotect because children exist"
Add pool, number of children in this pool that caused failure to log
2012-08-17 18:47:52 -07:00
Dan Mick
ff60940a38 review: librbd, test_librbd: make "protect protected snap" fail 2012-08-17 18:47:45 -07:00
Dan Mick
e21bac9845 Update protection methods to use parent_spec, parent_types.h, etc. 2012-08-17 18:47:34 -07:00
Dan Mick
bd2e7513e5 test_rbd: add test for denying removal of protected parent 2012-08-17 18:47:24 -07:00
Dan Mick
bef9180a3a get_features requires md_lock and snap_lock to be held 2012-08-17 18:47:17 -07:00
Dan Mick
c729e15a01 librbd: clone return codes: ENOSYS for no layering, EINVAL for no prot 2012-08-17 18:47:11 -07:00
Dan Mick
27a4dea555 librbd, test_librbd: snap_unprotect: refuse if children still exist 2012-08-17 18:47:02 -07:00
Dan Mick
5ffbeaa31e Merge branch 'wip-rbd-protect' into more-rebasing
Conflicts:
	src/librbd/ImageCtx.cc
	src/librbd/SnapInfo.h
	src/librbd/internal.cc
	src/test/rbd/test_cls_rbd.cc
2012-08-17 18:42:04 -07:00
Dan Mick
460242d31f test_cls_rbd: get_parent with no parent: should fail and return null-pspec 2012-08-17 18:31:51 -07:00
Dan Mick
1b32d78a5a librbd: cause add_child/remove_child to treat duplicate ops as errors 2012-08-17 18:31:51 -07:00
Dan Mick
53868a96e9 librbd: review: add helper for 'scanning snapshots for this parent' 2012-08-17 18:31:51 -07:00
Dan Mick
2ca8fb210a librbd: review: change get_snapinfo to get_parent_spec 2012-08-17 18:31:51 -07:00
Dan Mick
31824b680b librbd, cls_rbd: move parent_info and parent_spec to parent_types.h
parent_type.h is a new librbd-scope header containing info
related to parents and children (clones)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-08-17 18:31:51 -07:00
Dan Mick
9a45ffb769 librbd: memcpy object_prefix must copy terminating NUL 2012-08-17 18:31:51 -07:00
Dan Mick
c0c29f88a5 librbd: remove: keep ictx open until snapshots are scanned 2012-08-17 18:31:51 -07:00
Dan Mick
2382425b92 Review: change to look for parent across base and all snapshots,
and remove only if not present in any of them.
2012-08-17 18:31:51 -07:00
Dan Mick
dc1e26f04b Enhance add/remove child tests 2012-08-17 18:31:51 -07:00
Dan Mick
f1fc2b4231 get_parent on non-layered image no longer fails; remove test case 2012-08-17 18:31:51 -07:00
Dan Mick
d09e0e2c05 Add struct parent_spec
Holds poolid,imageid,snapid triple identifying parent
Allows for equality comparison of parents
2012-08-17 18:31:51 -07:00
Dan Mick
80d4d38e11 poolid should be signed 2012-08-17 18:31:51 -07:00
Dan Mick
a09052f94a run-rbd-tests: prefer local binaries over $PATH
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-08-17 18:31:51 -07:00
Dan Mick
fd60416fcd librbd: snap_set and open_image need to refresh parent info 2012-08-17 18:31:51 -07:00
Dan Mick
2dc751e793 librbd: Manipulate rbd_children in flatten, clone, remove, snap remove 2012-08-17 18:31:50 -07:00
Dan Mick
397285a413 librbd: make get_parent_info look at snapshot-specific info when needed 2012-08-17 18:31:50 -07:00
Dan Mick
cb74233128 Fix some trailing spaces on lines
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-08-17 18:31:50 -07:00
Dan Mick
767fdf1cba rados: allow listomapvals to dump keys with nonprintable characters
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-08-17 18:31:50 -07:00
Dan Mick
93fed220d5 cls_rbd, cls_rbd_client: add/remove/get children
Manipulate the new rbd_children object, which holds mappings between
parent snapshots and their children clone images

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-08-17 18:30:10 -07:00
Sage Weil
9b1df33abc Merge remote-tracking branch 'gh/master' into wip-auth
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>  (rbd bits)
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-08-17 16:51:46 -07:00
Sage Weil
fefdf284f6 rbd: warn on 0-length secret
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:51:16 -07:00
Sage Weil
4ce0a516f6 doc: properly document 'rbd map' without touching sysfs
Fixes: #2670
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:51:16 -07:00
Sage Weil
b403db197e rbd: update man page to avoid deprecated --secret, --user
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:51:16 -07:00
Sage Weil
2a36873d2e rbd: use generic options, keyring for 'rbd map'
Switch usage over to the normal options, and use the normal EntityName
and keyring inputs for 'rbd map'.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:51:15 -07:00
Sage Weil
e0b094b9ff keyring: make --key, --keyfile override loaded keyring
This way --key, --keyfile still work when a keyring is in the default
search path.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:51:15 -07:00
Sage Weil
7b57931ba5 config: make --user a synonym for --id
This grandfathers in rbd usage.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:51:15 -07:00
Sage Weil
ae57db03a9 Merge remote-tracking branch 'gh/bug-2958'
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-17 16:21:37 -07:00