If we are in recovery_unfound state waiting for unfound objects, and we
find them, we need to restart the recovery reservation process so that we
can recover. Do this by queueing DoRecover() event instead of calling
queue_recovery() (which won't do anything since we're not in
recoverying|backfilling pg states).
Make the parent Active state ignore DoRecovery so that if we are already
in some phase of recovery/backfill the event gets ignored. It is already
handled by the other important substates that care, like Clean (for
repair's benefit).
I'm not sure why states like Activating are paying attention tot his vevent...
Fixes: http://tracker.ceph.com/issues/22145
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit
4cfe31c63b519f2dce22f061c9951c302f6efb1e)
Conflicts:
src/osd/PG.h (trivial, not all events exist in luminous)
pg->peer_missing[logevt.from],
logevt.from,
context< RecoveryMachine >().get_recovery_ctx());
- if (pg->is_peered() &&
- got_missing)
- pg->queue_recovery();
+ if (got_missing) {
+ post_event(DoRecovery());
+ }
return discard_event();
}
boost::statechart::custom_reaction< Backfilled >,
boost::statechart::custom_reaction< AllReplicasActivated >,
boost::statechart::custom_reaction< DeferRecovery >,
- boost::statechart::custom_reaction< DeferBackfill >
+ boost::statechart::custom_reaction< DeferBackfill >,
+ boost::statechart::custom_reaction< DoRecovery>
> reactions;
boost::statechart::result react(const QueryState& q);
boost::statechart::result react(const ActMap&);
boost::statechart::result react(const DeferBackfill& evt) {
return discard_event();
}
+ boost::statechart::result react(const DoRecovery&) {
+ return discard_event();
+ }
};
struct Clean : boost::statechart::state< Clean, Active >, NamedState {