Joe Buck [Fri, 2 Nov 2012 05:26:34 +0000 (22:26 -0700)]
Changing build.xml to produce a jar instead of class files Adding a
TestSuite class to run all tests
Remove the libcephfs-test.jar when running ant clean
Signed-off-by: Joe Buck <jbbuck@gmail.com> Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
Joe Buck [Fri, 2 Nov 2012 00:14:10 +0000 (17:14 -0700)]
Moving test java files into a proper heirarchy. Moving the compilation
of tests classes from build.xml to Makefile and editing configure.ac to
look for the junit4 jar in the default location of /usr/share/java. It
is still possible to build and run tests from build.xml as well as
Makefile.
Signed-off-by: Joe Buck <jbbuck@gmail.com> Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
Mike Ryan [Fri, 5 Oct 2012 21:37:34 +0000 (14:37 -0700)]
pg: recovery reservations
This extends the backfill reservation system to work with log-based
recovery. The Active and RepActive states of the PG state machine are
greatly expanded to deal with the increased complexity of handling both
recovery and backfill reservations.
Samuel Just [Mon, 29 Oct 2012 22:35:09 +0000 (15:35 -0700)]
osd/: add pool min_size parameter for min acting set size
Otherwise, a pg might go active with a single osd in the
acting set. If that osd subsequently dies, we potentially
loose client writes. Note: it's still possible for the
acting set to exceed min_size but fail to obey the spirit
of the user's crush settings (e.g., min_size is 2, but both
osds happen to be no the sam node).
Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil: <sage@inktank.com>
Dan Mick [Tue, 6 Nov 2012 23:28:10 +0000 (15:28 -0800)]
cls_rbd: send proper format of key to "last_read" for dir_list
rbd ls of format-2 images was looping on the first 64 (when more than 64
were present). The key name passed to the omap layer needs to always
contain the prefix, and the "inside-the-loop next-chunk" statement
was missing the "add the prefix" call.
Also, add a test for listing 100 images, format 1 and 2.
Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Yehuda Sadeh [Mon, 29 Oct 2012 23:46:21 +0000 (16:46 -0700)]
rgw: resolve hostname dns cname record
Implements #3206
This allows using vanity domains. A CNAME record can now
be set for the domain that would point at the rgw instance,
with or without a bucket set as a subdomain.
Yehuda Sadeh [Wed, 24 Oct 2012 19:56:59 +0000 (12:56 -0700)]
rgw: don't reset multipart parts when updating their metadata
Fixes: #3401
The problem was that put_obj_meta() was assuming object is going
to be reset, so it was resetting the object anyway. This is not
true when dealing with the immutable multipart upload parts.
Sage Weil [Tue, 6 Nov 2012 07:27:13 +0000 (23:27 -0800)]
mds: move to from loner -> mix if *anyone* wants rd|wr
We were either going to MIX or SYNC depending on whether non-loners wanted
to read/write, but it may be that the loner wants to if our logic for
choosing loner vs not longer is based on anything other that just rd|wr
wanted.
Dan Mick [Tue, 6 Nov 2012 00:13:19 +0000 (16:13 -0800)]
rbd: allow removal of image even if rbd_children deletion fails
Users have been seeing failures where rbd rm is half-done; could be
because of outstanding watches on the rbd_header object. The state
is that rbd_children no longer contains the child, but other pieces
remain; remove considers this a failure.
Fix: test for ENOENT from remove_child, and treat that as an ignorable
error and drive on. Simulate this in copy.sh by removing the
rbd_children object altogether, which also results in ENOENT return
from remove_child.
Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Dan Mick [Tue, 6 Nov 2012 00:13:19 +0000 (16:13 -0800)]
rbd: allow removal of image even if rbd_children deletion fails
Users have been seeing failures where rbd rm is half-done; could be
because of outstanding watches on the rbd_header object. The state
is that rbd_children no longer contains the child, but other pieces
remain; remove considers this a failure.
Fix: test for ENOENT from remove_child, and treat that as an ignorable
error and drive on. Simulate this in copy.sh by removing the
rbd_children object altogether, which also results in ENOENT return
from remove_child.
Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Sam Lang [Mon, 5 Nov 2012 21:45:28 +0000 (15:45 -0600)]
client: Fix path_walk() to support dir symlinks
Additions to Sage's commits that replace the path walked so
far with the symlinked directory path, rather than the remainder
of the path to walk. This allows the dir symlink tests to
succeed.
Sam Lang [Mon, 5 Nov 2012 15:15:21 +0000 (09:15 -0600)]
test: Add tests for symlink pathological cases
The DirSyms test checks verifies that the new path_walk()
handling code properly walks through symlinked directories
even if the followsym flag is false.
The LoopSyms test checks that we correctly handle symlink
loops, where /a/b/c points back to /a.
Samuel Just [Fri, 2 Nov 2012 20:02:15 +0000 (13:02 -0700)]
PG: use remove_object_with_snap_hardlinks for divergent objects
Otherwise, we end up leaving snap hardlinks in the snapshot
index directories. This eventually results in an EEXIST error
when we attempt to re-link the clone into place during
recovery.
Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>