This lets us ensure that calc_pg_masks() is called when pg[p]_num is set or
modified.
Fixes: #2448
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
This is sufficient to break our fcntl lock, which breaks the check for
other running daemons.
Broken by f03dc34f7eFixes: #2452
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
This is sufficient to break our fcntl lock, which breaks the check for
other running daemons.
Broken by f03dc34f7eFixes: #2452
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
This lets us ensure that calc_pg_masks() is called when pg[p]_num is set or
modified.
Fixes: #2448
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
Being in the monmap with a blank ip is possible if we were a initial member
seed but weren't part of the first election/quorum. If that's the case,
first update ourselves before we try to call an election and join the
quorum.
Signed-off-by: Sage Weil <sage@inktank.com>
Use a complete blank IP, but set the nonce. This way
entity_addr_t::is_blank_ip() works. We're also outside of the namespace of
possible addrs that the mons *could* use, which is a bit cleaner.
Signed-off-by: Sage Weil <sage@inktank.com>
If we have a monmap with dummy addrs for initial members, and we probe one
of those peers and learn their address, update our monmap appropriately.
Signed-off-by: Sage Weil <sage@inktank.com>
If the seed monmap doesn't contain us and we are populating it with
initial members, and one of those members is us, use our addr instead of
using a dummy one.
Signed-off-by: Sage Weil <sage@inktank.com>
If we are probed by another monitor, add them to our extra probe list. This
lets us rely on the active probe/reply to gather information and not infer
anything from here.
Signed-off-by: Sage Weil <sage@inktank.com>
Let user add peer hints via the admin socket while bootstrapping. Once we
have joined a cluster this command is ignored.
Signed-off-by: Sage Weil <sage@inktank.com>
It's okay to start up with an empty monmap. It just means that you must:
* set 'mon initial members'
* feed hints via the admin socket, or learn hints from other mons probing
us
Signed-off-by: Sage Weil <sage@inktank.com>
Slurp up anything on the command line that isn't an option, so that you can
do
ceph --admin-socket /path/to/asok foo bar baz
instead of
ceph --admin-socket /path/to/asok 'foo bar baz'
Signed-off-by: Sage Weil <sage@inktank.com>
These's are comprehensive because a lot of the startup logic is about
picking a local address, and it's difficult to do test that on a single
host. They cover the other variables surrounding mon bringing up, though:
- part of initial monmap, or not
- new nodes given all prior nodes, or not
- new nodes have self included in monmap seed, or not
- initial quorum members
Signed-off-by: Sage Weil <sage@inktank.com>
These shouldn't(tm) happen with new code, but with old code they do. And
if we get them, elector can try to monmap->get_inst() on them and crash.
Throw them out here; they're nonsense from our perspective anyway if the
peer isn't part of our monmap.
Signed-off-by: Sage Weil <sage@inktank.com>
This is a two-stage process.
* If we start up, and have never joined a quorum, and initial members are
specified, only include them in the monmap; put all others in the
extra probe list.
* We add missing members if necessary to make the monmap (and initial
quorum) the right size.
* If we probe someone that *has* participated in a successful quorum, we
get their monmap, and restart, so this is moot.
* We only call an election to create a new cluster if outside_quorum gets
big enough (it will only include initial members) and if it includes us.
Signed-off-by: Sage Weil <sage@inktank.com>
Only include mons that are in the monmap in the outside_quorum set, which
we use to determine if we can form a new quorum.
In particular, if we ourselves are not in the monmap, we can't call an
election (that wouldn't include us anyway).
Signed-off-by: Sage Weil <sage@inktank.com>
Probe an additional set of peers, not included in the monmap.
Incomplete; we'll still assume they *can* form a quorum. See next patch.
Signed-off-by: Sage Weil <sage@inktank.com>
This makes a bit more sense. Don't use the seed monmap, but use the one
we ended up with when we formed our first quorum. This will do a better
job of picking up names of peers, and also ensure we get a map based on
the mon initial members (if specified).
Signed-off-by: Sage Weil <sage@inktank.com>
If we probe a peer and their monmap has actually been part of a started
cluster/quorum, and ours hasn't, take theirs. Comparing versions isn't
sufficient.
Signed-off-by: Sage Weil <sage@inktank.com>
This just confuses things, because a manually manipulated map might have
some epoch number that bears no relation to the actual published/committed
maps.
Signed-off-by: Sage Weil <sage@inktank.com>
- check flag on init, keep in memory
- set flag only when we are active and have a committed monmap. i.e., when
we are active participants in a bootstrapped/created mon cluster.
Signed-off-by: Sage Weil <sage@inktank.com>
Fill in noname- entires in initial generate monmap (e.g., from mon_host)
with real peer names as we discover them.
This will make the upcoming initial quorum config check work by letting us
identify peers by name.
Signed-off-by: Sage Weil <sage@inktank.com>
This would allow you to do
mon host = foo, bar, baz
or
mon host = multiarecordhostname.foo.com
and have the generated monmap tag monitors as noname-, so that the ceph-mon
mkfs will identify itself as one of them and initialize itself
properly.
Signed-off-by: Sage Weil <sage@newdream.net>