]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: send peering messages only when OSD is active.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 13 Jul 2021 12:54:55 +0000 (12:54 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 14 Jul 2021 12:22:05 +0000 (12:22 +0000)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/osd_operations/peering_event.cc

index c8c4a8c8c2ec246892c3b9a4bc0e8b2e7c34fb7e..7299c9421ce78d863bb70f8c08856d5107cfbb26 100644 (file)
@@ -148,8 +148,10 @@ seastar::future<> RemotePeeringEvent::complete_rctx(Ref<PG> pg)
     return PeeringEvent::complete_rctx(pg);
   } else {
     logger().debug("{}: OSDState is {}", *this, osd.state);
-    ceph_assert(osd.state.is_active());
-    return shard_services.dispatch_context_messages(std::move(ctx));
+    return osd.state.when_active().then([this] {
+      assert(osd.state.is_active());
+      return shard_services.dispatch_context_messages(std::move(ctx));
+    });
   }
 }