Project

General

Profile

Bug #62649

Updated by Prashant D 9 months ago

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. 

 <pre> 
     

     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 
 </pre>

Back