From 75d95dcda35ce0d6e7b6e1969b353bf9e44c3ea9 Mon Sep 17 00:00:00 2001 From: chunmei-liu Date: Thu, 23 Sep 2021 21:20:39 -0700 Subject: [PATCH] crimson/store-nbd: fix store_nbd build error for futurized store mkfs Signed-off-by: chunmei-liu --- src/crimson/tools/store_nbd/fs_driver.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/crimson/tools/store_nbd/fs_driver.cc b/src/crimson/tools/store_nbd/fs_driver.cc index f4c60f046fb5b..436ceeb9dc512 100644 --- a/src/crimson/tools/store_nbd/fs_driver.cc +++ b/src/crimson/tools/store_nbd/fs_driver.cc @@ -185,7 +185,14 @@ seastar::future<> FSDriver::mkfs() ).then([this] { uuid_d uuid; uuid.generate_random(); - return fs->mkfs(uuid); + return fs->mkfs(uuid).handle_error( + crimson::stateful_ec::handle([] (const auto& ec) { + crimson::get_logger(ceph_subsys_test) + .error("error creating empty object store in {}: ({}) {}", + crimson::common::local_conf().get_val("osd_data"), + ec.value(), ec.message()); + std::exit(EXIT_FAILURE); + })); }).then([this] { return fs->stop(); }).then([this] { -- 2.39.5