mirror of
https://github.com/ceph/ceph
synced 2025-02-24 19:47:44 +00:00
osd/PG: publish PG stats when backfill-related states change
These frequently get flushed because other updates happen, but we should explicitly ensure that the mon sees these state changes. Fixes: http://tracker.ceph.com/issues/18369 Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
6f53f56702
commit
d4adeb7500
@ -6043,6 +6043,7 @@ PG::RecoveryState::Backfilling::Backfilling(my_context ctx)
|
||||
pg->state_clear(PG_STATE_BACKFILL_TOOFULL);
|
||||
pg->state_clear(PG_STATE_BACKFILL_WAIT);
|
||||
pg->state_set(PG_STATE_BACKFILL);
|
||||
pg->publish_stats_to_osd();
|
||||
}
|
||||
|
||||
boost::statechart::result
|
||||
@ -6096,6 +6097,7 @@ PG::RecoveryState::WaitRemoteBackfillReserved::WaitRemoteBackfillReserved(my_con
|
||||
context< RecoveryMachine >().log_enter(state_name);
|
||||
PG *pg = context< RecoveryMachine >().pg;
|
||||
pg->state_set(PG_STATE_BACKFILL_WAIT);
|
||||
pg->publish_stats_to_osd();
|
||||
post_event(RemoteBackfillReserved());
|
||||
}
|
||||
|
||||
@ -6161,6 +6163,7 @@ PG::RecoveryState::WaitRemoteBackfillReserved::react(const RemoteReservationReje
|
||||
|
||||
pg->state_clear(PG_STATE_BACKFILL_WAIT);
|
||||
pg->state_set(PG_STATE_BACKFILL_TOOFULL);
|
||||
pg->publish_stats_to_osd();
|
||||
|
||||
pg->schedule_backfill_full_retry();
|
||||
|
||||
@ -6181,6 +6184,7 @@ PG::RecoveryState::WaitLocalBackfillReserved::WaitLocalBackfillReserved(my_conte
|
||||
pg, pg->get_osdmap()->get_epoch(),
|
||||
LocalBackfillReserved()),
|
||||
pg->get_backfill_priority());
|
||||
pg->publish_stats_to_osd();
|
||||
}
|
||||
|
||||
void PG::RecoveryState::WaitLocalBackfillReserved::exit()
|
||||
@ -6197,6 +6201,8 @@ PG::RecoveryState::NotBackfilling::NotBackfilling(my_context ctx)
|
||||
NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/NotBackfilling")
|
||||
{
|
||||
context< RecoveryMachine >().log_enter(state_name);
|
||||
PG *pg = context< RecoveryMachine >().pg;
|
||||
pg->publish_stats_to_osd();
|
||||
}
|
||||
|
||||
boost::statechart::result
|
||||
@ -6411,6 +6417,7 @@ PG::RecoveryState::WaitLocalRecoveryReserved::WaitLocalRecoveryReserved(my_conte
|
||||
pg, pg->get_osdmap()->get_epoch(),
|
||||
LocalRecoveryReserved()),
|
||||
pg->get_recovery_priority());
|
||||
pg->publish_stats_to_osd();
|
||||
}
|
||||
|
||||
void PG::RecoveryState::WaitLocalRecoveryReserved::exit()
|
||||
@ -6470,6 +6477,7 @@ PG::RecoveryState::Recovering::Recovering(my_context ctx)
|
||||
PG *pg = context< RecoveryMachine >().pg;
|
||||
pg->state_clear(PG_STATE_RECOVERY_WAIT);
|
||||
pg->state_set(PG_STATE_RECOVERING);
|
||||
pg->publish_stats_to_osd();
|
||||
pg->queue_recovery();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user