File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -578,12 +578,15 @@ class DumpInFlightOpsHook : public AdminSocketHook {
578578 auto *f = fref.get ();
579579 f->open_object_section (" ops_in_flight" );
580580 f->open_array_section (" ops_in_flight" );
581- return pg_shard_manager.invoke_on_each_shard_seq ([f](const auto &shard_services) {
582- return shard_services.dump_ops_in_flight (f);
583- }).then ([fref=std::move (fref)]() mutable {
584- fref->close_section ();
585- fref->close_section ();
586- return seastar::make_ready_future<tell_result_t >(std::move (fref));
581+ return pg_shard_manager.when_active ()
582+ .then ([this , f, fref=std::move (fref)]() mutable {
583+ return pg_shard_manager.invoke_on_each_shard_seq ([f](const auto &shard_services) {
584+ return shard_services.dump_ops_in_flight (f);
585+ }).then ([fref=std::move (fref)]() mutable {
586+ fref->close_section ();
587+ fref->close_section ();
588+ return seastar::make_ready_future<tell_result_t >(std::move (fref));
589+ });
587590 });
588591 }
589592private:
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ class PGShardManager {
121121 FORWARD(set_booting, set_booting, get_shard_services().local_state.osd_state)
122122 FORWARD(set_stopping, set_stopping, get_shard_services().local_state.osd_state)
123123 FORWARD(set_active, set_active, get_shard_services().local_state.osd_state)
124- FORWARD (when_active, when_active, get_shard_services().local_state.osd_state)
124+ FORWARD_CONST (when_active, when_active, get_shard_services().local_state.osd_state)
125125 FORWARD_CONST(get_osd_state_string, to_string, get_shard_services().local_state.osd_state)
126126
127127 FORWARD(got_map, got_map, get_shard_services().local_state.osdmap_gate)
You can’t perform that action at this time.
0 commit comments