If you had manually configured the mon to use rocksdb, this file should
be created and filled with the string "rocksdb" (newline optional).
+* The 'osd out ...' and 'osd in ...' commands now preserve the OSD
+ weight. Previously the mons would only preserve the weight if the
+ mon automatically marked and OSD out and then in, but not when an
+ admin did so explicitly.
11.0.0
------
ceph osd dump | grep 'osd.0.*in'
ceph osd find 0
+ # make sure mark out preserves weight
+ ceph osd reweight osd.0 .5
+ ceph osd dump | grep ^osd.0 | grep 'weight 0.5'
+ ceph osd out 0
+ ceph osd in 0
+ ceph osd dump | grep ^osd.0 | grep 'weight 0.5'
+
f=$TEMP_DIR/map.$$
ceph osd getcrushmap -o $f
[ -s $f ]
ss << "osd." << osd << " is already out. ";
} else {
pending_inc.new_weight[osd] = CEPH_OSD_OUT;
+ if (osdmap.osd_weight[osd]) {
+ if (pending_inc.new_xinfo.count(osd) == 0) {
+ pending_inc.new_xinfo[osd] = osdmap.osd_xinfo[osd];
+ }
+ pending_inc.new_xinfo[osd].old_weight = osdmap.osd_weight[osd];
+ }
ss << "marked out osd." << osd << ". ";
any = true;
}
if (osdmap.is_in(osd)) {
ss << "osd." << osd << " is already in. ";
} else {
- pending_inc.new_weight[osd] = CEPH_OSD_IN;
+ if (osdmap.osd_xinfo[osd].old_weight > 0) {
+ pending_inc.new_weight[osd] = osdmap.osd_xinfo[osd].old_weight;
+ if (pending_inc.new_xinfo.count(osd) == 0) {
+ pending_inc.new_xinfo[osd] = osdmap.osd_xinfo[osd];
+ }
+ pending_inc.new_xinfo[osd].old_weight = 0;
+ } else {
+ pending_inc.new_weight[osd] = CEPH_OSD_IN;
+ }
ss << "marked in osd." << osd << ". ";
any = true;
}