]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/store_test: add test coverage for tiny device misuse.
authorIgor Fedotov <ifedotov@suse.com>
Fri, 15 Jun 2018 10:48:03 +0000 (13:48 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Mon, 30 Jul 2018 21:50:36 +0000 (00:50 +0300)
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/test/objectstore/store_test.cc

index 0ce09665f69192475ea45144b9f3e02a619565b7..47795b690fb7e0a8ebcd7cd62d9a8e4ca98e8f17 100644 (file)
@@ -7033,6 +7033,43 @@ TEST_P(StoreTest, BluestoreStatistics) {
   f->flush(cout);
   cout << std::endl;
 }
+
+TEST_P(StoreTestSpecificAUSize, BluestoreTinyDevFailure) {
+  if (string(GetParam()) != "bluestore")
+    return;
+  // This caused superblock overwrite by bluefs, see
+  // https://tracker.ceph.com/issues/24480
+  SetVal(g_conf(), "bluestore_block_size",
+    stringify(1024 * 1024 * 1024).c_str()); //1 Gb
+  SetVal(g_conf(), "bluestore_block_db_size", "0");
+  SetVal(g_conf(), "bluestore_block_db_create", "false");
+  SetVal(g_conf(), "bluestore_bluefs_min",
+    stringify(1024 * 1024 * 1024).c_str());
+  StartDeferred(0x1000);
+  store->umount();
+  ASSERT_EQ(store->fsck(false), 0); // do fsck explicitly
+  store->mount();
+}
+
+TEST_P(StoreTestSpecificAUSize, BluestoreTinyDevFailure2) {
+  if (string(GetParam()) != "bluestore")
+    return;
+
+  // This caused assert in allocator as initial bluefs extent as slow device
+  // overlaped with superblock
+  // https://tracker.ceph.com/issues/24480
+  SetVal(g_conf(), "bluestore_block_size",
+    stringify(1024 * 1024 * 1024).c_str()); //1 Gb
+  SetVal(g_conf(), "bluestore_block_db_size",
+    stringify(1024 * 1024 * 1024).c_str()); //1 Gb
+  SetVal(g_conf(), "bluestore_block_db_create", "true");
+  SetVal(g_conf(), "bluestore_bluefs_min",
+    stringify(1024 * 1024 * 1024).c_str());
+  StartDeferred(0x1000);
+  store->umount();
+  ASSERT_EQ(store->fsck(false), 0); // do fsck explicitly
+  store->mount();
+}
 #endif  // WITH_BLUESTORE
 
 int main(int argc, char **argv) {