It is probably unlikely that someone will expand the mon cluster with a
mixed feature set, but we know the quorum features here, so we should use
them.
Signed-off-by: Sage Weil <sage@inktank.com>
If the quorum does not yet all have the MONENC feature, stick to the old
encoding.
It might be more polite to require a super-quorum before switching over,
and take note so that thereafter we can stick to the new encoding, but
that has more moving parts and I'm not sure it's worth the complexity.
Signed-off-by: Sage Weil <sage@inktank.com>
When we form a quorum, also note the intersection of the quorum members'
feature bits. This will inform decisions about what encodings we use.
This is an imperfect strategy because the quorum may change, and we may
have a mon with old code join in and not understand what is going on.
However, it does ensure that a majority of the members run new code, so in
the absence of other failures we can make progress.
Signed-off-by: Sage Weil <sage@inktank.com>
upstart doesn't let you wildcard all instances of a given job, so we
slog through initctl list output, and reload any running daemons.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Tommi Virtanen <tv@inktank.com>
This was an ill-conceived approach to getting atomic transactions out of
btrfs. It doesn't offer rollback, which means that any error means we need
to wedge the file system and reboot in order to avoid corrupting the
data set. And that's silly!
Snapshots are more robust and only marginally slower (because we have to
quiesce our writes while waiting for the snap to start, and btrfs resume
work in-kernel slightly faster...maybe).
Fixes: #2623
Signed-off-by: Sage Weil <sage@inktank.com>
The use of 'size' to describe the amount that we overlap with the parent
was confusing; overlap is more intuitive (to me, at least!).
Signed-off-by: Sage Weil <sage@inktank.com>
Two things:
* when we set a parent, the overlap is the min of our size and the
parent's size.
* when we resize, our overlap may shrink.
Signed-off-by: Sage Weil <sage@inktank.com>
You need to set the feature on the image before you can use these methods.
We *could* allow get_parent, but that just means they'll get ENOENT instead
of ENOEXEC, and the latter is more informative.
Signed-off-by: Sage Weil <sage@inktank.com>
For operations that are done on the service (e.g., list buckets)
we need to log the user that did the operation, and not the bucket
owner.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This spams stderr in an ugly way. Users should look at the logs.
In particular, filestore upgrades spam the console, which is unpleasant.
Signed-off-by: Sage Weil <sage@inktank.com>
07f853db39 is actually too conservative,
it suffices to find any info with a last_update of at least the least
last_update from the last period to go active. An info from a previous
interval is acceptable if the last interval never reported a commited
operation and thus still has the same last_update.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
- incremental seq each request
- set last to the last completed seq
- drop the now-redundant bool
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
If we are sending log updates to a client (ceph -w), and they are far
enough behind to drop behind first_committed, include a friendly message
in their stream but continue.
Drop useless return value from _create_sub_incremental(). Assert that we
can read the state file.
Signed-off-by: Sage Weil <sage@inktank.com>