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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
(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>
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>
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>
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>
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>