]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: adapt to the new interface of seastar::when_all_succeed().
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 5 Aug 2020 15:39:45 +0000 (11:39 -0400)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 6 Aug 2020 22:00:07 +0000 (18:00 -0400)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/admin/admin_socket.cc
src/crimson/mon/MonClient.cc
src/crimson/net/Protocol.cc
src/crimson/net/Socket.cc
src/crimson/osd/heartbeat.cc
src/crimson/osd/osd.cc
src/crimson/osd/osd_operations/pg_advance_map.cc
src/crimson/osd/shard_services.cc
src/tools/crimson/perf_crimson_msgr.cc

index 02d9deafff64082b59d0b1cd636776e9b0e2a0f2..29ad2095bab6056311f2b76db341983a3cdacfe1 100644 (file)
@@ -510,7 +510,10 @@ seastar::future<> AdminSocket::register_admin_commands()
     register_command(std::make_unique<ConfigGetHook>()),
     register_command(std::make_unique<ConfigSetHook>()),
     register_command(std::make_unique<ConfigShowHook>()),
-    register_command(std::make_unique<InjectArgsHook>()));
+    register_command(std::make_unique<InjectArgsHook>())
+  ).then_unpack([] {
+    return seastar::now();
+  });
 }
 
 }  // namespace crimson::admin
index ebce8bd3421ddc087f1d2bba7a261e768c4b777d..34b8824568a3869ffcedc646e0e3e542004d7a72 100644 (file)
@@ -500,7 +500,7 @@ void Client::tick()
     if (active_con) {
       return seastar::when_all_succeed(active_con->get_conn()->keepalive(),
                                        active_con->renew_tickets(),
-                                       active_con->renew_rotating_keyring());
+                                       active_con->renew_rotating_keyring()).then_unpack([] {});
     } else {
       return seastar::now();
     }
@@ -796,7 +796,7 @@ seastar::future<> Client::handle_monmap(crimson::net::Connection* conn,
       logger().info("handle_monmap: renewing tickets");
       return seastar::when_all_succeed(
        active_con->renew_tickets(),
-       active_con->renew_rotating_keyring()).then([](){
+       active_con->renew_rotating_keyring()).then_unpack([](){
          logger().info("handle_mon_map: renewed tickets");
        });
     } else {
index 78578a5959aa10a6034ec60ae9c08cfd1c1de4e2..f89f589adef10aa136bdbf0aeecd7f6e20d073d5 100644 (file)
@@ -93,7 +93,9 @@ void Protocol::close(bool dispatch_reset,
       return seastar::now();
     }),
     std::move(reset_dispatched)
-  ).finally(std::move(cleanup));
+  ).then_unpack([] {
+    return seastar::now();
+  }).finally(std::move(cleanup));
 }
 
 seastar::future<> Protocol::send(MessageRef msg)
