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>
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>
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>
If we're using omap for spillover, we need to load the xattrs so that
they can be removed if necessary.
Note that we subtly change the failure behavior here to be more
strict: if we can't open the file, we fail, whereas before we did not.
Signed-off-by: Sage Weil <sage@inktank.com>
Adds get_filehandle to Client which resolves a file descriptor or
returns NULL if the file descriptor is invalid. Libcephfs calls that
accept a file descriptor are changed to return -EBADF when
get_filehandle returns NULL.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>