When simulating osd out, it will always adjust this osd's crush weight
to 1.0. Hence the pg map result is not same as the real cluster or simulated
by crushtool.
Fixes: https://tracker.ceph.com/issues/47492
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
for (int i=0; i<n; i++) {
osdmap.set_state(i, osdmap.get_state(i) | CEPH_OSD_UP);
osdmap.set_weight(i, CEPH_OSD_IN);
- osdmap.crush->adjust_item_weightf(g_ceph_context, i, 1.0);
}
}
int id = marked_out;
osdmap.set_state(id, osdmap.get_state(id) | CEPH_OSD_UP);
osdmap.set_weight(id, CEPH_OSD_OUT);
- osdmap.crush->adjust_item_weightf(g_ceph_context, id, 1.0);
}
if (clear_temp) {