| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise our keyring default location, or any other similarly formatted
location, will be taken as the actual location for the keyring and fail.
Reported-by: tziOm (at) #ceph
Fixes: 3276
Backport: argonaut
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 7ef0df25e001bfae303feb3ae36514608767b1f2)
|
|
|
|
|
|
|
|
|
|
| |
If paxos resets, do not send the reply for the commit we were waiting for;
let the command be reprocessed and re-proposed.
Among other things, this could lead to nondeterministic results for
'ceph osd create <uuid>'.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* simple helper to translate name to id
* verify sub type is valid in caller
* assert sub type is valid in method
* simplify iterator usage
Among other things, this gets rid of this noise in the logs:
2012-07-10 20:51:42.617152 7facb23f1700 1 mon.a@1(peon).log v310 check_sub sub monmap not log type
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
|
| |
If mon_host fails to parse, return an error instead of success.
This avoids failing later on an assert monmap.size() > 0 in the
monmap in MonClient.
Fixes: #2913
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
|
|
|
|
|
|
|
|
| |
This ensures that when a new osd reclaims that id it behaves as if it were
really new.
Backport: argonaut
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is possible for a .new file to already exist, potentially with a
larger size. This would happen if:
- we were proposing a different value
- we crashed (or were stopped) before it got renamed into place
- after restarting, a different value was proposed and accepted.
This isn't so unlikely for the log state machine, where we're
aggregating random messages. O_TRUNC ensure we avoid getting the tail
end of some previous junk.
I observed #2593 and found that a logm state value had a larger size on
one mon (after slurping) than the others, pointing to put_bl_sn_map().
While we are at it, O_TRUNC put_int() too; the same type of bug is
possible there, too.
Fixes: #2593
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
|
|
| |
This could cause us to incorrectly encode new features into the monstore
that an old mon won't understand.
This is overly conservative; we probably need to persist the set of quorum
features that are supported and use those.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
| |
Ensure the new pool name doesn't already exist, both in the current and
project map.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
|
|
| |
Fixes a bug triggered by using the ceph tool to 'mon add' with a port set
to zero. We now default to the monitor's default port (6789) instead, and
we will fail if that port is already assigned to some other monitor.
Fixes: bug #2661
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
|
|
|
|
|
| |
They aren't prepared to deal with the on-disk state being inconsistent.
Signed-off-by: Greg Farnum <greg@inktank.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
The only time we encode these is when forwarding messages. Encoding using
the destination's feature set.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
| |
This allows a mon cluster to transition to the new encoding during a
rolling upgrade.
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>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we encounter a 'key=' with no value, clear any previous value for that
key, so that
'a=foo b=bar a='
is equivalent to
'b=bar'
Fixes: #2540
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
| |
PGMap->num_pg_by_state is a PG state to number of PG in the state
mapping. PGMonitor::update_logger wrongly interprets the mapping.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
| |
This is more convenient when you're creating daemons, since you want to
write out a keyring file for them. This lets you do it in a single
command.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
| |
This is dangerous, make sure they know what they're doing. I bet <someone>
$1 that Greg asked me to do this originally.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
| |
Fixes: #2526
Signed-off-by: Sage Weil <sage@inktank.com>
|
|\
| |
| |
| | |
Reviewed-by: Greg Farnum <greg@inktank.com>
|
| |
| |
| |
| |
| |
| |
| | |
This will let us authenticate against items in the mon keyring, like the
mon. key itself.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| | |
...as detected by the previous patch.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
Also, stop breaking it down by event severity on disk. If you want that,
use syslog.
Fixes: #2497
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
| |
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
| |
We were just including the last one, which isn't as helpful.
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
| |
Immediately send more log messages if we had more when the first set was
sent. Otherwise, wait until the next tick to check. This semi-throttles
logging based on how much the monitor can handle.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
| |
Let MonClient and Monitor handle delivery of messages. This puts them in
control and lets them trigger sending of more messages when we have a
bunch queued.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
|
| |
Limit the number of log events we cram into a single paxos event.
Fixes: #2518
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
|
|
|
|
| |
Reported-by: Vladimir Bashkirtsev <vladimir@bashkirtsev.com>
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
| |
This would have helped us diagnose #2480.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This avoids making the callback parse off the command portion on their own.
It also lets them assert that the command portion is in the set of
registered commands.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is possible for the latest version to get out in front of the
last_committed version:
a- start slurping
a- slurp a bunch of states, through X
a- get them back, write them out
b- monitor commits many new states
a- slurp latest, X+100 say, but only get some of those states due to the
slurp per-message byte limit
a- write latest + some (but not all) prior states
a- call back into slurp(), update_from_paxos(), trigger assert
This fix ensures that we make note of the source's new latest, so that on
the next pass through slurp() we will grab any missing states.
We *also* explicitly require that we get everything up through what we have
stashed, in defense against some future kludging that might only require we
nearly (but not completely) in sync before finishing the slurp.
Fixes: #2379
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
| |
| |
| |
| |
| |
| | |
Propose if we changed something, but not if we don't.
Signed-off-by: Sage Weil <sage@newdream.net>
|