Merge pull request #31703 from xiexingguo/wip-42577-plus

osd/PeeringState: do not exclude up from acting_recovery_backfill

Reviewed-by: Neha Ojha <nojha@redhat.com>
This commit is contained in:
Kefu Chai 2019-11-25 00:58:14 +08:00 committed by GitHub
commit 819ccfdcd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1703,9 +1703,6 @@ void PeeringState::calc_replicated_acting(
acting_backfill->insert(up_cand);
ss << " osd." << i << " (up) accepted " << cur_info << std::endl;
}
if (want->size() >= size) {
break;
}
}
if (want->size() >= size) {
@ -2080,6 +2077,14 @@ bool PeeringState::choose_acting(pg_shard_t &auth_log_shard_id,
get_osdmap());
}
}
while (want.size() > pool.info.size) {
// async recovery should have taken out as many osds as it can.
// if not, then always evict the last peer
// (will get synchronously recovered later)
psdout(10) << __func__ << " evicting osd." << want.back()
<< " from oversized want " << want << dendl;
want.pop_back();
}
if (want != acting) {
psdout(10) << __func__ << " want " << want << " != acting " << acting
<< ", requesting pg_temp change" << dendl;