This does not appear to be very accurate; probably the stat values we're
displaying are not being calculated correctly.
Signed-off-by: Sage Weil <sage@inktank.com>
Add new configurable 'mon osd down out subtree limit' so that you can
prevent marking out an entire subtree. If for example an entire rack is
down, do not mark anything in it out. If less than the whole rack is down,
everything is fair game.
Set the default to 'rack'.
Signed-off-by: Sage Weil <sage@inktank.com>
Implement two methos to see if an entire subtree is down, and if the
containing parent node of type T of a given node is completely down.
Signed-off-by: Sage Weil <sage@inktank.com>
Use ! for clarity when commands are supposed to fail.
Check a few other cases that should fail, and correct deleting
non-existent pools.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Fix printf format for off_t and size_t to print the same on 32 and 64bit
systems. Use PRI* macros from inttypes.h.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix usage of conn->want and FUSE_CAP_BIG_WRITES. Both need libfuse
version >= 2.8. Encapsulate the related code line into a check for
the needed FUSE_VERSION as already done in ceph-fuse in some cases.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Check for fuse_getgroups() only in case we have found libfuse already.
Moved the check to the check for --with-fuse.
Small fix: fix string for NO_ATOMIC_OPS, don't use "'".
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix compiler warning:
./include/utime.h: In member function 'void utime_t::sleep()':
./include/utime.h:139:50: warning: narrowing conversion of
'((utime_t*)this)->utime_t::tv.utime_t::<anonymous struct>::tv_sec' from
'__u32 {aka unsigned int}' to '__time_t {aka long int}' inside { } is
ill-formed in C++11 [-Wnarrowing]
./include/utime.h:139:50: warning: narrowing conversion of
'((utime_t*)this)->utime_t::tv.utime_t::<anonymous struct>::tv_nsec' from
'__u32 {aka unsigned int}' to 'long int' inside { } is
ill-formed in C++11 [-Wnarrowing]
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
The initial timecheck implementation relied on a cleanup function to
clean the state each time we changed epochs (or we got out of quorum),
and we would have to clean up the state in-between rounds in a potentially
confusing way some time down the line.
This patch creates logic boundaries in the code flow, making it clear
where we set up or clear the state when we start or finish an epoch, and
where we set up or clear the round state in-between rounds. It also
allowed for some other changes in behavior, such as when we set-up the
timecheck event, or when we cancel it. Despite the slight increase in
size, the mechanism just got more easily understandable than it was before.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Failure to do so will mean that we will always ack the same leader during
an election started by another monitor. This had been working so far
because we were still acking the existing leader if he was supposed to
still be the leader; or we were acking a new potentially leader; or we
would eventually fall behind on an election and start a new election
ourselves, thus resetting the previously acked leader. While this wasn't
something that mattered much until now, the timechecks code stumbled into
this tiny issue and was failing hard at completing a round because there
wouldn't be a reset before the election started -- timechecks are bound
to election epochs.
Fixes: #3854
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Use git to get RPM_RELEASE only if this is a git repo
clone and if the git command is available on the system.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Require that the pool name be passed twice along with an force option
before we irreversibly delete an entire pool of objects.
Signed-off-by: Sage Weil <sage@inktank.com>
This reverts commit c993ac9b1f.
This is too hard to test. Requiring the pool name twice along with
--yes-i-really-really-mean-it should be sufficient.
Signed-off-by: Sage Weil <sage@inktank.com>
Currently written in C on FUSE hi-level interfaces, so error reporting
could be better. No serious work done for performance. But it's
usable as it stands.
Specify -c <conf> and a mountpoint, and images show up as files in
that mountpoint. You can create new images; they'll be created
with attributes stored in xattrs:
user.rbdfuse.imagesize: default 1GB
user.rbdfuse.imageorder: default 22
user.rbdfuse.imagefeatures: default 1 (layering)
Images may be truncated or extended by rewriting. Currently
once an image is opened, it's not closed, so it can't be deleted
or changed outside of the fuse path.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Something like v1.5 of the Amazon PHP library requires the AmazonS3
constructor to be given an array of parameters rather than using
the globals. More research needs to happen, and particularly
about the v2 API, but this might solve someone's problem with
v1.5 while we do that research.
Signed-off-by: Dan Mick <dan.mick@inktank.com>