From: Jason Dillaman Date: Sun, 10 Mar 2019 19:49:15 +0000 (-0400) Subject: librbd: bypass pool validation if "rbd_validate_pool" is false X-Git-Tag: v14.2.0~68^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F26878%2Fhead;p=ceph.git 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 --- 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);