self.minin = self.config.get("min_in", 3)
self.chance_move_pg = self.config.get('chance_move_pg', 1.0)
self.sighup_delay = self.config.get('sighup_delay')
- self.chance_thrash_cluster_full = self.config.get('chance_thrash_cluster_full', .05)
num_osds = self.in_osds + self.out_osds
self.max_pgs = self.config.get("max_pgs_per_pool_osd", 1200) * num_osds
self.ceph_manager.raw_cluster_cmd('osd', 'primary-affinity',
str(osd), str(pa))
- def thrash_cluster_full(self):
- """
- Set and unset cluster full condition
- """
- self.log('Setting full ratio to .001')
- self.ceph_manager.raw_cluster_cmd('pg', 'set_full_ratio', '.001')
- time.sleep(1)
- self.log('Setting full ratio back to .95')
- self.ceph_manager.raw_cluster_cmd('pg', 'set_full_ratio', '.95')
-
def all_up(self):
"""
Make sure all osds are up and not out.
chance_test_min_size,))
actions.append((self.test_backfill_full,
chance_test_backfill_full,))
- if self.chance_thrash_cluster_full > 0:
- actions.append((self.thrash_cluster_full, self.chance_thrash_cluster_full,))
for key in ['heartbeat_inject_failure', 'filestore_inject_stall']:
for scenario in [
(lambda:
int r = _calc_target(&op->target, &op->last_force_resend);
switch (r) {
case RECALC_OP_TARGET_NO_ACTION:
- if (!force_resend && !(force_resend_writes && op->respects_full()))
+ if (!force_resend &&
+ (!force_resend_writes || !(op->target.flags & CEPH_OSD_FLAG_WRITE)))
break;
// -- fall-thru --
case RECALC_OP_TARGET_NEED_RESEND:
<< dendl;
op->target.paused = true;
_maybe_request_map();
- } else if (op->respects_full() &&
+ } else if ((op->target.flags & CEPH_OSD_FLAG_WRITE) &&
+ !(op->target.flags & (CEPH_OSD_FLAG_FULL_TRY |
+ CEPH_OSD_FLAG_FULL_FORCE)) &&
(_osdmap_full_flag() ||
_osdmap_pool_full(op->target.base_oloc.pool))) {
ldout(cct, 0) << " FULL, paused modify " << op << " tid "
return tid < other.tid;
}
- bool respects_full() const {
- return
- (target.flags & (CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_RWORDERED)) &&
- !(target.flags & (CEPH_OSD_FLAG_FULL_TRY | CEPH_OSD_FLAG_FULL_FORCE));
- }
-
private:
~Op() {
while (!out_handler.empty()) {