]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
tools/ceph_kvstore_tool: do not open rocksdb when repairing it
authorKefu Chai <kchai@redhat.com>
Thu, 15 Nov 2018 05:56:19 +0000 (13:56 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 15 Nov 2018 06:02:05 +0000 (14:02 +0800)
before this change, the `need_open_db` parameter is passed to the
constructor of BlueStore as `min_alloc_size`. and rocksdb will fail to
repair because Repairer::Run() also tries to acquire the db lock, and it
will fail to do so if the lock file is already acquired by
BlueStore::_mount().

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/tools/ceph_kvstore_tool.cc

index 4198f09a5d2b57a0d1f60065d4e1485a9e1cbe16..c66853a73abf6e149e213c682a7bb2ccc7023f52 100644 (file)
@@ -62,9 +62,9 @@ class StoreTool
   StoreTool(string type, const string &path, bool need_open_db=true) : store_path(path) {
     if (type == "bluestore-kv") {
 #ifdef WITH_BLUESTORE
-      auto bluestore = new BlueStore(g_ceph_context, path, need_open_db);
+      auto bluestore = new BlueStore(g_ceph_context, path);
       KeyValueDB *db_ptr;
-      int r = bluestore->start_kv_only(&db_ptr);
+      int r = bluestore->start_kv_only(&db_ptr, need_open_db);
       if (r < 0) {
        exit(1);
       }