From 520e46f43b0e6e272a3537b9604a9464b5b15d5b Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Sun, 10 Mar 2019 15:49:15 -0400 Subject: [PATCH] librbd: bypass pool validation if "rbd_validate_pool" is false 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 --- src/librbd/api/Pool.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/librbd/api/Pool.cc b/src/librbd/api/Pool.cc index 0970b92f9c8..88adf561d20 100644 --- a/src/librbd/api/Pool.cc +++ b/src/librbd/api/Pool.cc @@ -244,6 +244,12 @@ int Pool::init(librados::IoCtx& io_ctx, bool force) { return r; } + ConfigProxy config{cct->_conf}; + api::Config::apply_pool_overrides(io_ctx, &config); + if (!config.get_val("rbd_validate_pool")) { + return 0; + } + ThreadPool *thread_pool; ContextWQ *op_work_queue; ImageCtx::get_thread_pool_instance(cct, &thread_pool, &op_work_queue); -- 2.39.5