Commit Graph

20816 Commits

Author SHA1 Message Date
Mike Ryan
048c7dc4c8 obj_bencher: cleanup files in parallel using aio
Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
2012-08-23 15:52:27 -07:00
Mike Ryan
9e58d1b79b obj_bencher: remove benchmark objects by prefix
This intelligently removes objects from a rados or rest benchmark run by
using parameters from the metadata file.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
2012-08-23 15:52:16 -07:00
Mike Ryan
fab73c3edc obj_bencher: store per-benchmark metadata
Store metadata for each benchmark run so that the objects can be
efficiently removed at a later point.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
2012-08-23 15:52:04 -07:00
Mike Ryan
fb7238eacc obj_bencher: clean up objects after a write benchmark
Per #2477, objects created during rados or rest write benchmark are
automatically cleaned up after the test. They can optionally be left in
place.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
2012-08-23 15:51:39 -07:00
Mike Ryan
4f1b04ca2d obj_bencher: announce prefix during write benchmark
Per #2477 this can be used during a post-benchmark cleanup in rest and
rados bench.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
2012-08-23 15:51:11 -07:00
Mike Ryan
af15ba69c5 librados: implement aio_remove
Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
2012-08-23 13:11:28 -07:00
Sage Weil
cada8a6f02 objecter: use ordered map<> for tracking tids to preserve order on resend
We are using a hash_map<> to map tids to Op*'s.  In handle_osd_map(),
we will recalc_op_target() on each Op in a random (hash) order.  These
will get put in a temp map<tid,Op*> to ensure they are resent in the
correct order, but their order on the session->ops list will be random.

Then later, if we reset an OSD connection, we will resend everything for
that session in ops order, which is be incorrect.

Fix this by explicitly reordering the requests to resend in
kick_requests(), much like we do in handle_osd_map().  This lets us
continue to use a hash_map<>, which is faster for reasonable numbers of
requests.  A simpler but slower fix would be to just use map<> instead.

This is one of many bugs contributing to #2947.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-23 11:53:59 -07:00
Sage Weil
b207b15f17 cephfs: add 'map' command to dump file mapping onto objects, osds
Closes: #3010
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-22 17:23:10 -07:00
Sage Weil
0f9f63ab4b perf-watch: initial version
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-22 17:22:58 -07:00
Tommi Virtanen
a5901c6d6c doc: Either use a backslash and a newline, or neither.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-22 10:50:22 -07:00
Sage Weil
59dbf5998c Merge remote-tracking branch 'gh/wip-crypto' 2012-08-21 15:47:57 -07:00
Sage Weil
8f95c1fa8f config: remove dead osd options
The read balancing/shedding stuff is old.  Same goes for class timeouts and
the raid options.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-21 13:24:55 -07:00
Dan Mick
bfb24a7059 Fix compilation warnings on squeeze; can't printf() snapid_t directly 2012-08-21 11:57:38 -07:00
Sage Weil
bb1e65eb45 rgw: use sizeof() for snprintf
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-21 11:01:11 -07:00
Sage Weil
9883da6960 Merge branch 'next' 2012-08-21 10:51:54 -07:00
Sage Weil
4a0704e64a osd: fix requeue order for waiting_for_ondisk
We are calling requeue_ops() on each individual op, which means we need
to requeue in reverse order (newest first, oldest last).

Fixes: #2947
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-21 10:48:48 -07:00
Yehuda Sadeh
1a09423e27 rgw: dump content_range using 64 bit formatters
Fixes: #2961
Also make sure that size is 64 bit.

backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-08-21 10:48:48 -07:00
Sage Weil
ddbef4750c Revert "rgw: dump content_range using 64 bit formatters"
This reverts commit cc435e9980.

Wrong fix; fcgi doesn't do %lld
2012-08-21 10:48:48 -07:00
Sage Weil
2e8689a499 mon: fix monitor cluster contraction race
If we contract to 1 monitor, we win_standalone_election() without bumping
the election epoch.  Racing paxos updates can then reach us without being
ignored and trigger an assert:

mon/Paxos.cc: In function 'void Paxos::handle_accept(MMonPaxos*)' thread 7f85eae05700 time 2012-08-20 16:01:00.843937
mon/Paxos.cc: 468: FAILED assert(state == STATE_UPDATING)

Fixes: #3003
Reported-by: John Wilkins <john.wilkins@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-21 09:03:33 -07:00
Dan Mick
81694c39d0 Add manpage sections for flatten, snap {un}protect
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: John Wilkins <john.wilkins@inktank.com>
2012-08-20 18:14:29 -07:00
Tommi Virtanen
6a9bcc09a3 mkcephfs, init-ceph: Warn if hostname "localhost" is seen in ceph.conf.
Given a ceph.conf that looks like

  [osd.42]
  host = localhost

mkcephfs used to exit with an obscure error message:

  cat: /tmp/mkcephfs.MCBIHvn4Ru/key.*: No such file or directory

"localhost" was never intended to be a valid hostname to use there.
Warn if we see it, and skip the entry. You should use the proper short
hostname of the box.

As init-ceph and mkcephfs share this library, this change affects the
sysvinit scripts too. The behavior *shouldn't* change there (localhost
entries were ignored earlier, too), but you may see this extra
warning. Which is good.

Closes: #3001
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-20 17:16:41 -07:00
tamil
5ad013b575 "Removed 274 from xfstests"
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2012-08-20 16:53:18 -07:00
Dan Mick
5642a5ee2b test_rbd.py: remove clone before image it depends on
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-08-20 16:27:49 -07:00
Yehuda Sadeh
cc435e9980 rgw: dump content_range using 64 bit formatters
Fixes: #2961
Also make sure that size is 64 bit.

backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-08-20 15:37:18 -07:00
Sage Weil
9cb60d1dc2 Merge branch 'next' 2012-08-20 15:04:45 -07:00
Sage Weil
dd4c1dc9f9 osd: fix requeue order of dup ops
The waiting_for_ondisk (and ack) maps get dups of ops that are in progress.
If we have a peering change in which the role does not change, we will
requeue the in-progress ops but leave these in the waiting_for_ondisk
maps, which will then trigger an assert the next time we examine that map
and find it didn't match up with what we expected.

Fix this by requeuing these on any peering reset in on_change().  This
keeps the two queues in sync.

Fixes: #2956
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-20 15:04:37 -07:00
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
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