Commit Graph

22274 Commits

Author SHA1 Message Date
Sage Weil
23531c297a osd: add 'osd debug drop op probability'
This is meant to exercise the kclient's timeout and osd reconnect logic
by dropping some client requests on the floor.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-12 12:04:34 -08:00
Sage Weil
efa03cef5e mon: require pgnum in 'ceph osd pool create <poolname> <pgnum> [<pgp_num>]' command
The default of 8 is virtually never the right answer.  Require the initial
pg count to be explicitly provided.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-12 12:01:07 -08:00
Josh Durgin
cda9e516b8 librbd: return actual error when detecting format fails during creation
This bit a couple users today, when bad osd caps resulted in a very
confusing error message.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-11-12 11:16:21 -08:00
Josh Durgin
ca9f93aa37 Merge remote branch 'origin/wip-rbd-read'
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-11-12 10:41:35 -08:00
Sage Weil
a1b950e6e9 Merge remote-tracking branch 'gh/wip-client-symlinks'
Reviewed-by: Sam Lang <sam.lang@inktank.com>
2012-11-12 11:08:46 -08:00
Noah Watkins
3d76e67730 java: add symlink/readlink tests
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2012-11-12 10:45:26 -08:00
Sage Weil
6dd7925254 test_libcephfs: fix, add symlink loop tests
The first test did

 /a/b/file
 /a/b/sym -> /a/b

and opened /a/b/sym/file, which is valid.  Change it to

 /a/b/file
 /a/b/sym -> /a/b/sym

which is not.

Add another test that does

 /a -> /b
 /b -> /c
 /c -> /a

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-12 10:07:49 -08:00
Sage Weil
3902a01843 debug: adjust default debug levels
Trim out most noise, keep things that are interesting.

Notably, we are logging each message sent and received, and we are logging
the filestore operations when they get queued.  Those may still benefit
from being turned off in high IOPS environments.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-12 08:56:45 -08:00
Sage Weil
b17522d7ae Merge branch 'next' 2012-11-10 02:40:33 -08:00
Sage Weil
a56c1ca3b3 Merge branch 'wip-client-leaks' into next 2012-11-10 02:38:26 -08:00
Sage Weil
6c0be020c0 client: simplify/fix symlink loop check
Checking that we visit a symlink isn't correct; for example, the below is
valid, and we visit /b twice.

 /a/b -> c
 /a/c/d -> /a/b

In order to do this "correctly", I think we would need to track the pairs
of paths and symlinks we are resolving.  But, reading the man pages,
ELOOP is actually just defined as traversing more than MAXSYMLINKS syms.
(It appears to be 20 on my machine.)

Just do that instead.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-10 02:35:04 -08:00
Sage Weil
d037ff4ca1 client: fix path_walk for directory symlinks
Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-10 02:14:02 -08:00
Josh Durgin
cd144534e9 OSDMonitor: remove max_devices and max_osd interdependency
Higher max_osd than max_devices doesn't hurt anything (and is the
normal way to add more osds). Higher max_devices than max_osds are
filtered out of crush results since e541c0f8d871172ec61962372efca943308e5fe,
so they don't matter either.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-11-10 01:42:09 -08:00
Sage Weil
ae1f46c3b5 mds: re-try_set_loner() after doing evals in eval(CInode*, int mask)
Consider a case where current loner is A and wanted loner is B.
At the top of the function we try to set the loner, but that may fail
because we haven't processed the gathered caps yet for the previous
loner.  In the body we do that and potentially drop the old loner, but we
do not try_set_loner() again on the desired loner.

Try after our drop.  If it succeeds, loop through the eval's one more time
so that we can issue caps approriately.

This fixes a hang induced by a simple loop like:

 while true ; do echo asdf >> mnt.a/foo ; tail mnt.b/foo ; done &
 while true ; do ls mnt.a mnt.b ; done

(The second loop may not be necessary.)

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-10 01:38:15 -08:00
Dan Mick
4b94e83fc9 Merge branch 'next'
Pull in types.h fix
2012-11-09 19:35:12 -08:00
Dan Mick
07b4f8fa0a si_t was not properly converting values < 100KB
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-11-09 19:26:42 -08:00
Sage Weil
8f49de0fb1 osdc/ObjectCacher: only call flush callback if we transitions to clean
If we race with e.g. truncate and are in bh_write_commit but the oset
is already clean, we should not call the flush callback (again).

This is reproduced by:

 - kludging slow osd replies into the code (e.g., 2 second delay)
 - mount ceph-fuse with --client-oc-max-dirty-age 1
 - dd if=/dev/zero of=mnt/foo count=1
   sleep 1
   truncate --size 0 mnt/foo
 -> crash

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 18:34:22 -08:00
tamil
0cfe6320a8 cleaned up scripts
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2012-11-09 17:55:32 -08:00
Sage Weil
54f6c17ae3 client: ensure we don't leak MClientReply
We are careful to clear this reference when processing it.

Add an assert here.  There's no way we can get 2 quick replies because
of the kick-back below.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 16:03:20 -08:00
Sage Weil
a8053c10d9 ceph-fuse: fix leak of args
Also fix up the helper we use to have fewer sharp edges.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 16:03:20 -08:00
Sage Weil
b305fc8735 osdc/ObjectCacher: fix leak on readahead
If we initiate io (success == false) but have no waiter, we need to
delete the OSDRead.

