# display a warning if there is more than one root
#
$ crushtool --outfn "$map" --build --num_osds 5 node straw 2 rack straw 1
- .* The crush rulesets will use the root rack0 (re)
+ The crush rulesets will use the root rack0 (re)
and ignore the others.
There are 3 roots, they can be
grouped into a single root by appending something like:
{
set<int> roots;
crush.find_roots(&roots);
- if (roots.size() > 1)
- dout(1) << "The crush rulesets will use the root " << root << "\n"
- << "and ignore the others.\n"
- << "There are " << roots.size() << " roots, they can be\n"
- << "grouped into a single root by appending something like:\n"
- << " root straw 0\n"
- << dendl;
+ if (roots.size() > 1) {
+ cerr << "The crush rulesets will use the root " << root << "\n"
+ << "and ignore the others.\n"
+ << "There are " << roots.size() << " roots, they can be\n"
+ << "grouped into a single root by appending something like:\n"
+ << " root straw 0\n"
+ << std::endl;
+ }
}
if (OSDMap::build_simple_crush_rules(g_ceph_context, crush, root, &cerr))