Actions
Bug #62649
openmgr/cephadm: Mark osd out and set the crush weight to 0 when draining the OSD.
Status:
New
Priority:
Normal
Assignee:
-
Category:
cephadm
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
PGs are not completely drained from the OSD which is being removed using "ceph orch osd rm <osdid> --force" command.
If we are replacing a OSD then we marking the OSD out but in case of draining the OSD we are setting the crush weight to 0 but not marking the OSD as out.
def start_draining(self) -> bool: if self.stopped: logger.debug(f"Won't start draining {self}. OSD draining is stopped.") return False if self.replace: self.rm_util.set_osd_flag([self], 'out') else: self.original_weight = self.rm_util.get_weight(self) self.rm_util.reweight_osd(self, 0.0) <----------- set crush weight to 0 self.drain_started_at = datetime.utcnow() self.draining = True logger.debug(f"Started draining {self}.") return True
Actions