Tommi Virtanen 19da747700 Add current node to mon_hosts, if it has role ceph-mon.
This shortcircuits the search logic, so ceph-mon --mkfs will always
see itself in ceph-mon, and thus won't end up with an empty monmap.
Empty monmap would prevent it from initializing properly, and the
peer hints aren't enough to help.

Search is not reliable for this, as the search index updates lazily,
and e.g. the "roles:" field, holding the expanded run_list, is only
set at the end of a successful chef-client run.

Crowbar creates a special-purpose role, one per node, and assigns the
actual roles to that role. We work around this by doing the search in
two phases, when running under Crowbar.

Thanks to Tyler Brekke.
2012-07-20 14:32:18 -07:00
..