ss.str(), 0);
}
}
+ // UNEQUAL_WEIGHT
+ if (stretch_mode_enabled) {
+ vector<int> subtrees;
+ crush->get_subtree_of_type(stretch_mode_bucket, &subtrees);
+ if (subtrees.size() != 2) {
+ stringstream ss;
+ ss << "Stretch mode buckets != 2";
+ checks->add("INCORRECT_NUM_BUCKETS_STRETCH_MODE", HEALTH_WARN, ss.str(), 0);
+ return;
+ }
+ int weight1 = crush->get_item_weight(subtrees[0]);
+ int weight2 = crush->get_item_weight(subtrees[1]);
+ stringstream ss;
+ if (weight1 != weight2) {
+ ss << "Stretch mode buckets have different weights!";
+ checks->add("UNEVEN_WEIGHTS_STRETCH_MODE", HEALTH_WARN, ss.str(), 0);
+ }
+ }
}
int OSDMap::parse_osd_id_list(const vector<string>& ls, set<int> *out,