index 75c215bf144f270f1be8c70f8a0e205701ad1bba..1aabd4ced422451e2b66436ca8c09e9afe7671d2 100644 (file)
@@ -132,7 +132,9 @@ seastar::future<> Socket::close() {
   return seastar::when_all_succeed(
     in.close(),
     close_and_handle_errors(out)
-  ).handle_exception([] (auto eptr) {
+  ).then_unpack([] {
+    return seastar::now();
+  }).handle_exception([] (auto eptr) {
     logger().error("Socket::close(): unexpected exception {}", eptr);
     ceph_abort();
   });
index d92401bc3ab58ccefbc04ada46f7ccfc1aab1dad..6103bdf53cedbe303da4fd173a5841a90f10472a 100644 (file)
@@ -65,7 +65,7 @@ seastar::future<> Heartbeat::start(entity_addrvec_t front_addrs,
                                    start_messenger(*back_msgr,
                                                   back_addrs,
                                                   chained_dispatchers))
-    .then([this] {
+    .then_unpack([this] {
       timer.arm_periodic(
         std::chrono::seconds(local_conf()->osd_heartbeat_interval));
     });
@@ -95,6 +95,8 @@ seastar::future<> Heartbeat::stop()
   return gate.close().then([this] {
     return seastar::when_all_succeed(front_msgr->shutdown(),
                                     back_msgr->shutdown());
+  }).then_unpack([] {
+    return seastar::now();
   });
 }
 
index 8454780f4ca1d5f1f59dd18140054959ecaadac9..d1f55ddc781860fda0d386ab219ae99d888f695e 100644 (file)
@@ -166,7 +166,7 @@ seastar::future<> OSD::mkfs(uuid_d osd_uuid, uuid_d cluster_fsid)
     return when_all_succeed(
       store->write_meta("ceph_fsid", cluster_fsid.to_string()),
       store->write_meta("whoami", std::to_string(whoami)));
-  }).then([cluster_fsid, this] {
+  }).then_unpack([cluster_fsid, this] {
     fmt::print("created object store {} for osd.{} fsid {}\n",
                local_conf().get_val<std::string>("osd_data"),
                whoami, cluster_fsid);
@@ -277,10 +277,10 @@ seastar::future<> OSD::start()
         .then([this, chained_dispatchers]() mutable {
          return public_msgr->start(chained_dispatchers);
        }));
-  }).then([this] {
+  }).then_unpack([this] {
     return seastar::when_all_succeed(monc->start(),
                                      mgrc->start());
-  }).then([this] {
+  }).then_unpack([this] {
     return _add_me_to_crush();
   }).then([this] {
     monc->sub_want("osd_pg_creates", last_pg_create_epoch, 0);
@@ -430,6 +430,8 @@ seastar::future<> OSD::start_asok_admin()
       asok->register_command(make_asok_hook<OsdStatusHook>(*this)),
       asok->register_command(make_asok_hook<SendBeaconHook>(*this)),
       asok->register_command(make_asok_hook<FlushPgStatsHook>(*this)));
+  }).then_unpack([] {
+    return seastar::now();
   });
 }
 
@@ -472,6 +474,8 @@ seastar::future<> OSD::stop()
       return when_all_succeed(
          public_msgr->shutdown(),
          cluster_msgr->shutdown());
+    }).then_unpack([] {
+      return seastar::now();
     }).handle_exception([](auto ep) {
       logger().error("error while stopping osd: {}", ep);
     });
index ec30841a12f93fd4d98b84cc3be58c54d19cf8a2..a96479d4076e79584edbe56ed1c27b88089ece44 100644 (file)
@@ -86,7 +86,7 @@ seastar::future<> PGAdvanceMap::start()
            osd.shard_services.dispatch_context(
              pg->get_collection_ref(),
              std::move(rctx)));
-       }).then([this] {
+       }).then_unpack([this] {
           return osd.shard_services.send_pg_temp();
         });
     }).then([this, ref=std::move(ref)] {
index b52cdfb7ecbbfffdb8b06cffd2206887c2f93b2d..46c6d710df6e6e9f7b0de4f793dad7c056e56e02 100644 (file)
@@ -137,7 +137,10 @@ seastar::future<> ShardServices::dispatch_context(
   return seastar::when_all_succeed(
     dispatch_context_messages(
       BufferedRecoveryMessages{ceph_release_t::octopus, ctx}),
-    col ? dispatch_context_transaction(col, ctx) : seastar::now());
+    col ? dispatch_context_transaction(col, ctx) : seastar::now()
+  ).then_unpack([] {
+    return seastar::now();
+  });
 }
 
 void ShardServices::queue_want_pg_temp(pg_t pgid,
index 30793487d7803ab1f37fccea5fa9350be5199e5b..1efef3a2f574c5ce83bf15621adda54e5b27101b 100644 (file)
@@ -661,7 +661,7 @@ static seastar::future<> run(
       return seastar::when_all_succeed(
         server->init(server_conf.v1_crc_enabled, server_conf.addr),
         client->init(client_conf.v1_crc_enabled)
-      ).then([client, addr = client_conf.server_addr] {
+      ).then_unpack([client, addr = client_conf.server_addr] {
         return client->connect_wait_verify(addr);
       }).then([client, ramptime = client_conf.ramptime,
                msgtime = client_conf.msgtime] {