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>
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>
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.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Add isDir(), isFile(), and isSymlink() for read-only tests corresponding
to the S_ISREG test and friends.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Joe Buck <jbbuck@gmail.com>
Fixes: #3400
Removed a few lines of code that prematurely created the head
part of the final object (before creating the manifest).
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
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.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
If the part that we're reading is corrupted and we end up
reading zero bytes, we need to exit, otherwise we'd just
loop forever.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
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.
Signed-off-by: Sage Weil <sage@inktank.com>
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>
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>
If a loop exists in directories due to a symlink: /a/b/c -> /a
We now return -ELOOP from path_walk() instead of looping forever.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
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.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
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.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
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>
Note that we subtly change failure handling to be more strict: if we
fail to open the file, we error out; before we ignored errors from
_getattr().
Signed-off-by: Sage Weil <sage@inktank.com>