This affects libcephfs/ceph-fuse, but not librbd, which does no readahead.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 16:03:20 -08:00
Gary Lowell
1c9ec26eea ceph.spec.in: Build debuginfo subpackage.
This is a partial fix for bug 3471.  Enable building of debuginfo package.
Some distributions enable this automatically by installing additional rpm
macros, on others it needs to be explicity added to the spec file.
2012-11-09 13:28:13 -08:00
Josh Durgin
de2cd18c3d test: add cli test for missing args to rbd
This includes 'rbd mv foo', which used to crash

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-11-09 12:17:50 -08:00
Josh Durgin
34ebda2bab rbd: check for second argument to mv/rename
Without this check, 'rbd mv foo' crashed trying to use a NULL char* as
a string.

Reported-by: Andrey Korolyov <andrey@xdel.ru>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-11-09 12:17:50 -08:00
Josh Durgin
9aae0eeaa7 rbd: check for second argument to mv/rename
Without this check, 'rbd mv foo' crashed trying to use a NULL char* as
a string.

Reported-by: Andrey Korolyov <andrey@xdel.ru>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-11-09 12:11:20 -08:00
Sam Lang
f1e67d5ccc Merge branch 'wip-java-test' 2012-11-09 13:52:07 -06:00
Joe Buck
5ef16edbc3 test.sh: Adding LD_LIBRARY_PATH so JUnit can find .so files.
Removing useless java.library.path references.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
2012-11-09 11:43:11 -08:00
Samuel Just
9e9feffa2e doc/cluster-ops/pools.rst: Added documentation for min_size
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-11-09 11:34:54 -08:00
Sage Weil
b5ce4d0ed7 client: fix SnapRealm leak
Start ref count at 0; get_snap_realm() will increment it after alloc.

Fix the ref drop order so that the xlist is empty.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 10:12:21 -08:00
Sage Weil
56a152b1f2 client: debug SnapRealm reference counting
Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 10:09:53 -08:00
Noah Watkins
a34a9af060 vstart: allow minimum pool size of one
A minimum pool size of 2 was introduced by 13486857cf. This sets the
minimum to one so that basic vstart environments work.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-11-09 10:08:36 -08:00
Sage Weil
88cdde37d1 client: fix leak of Cap
Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 10:02:59 -08:00
Sage Weil
5e564f9b7f client: fix leak of session release msg on session close
Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 10:01:48 -08:00
Sage Weil
c352edd328 client: only start invalidator thread if cb != NULL
Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 09:59:39 -08:00
Sage Weil
44a7017868 ceph-fuse: deallocate messenger, g_ceph_context on stop
This lets us use valgrind to find leaks.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 09:52:08 -08:00
Joao Eduardo Luis
fe6e4265f2 doc: add-or-rm-mons.rst: fix a formatting typo
(also forgot the John's reviewed-by on the last commit)

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: John Wilkins <john.wilkins@inktank.com>
2012-11-09 17:36:50 +00:00
Joao Eduardo Luis
5b32664aad doc: add-or-rm-mons.rst: make paths clearer
Some users have been incurring into problems adding new monitors while
following these steps. Some of these problems are due to the meaning of
'{path}' being a bit ambiguous. This patch removes said ambiguity by
replacing '{path}' with '{tmp}', supposed to be a temporary directory
containing the files necessary to add the monitor (monmap and keyring).

Fixes: #3438 #3463

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-11-09 17:12:11 +00:00
Sage Weil
66e6a63608 client: give get_caps() out-arg a less confusing name
No functional change.

Call this arg "have" and not "got", since we only take a ref on what we
need.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 07:38:42 -08:00
Sage Weil
ad4bd4e23e client: do not gratuitously drop FILE_CACHE ref in _read()
The get_caps() had a confusing out-arg called "got" that is really what
caps we *have*; it only takes a ref on the *need* cap.  We should only
put that one explicitly (CEPH_CAP_FILE_RD).  The _write() method already
does this properly, but _read() did not.

Fixes: #3470
Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 07:38:42 -08:00
Sage Weil
128fed8e17 client: assert cap refs don't go negative
This is the root cause of #3470.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-09 07:38:42 -08:00
Dan Mick
e90433855e Merge branch 'next' 2012-11-08 19:28:38 -08:00
Samuel Just
a183fe7404 OSDMap.cc: Add pool name to OSDMap dump
Otherwise, we can't use ceph osd dump --format=json to map pool name
onto pool id.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-11-08 17:22:31 -08:00
Dan Mick
faf23caa6a rbd: fix snap unprotect, which was succeeding while clones existed
1) use right snap id when forming parent spec to search for children
2) add test case for "unprotect with extant children"

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-11-08 17:14:22 -08:00
tamil
c45a415ced script clean up
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2012-11-08 16:06:04 -08:00
tamil
9ea95a0e0b Added a function get_cmd_op
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2012-11-08 15:53:28 -08:00
Gary Lowell
ff5ee98f1c build: Add RPM release string generated from git describe.
Fix for bug 3451.  Use the commit count and sha1 from git describe to
construct a release string for rpm packages.
2012-11-08 12:43:24 -08:00
John Wilkins
8db7d2c436 Merge branch 'master' of https://github.com/ceph/ceph 2012-11-08 11:59:30 -08:00
John Wilkins
82ebbaba31 doc: Clarified text to reflect requirement for majority, not odd number of monitors.
fixes: 3464

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-11-08 11:59:15 -08:00
Sage Weil
8daecaf972 Merge remote-tracking branch 'gh/wip-fix-symlinks'
Conflicts:
	qa/qa_scripts/load-bucket-1000-obj.pl
	src/test/libcephfs/test.cc
2012-11-08 11:45:01 -08:00
Sage Weil
9dcc8a3b2e Merge remote-tracking branch 'gh/wip-mds' 2012-11-08 11:40:36 -08:00