]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: bypass pool validation if "rbd_validate_pool" is false 26878/head
authorJason Dillaman <dillaman@redhat.com>
Sun, 10 Mar 2019 19:49:15 +0000 (15:49 -0400)
committerJason Dillaman <dillaman@redhat.com>
Sun, 10 Mar 2019 19:49:15 +0000 (15:49 -0400)
This config option is already used by the create image state
machine. This should address a broken test case when validating
pool vs self-managed snapshots.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/api/Pool.cc

index 0970b92f9c8c6f14ebfd9f6776c6118b215d2fcf..88adf561d200a3dd188f79db87345ecea5121768 100644 (file)
@@ -244,6 +244,12 @@ int Pool<I>::init(librados::IoCtx& io_ctx, bool force) {
     return r;
   }
 
+  ConfigProxy config{cct->_conf};
+  api::Config<I>::apply_pool_overrides(io_ctx, &config);
+  if (!config.get_val<bool>("rbd_validate_pool")) {
+    return 0;
+  }
+
   ThreadPool *thread_pool;
   ContextWQ *op_work_queue;
   ImageCtx::get_thread_pool_instance(cct, &thread_pool, &op_work_queue);