]>
git.apps.os.sepia.ceph.com Git - ceph.git/log
Sage Weil [Wed, 23 May 2012 23:24:36 +0000 (16:24 -0700)]
filestore: make read_fsid() out arg be a pointer
As per style guide.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 22 May 2012 18:45:57 +0000 (11:45 -0700)]
filestore: more informative fsid mkfs debug output
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 22 May 2012 18:41:25 +0000 (11:41 -0700)]
osd: verify fsid whoami to match on repeat mkfs
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 22 May 2012 18:39:44 +0000 (11:39 -0700)]
osd: require cluster fsid for mkfs
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 23:11:39 +0000 (16:11 -0700)]
osd: do not clobber existing key with --mkkey
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 22:59:59 +0000 (15:59 -0700)]
filestore: mkfs: do not clobber exisiting journal if it has matching fsid
If the journal is for *this* fs, do not clobber. If it appears invalid in
any way, initialize it.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 22:58:32 +0000 (15:58 -0700)]
filejournal: add check() method
Check if a journal appears to be valid, where valid means the header is
intact and has a matching fsid.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 22:45:00 +0000 (15:45 -0700)]
filestore: drop useless mkjournal error check
We don't care!
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 22:42:59 +0000 (15:42 -0700)]
filestore: mkfs: less noise about leveldb creation
and make it clear that we didn't necessarily create it; it may have already
been there.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 22:42:28 +0000 (15:42 -0700)]
filestore: mkfs: only create snap_0 if we created current_op_seq
We only need to create snap_0 if we just created current_op_seq and this is
a brand-new dir.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Wed, 23 May 2012 23:25:44 +0000 (16:25 -0700)]
filestore: fix misplaced #endif
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 22:38:45 +0000 (15:38 -0700)]
filestore: leave existing current/
If current exists, leave it be, but:
* make sure it's a dir
* check if it's a btrfs snapshot, and set btrfs_stable_commits if so
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 22:23:49 +0000 (15:23 -0700)]
filestore: create but do not clobber current/commit_op_seq
If it exists, preserve its value. Otherwise, create and set it to 1.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 22:03:56 +0000 (15:03 -0700)]
filestore: mkfs: only (re)set fsid if not already set
Only set fsid if it is not set.
Also, error out if it exists and does not match.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 21:58:35 +0000 (14:58 -0700)]
filestore: pass target into read_fsid()
Don't assume it should be read into this->fsid.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 21:09:48 +0000 (14:09 -0700)]
filestore: mkfs: rename buf -> fsid_fn
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 21:07:43 +0000 (14:07 -0700)]
filestore: always open/verify basedir; clean up error messages
Verify basedir exists immediately.
Clean up error output.
Clean up label names.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 21:03:58 +0000 (14:03 -0700)]
filestore: do not wipe on mkfs
Do not wipe out old content in the data dir.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 20:55:41 +0000 (13:55 -0700)]
filestore: remove unused 'filestore dev' option
Eons ago we would call mount/unmount on this, but it's been dead for a
while now.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 20:54:13 +0000 (13:54 -0700)]
osd: only (re)write_meta files if old content is incorrect
Do nothing if the file already exists with the correct content.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 20:51:29 +0000 (13:51 -0700)]
osd: only create superblock if not present
If it exists, leave it be.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Wed, 23 May 2012 00:13:28 +0000 (17:13 -0700)]
Merge branch 'wip-quorum'
John Wilkins [Wed, 23 May 2012 00:10:43 +0000 (17:10 -0700)]
doc/config-cluster/chef.rst <-fixed an error in upload command.
doc/config-cluster/deploying-ceph-conf.rst <-added sudo. required.
doc/config-cluster/deploying-ceph-with-mkcephfs.rst <-cd to /etc/ceph so keyring goes there.
doc/install/chef.rst <-added update and install opscode-keyring, and upgrade.
doc/install/debian.rst <-added ceph-common to the install
Signed-off-by: John Wilkins <john.wilkins@dreamhost.com>
Josh Durgin [Tue, 22 May 2012 19:54:09 +0000 (12:54 -0700)]
Merge branch 'stable'
Sage Weil [Tue, 22 May 2012 00:18:35 +0000 (17:18 -0700)]
objectcacher: fix infinite loop in flusher_entry
The addition of accounting for simultaneous writers in
f3043fee3e22600cb4349072287842db129588eb could lead to an infinite
loop. This could happen because starting a flush doesn't decrease
dirty_waiters, only the number of dirty bytes (they change to tx). If
dirty_waiters is more than target_dirty, the loop would continue
forever while holding the object cacher lock, since the object cacher
lock is required by the write callbacks.
The extra while (!flusher_stop) loop is unnecessary, so remove it.
This means the flusher thread always releases the lock after starting
flushing, so progress can be made.
Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
John Wilkins [Tue, 22 May 2012 16:54:06 +0000 (09:54 -0700)]
Merge branch 'master' of github.com:ceph/ceph
John Wilkins [Tue, 22 May 2012 16:53:34 +0000 (09:53 -0700)]
doc/config-cluster/ceph-conf.rst <-Fixed some formatting issues.
doc/config-cluster/deploying-ceph-conf.rst <-minor edit.
doc/start/get-involved-in-the-ceph-community.rst <-removed $ from command line instruction.
doc/start/quick-start.rst <-added additional steps.
Signed-off-by: John Wilkins <john.wilkins@dreamhost.com>
Sage Weil [Tue, 22 May 2012 14:05:36 +0000 (07:05 -0700)]
monmap: calc_ranks() on rename()
This is simpler than ensuring we track all the right invariants.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 22 May 2012 03:01:03 +0000 (20:01 -0700)]
Merge branch 'wip-defensive-alloc'
Sage Weil [Tue, 22 May 2012 03:00:51 +0000 (20:00 -0700)]
crush: check reweight return value
Signed-off-by: Sage Weil <sage@inktank.com>
Ross Turk [Tue, 22 May 2012 02:36:59 +0000 (19:36 -0700)]
doc: fix broken link in FAQ
Signed-off-by: Ross Turk <ross@inktank.com>
Ross Turk [Tue, 22 May 2012 01:22:35 +0000 (18:22 -0700)]
doc: added links from the chef install doc to the chef config doc and back
Signed-off-by: Ross Turk <ross@inktank.com>
Ross Turk [Tue, 22 May 2012 01:21:39 +0000 (18:21 -0700)]
doc: Added a FAQ page.
Added a FAQ page, which we will need to put more content in.
Signed-off-by: Ross Turk <ross@inktank.com>
John Wilkins [Tue, 22 May 2012 00:49:35 +0000 (17:49 -0700)]
Added the Swift API as is. Still needs a lot of work.
Signed-off-by: John Wilkins <john.wilkins@dreamhost.com>
Sage Weil [Mon, 21 May 2012 23:57:26 +0000 (16:57 -0700)]
doc: document range of methods for cluster creation, expansion
This isn't quite complete, and should be integrated with the info in the
ops section on mon cluster expansion, but the raw content is here at least.
Signed-off-by: Sage Weil <sage@inktank.com>
John Wilkins [Fri, 18 May 2012 20:54:51 +0000 (13:54 -0700)]
doc: misc updates
doc/architecture.rst - removed broken reference.
doc/config-cluster - cleanup and added chef
doc/install - Made generic to add Chef, OpenStack and libvert installs
doc/init - Created light start | stop and health section
doc/source - Removed $ from code examples. Trimmed paras to 80 char
doc/images - Added preliminary diagram for Chef.
doc/rec - Added reference to hardware. Added filesystem info.
Signed-off-by: John Wilkins <john.wilkins@dreamhost.com>
Sage Weil [Mon, 21 May 2012 22:07:42 +0000 (15:07 -0700)]
mon: fix 'no initial monitors' warning
It is valid to start with no initial monitors even when the initial set is
not defined; it just means that we are only able to join a cluster, and
never able to form a new one.
Signed-off-by: Sage Weil <sage@inktank.com>
Yehuda Sadeh [Mon, 21 May 2012 21:32:22 +0000 (14:32 -0700)]
libs3: remove make install target
Sage Weil [Mon, 21 May 2012 21:28:45 +0000 (14:28 -0700)]
v0.47.1
Yehuda Sadeh [Mon, 21 May 2012 21:20:24 +0000 (14:20 -0700)]
Makefile.am: only append libs3 to SUBDIRS when needed
We appended libs3 to SUBDIRS unconditionally, we only need that
when we actually want to compile it.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Sage Weil [Sat, 19 May 2012 23:03:41 +0000 (16:03 -0700)]
filestore: test xattrs on temporary file
There isn't one we can rely on existing yet. Broken by
1314a00798ed4b7ef2f2686f0195c5c53c98c2ce while fixing #2452.
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 21 May 2012 21:20:38 +0000 (14:20 -0700)]
ceph-object-corpus: add some old v2 monmaps
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 21 May 2012 20:58:55 +0000 (13:58 -0700)]
monmap: fix decoding of old monmaps
The old monmaps had a u16 for the version. Fix our decode.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 21 May 2012 20:15:23 +0000 (13:15 -0700)]
qa: fix mon single_host_multi.sh test
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 21 May 2012 20:15:11 +0000 (13:15 -0700)]
mon: rename ourselves if our name does not match committed monmap
If we are part of the quorum but our name does not match, fix it.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 21 May 2012 20:14:50 +0000 (13:14 -0700)]
mon: only rename peers in seed monmap
Once we have a committed monmap, stop renaming peers. This only gets us
confused because our monmap does not match the paxos committed one.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 21 May 2012 20:07:16 +0000 (13:07 -0700)]
mon: move election msg check into elector
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 21 May 2012 20:01:49 +0000 (13:01 -0700)]
mon: allow mons to rename themselves with the join message
This allows mons that got stuck in the initial quorum's monmap as noname-*
to fix their name before joining in.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 21 May 2012 20:00:59 +0000 (13:00 -0700)]
monmap: fix rename
Update addr_name map appropriately.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 21 May 2012 18:46:06 +0000 (11:46 -0700)]
mon: drop useless rank racalc in init
bootstrap() handles this, no need to worry about it here.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 21 May 2012 18:38:07 +0000 (11:38 -0700)]
mon: fix leak of MonMap
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 21 May 2012 18:36:43 +0000 (11:36 -0700)]
monmap: filter_initial_members -> set_initial_members
Signed-off-by: Sage Weil <sage@inktank.com>
Samuel Just [Mon, 21 May 2012 17:39:44 +0000 (10:39 -0700)]
Update leveldb to remove CompactionInputErrorParanoid
CompactionInputErrorParanoid tends not to complete in time during
gitbuilder runs resulting in false failures.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Tommi Virtanen [Mon, 21 May 2012 15:52:49 +0000 (08:52 -0700)]
man: Remove leftover --bin from ceph-authtool(8).
Regenerate manpage.
See
4832c46eab55b1f2cbe9aca419124c2c9d645889 ,
ec732816ef04e036db338cdbe5cdfb9a1b649f8e for the actual removal of the
feature.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
Sage Weil [Mon, 21 May 2012 04:18:36 +0000 (21:18 -0700)]
Merge branch 'stable'
Conflicts:
src/os/FileStore.cc
Sage Weil [Sun, 20 May 2012 22:16:30 +0000 (15:16 -0700)]
v0.47
Sage Weil [Sun, 20 May 2012 22:32:19 +0000 (15:32 -0700)]
keys: new release key
New release key for signing packages. Signed by me (the old release key)
so that existing apt keyrings should be sufficient. New keyrings should
just add the new release key.
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Sun, 20 May 2012 22:11:21 +0000 (15:11 -0700)]
builder: make reweight helpers static, void
Signed-off-by: Sage Weil <sage@inktank.com>
Yehuda Sadeh [Sun, 20 May 2012 22:08:20 +0000 (15:08 -0700)]
formatter: replace malloc with new
This will throw exception if allocation failed.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Yehuda Sadeh [Sun, 20 May 2012 22:07:57 +0000 (15:07 -0700)]
check malloc return values
There were a few places where we didn't check malloc return code.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Yehuda Sadeh [Sun, 20 May 2012 22:09:08 +0000 (15:09 -0700)]
crush: check malloc results
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Sage Weil [Sat, 19 May 2012 20:24:35 +0000 (13:24 -0700)]
osdmap: set name_pool correctly in build_simple*()
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 20:24:47 +0000 (13:24 -0700)]
osdmap: use pg[p]_num accessors
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>
Sage Weil [Sat, 19 May 2012 21:56:49 +0000 (14:56 -0700)]
filestore: do not test xattrs on fsid file
This is sufficient to break our fcntl lock, which breaks the check for
other running daemons.
Broken by
f03dc34f7e2fc1707fa00339b917c0d2c93dbdd3
Fixes: #2452
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sun, 20 May 2012 19:49:48 +0000 (12:49 -0700)]
debian: fix ceph-kdump-copy.init
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sun, 20 May 2012 19:49:48 +0000 (12:49 -0700)]
debian: fix ceph-kdump-copy.init
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 23:03:41 +0000 (16:03 -0700)]
filestore: test xattrs on temporary file
There isn't one we can rely on existing yet. Broken by
1314a00798ed4b7ef2f2686f0195c5c53c98c2ce while fixing #2452.
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 22:08:26 +0000 (15:08 -0700)]
monmaptool: fix clitests
- epoch is always 0
- new options in usage string
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 21:56:49 +0000 (14:56 -0700)]
filestore: do not test xattrs on fsid file
This is sufficient to break our fcntl lock, which breaks the check for
other running daemons.
Broken by
f03dc34f7e2fc1707fa00339b917c0d2c93dbdd3
Fixes: #2452
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 20:24:35 +0000 (13:24 -0700)]
osdmap: set name_pool correctly in build_simple*()
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 20:24:47 +0000 (13:24 -0700)]
osdmap: use pg[p]_num accessors
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>
Sage Weil [Sat, 19 May 2012 16:44:00 +0000 (09:44 -0700)]
cephtool: restore osdmap handler
Accidentally removed by
841372494f531c7481cf3eff1b673cedbab4d60d .
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 00:12:17 +0000 (17:12 -0700)]
qa: use full paths for mon bootstrap tests
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sat, 19 May 2012 00:12:35 +0000 (17:12 -0700)]
mon: show quorum names in health warning
Names, not just ranks (which nobody cares about).
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Fri, 18 May 2012 17:52:04 +0000 (10:52 -0700)]
monmaptool: add --generate, --filter-initial options
Generate a monmap from conf/args, and apply the mon initial hosts to it.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Fri, 18 May 2012 17:38:26 +0000 (10:38 -0700)]
monmap: move build_initial() from MonClient
This belongs here, not in MonClient.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Fri, 18 May 2012 16:52:09 +0000 (09:52 -0700)]
mon: move initial_members filtering into MonMap method
This is cleaner. Also, we can perform/test this functionality from the
monmaptool.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Fri, 18 May 2012 16:38:52 +0000 (09:38 -0700)]
mon: always mark seed/mkfs monmap as epoch 0
This isn't strictly necessary, since the MonmapMonitor resets this on first
commit, but it's cleaner.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Fri, 18 May 2012 01:18:10 +0000 (18:18 -0700)]
qa: add mon test for seeding bootstrap mon peers via admin socket
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Fri, 18 May 2012 01:14:33 +0000 (18:14 -0700)]
mon: add -or- update blank mon addr with join command
Update blank addrs with the join command (in addition to adding new mons).
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Fri, 18 May 2012 01:13:57 +0000 (18:13 -0700)]
mon: send join message if we are in monmap with blank addr
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>
Sage Weil [Fri, 18 May 2012 01:17:18 +0000 (18:17 -0700)]
mon: simplify/clean up dummy addrs used for initial members
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>
Sage Weil [Fri, 18 May 2012 00:52:54 +0000 (17:52 -0700)]
mon: learn peer addrs when probing
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>
Sage Weil [Fri, 18 May 2012 00:51:47 +0000 (17:51 -0700)]
mon: set our addr when populating monmap with initial members
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>
Sage Weil [Fri, 18 May 2012 00:50:49 +0000 (17:50 -0700)]
mon: add peers probing us to extra peer list
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>
Sage Weil [Fri, 18 May 2012 00:50:01 +0000 (17:50 -0700)]
mon: 'add_bootstrap_peer_hint <addr>' via admin socket
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>
Sage Weil [Fri, 18 May 2012 00:49:00 +0000 (17:49 -0700)]
mon: all starting with empty monmap
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>
Sage Weil [Fri, 18 May 2012 00:30:35 +0000 (17:30 -0700)]
cephtool: multiword admin socket commands
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>
Sage Weil [Fri, 18 May 2012 00:15:41 +0000 (17:15 -0700)]
admin_socket: match first word against command
This lets us do commands that take arguments. We assume space is the
separator.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 17 May 2012 22:12:23 +0000 (15:12 -0700)]
monmap: move monmap generation from ip/host list into MonMap
Also generalize the prefix so it's explicit in the caller and a bit less
magic.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 17 May 2012 22:11:39 +0000 (15:11 -0700)]
mon: drop mon_initial_hosts
Bad idea.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 17 May 2012 22:38:45 +0000 (15:38 -0700)]
mon: clean up initial_members code slightly
Don't recalc rank unless we need to.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 17 May 2012 21:50:31 +0000 (14:50 -0700)]
qa: add a bunch of mon bootstrap tests
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>
Sage Weil [Thu, 17 May 2012 21:46:46 +0000 (14:46 -0700)]
mon: ignore election messages from outside monmap
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>
Sage Weil [Thu, 17 May 2012 20:27:47 +0000 (13:27 -0700)]
mon: include quorum member names in 'mon stat'
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 17 May 2012 20:27:30 +0000 (13:27 -0700)]
mon: limit initial quorum to mon_initial_members
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>
Sage Weil [Thu, 17 May 2012 19:39:11 +0000 (12:39 -0700)]
mon: only include monmap mon's in outside_quorum, new quorum
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>
Sage Weil [Thu, 17 May 2012 19:37:36 +0000 (12:37 -0700)]
mon: add set of additional peers to probe
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>
Sage Weil [Thu, 17 May 2012 19:36:41 +0000 (12:36 -0700)]
mon: use current monmap for initial quorum
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>
Sage Weil [Thu, 17 May 2012 18:08:38 +0000 (11:08 -0700)]
mon: take probed peer's monmap if it has ever joined a quorum
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>