]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: refresh full global config when applying metadata 41763/head
authorJason Dillaman <dillaman@redhat.com>
Thu, 29 Oct 2020 14:10:56 +0000 (10:10 -0400)
committerCory Snyder <csnyder@iland.com>
Fri, 16 Jul 2021 17:19:57 +0000 (13:19 -0400)
The ConfigProxy contains a point-in-time copy of the global config
that is dynamically updated in CephContext::_conf. Upon an image
refresh, pull the latest version of the global config from the
CephContext and apply it to the config stored within the ImageCtx.

Fixes: https://tracker.ceph.com/issues/48035
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 352dec753ead8b61e19b46d096255e06393b740f)

src/librbd/ImageCtx.cc

index a2a150887086cf4a870062346067e19f6f0c8dd9..4c21b2a411bc3eac3011f658dfbbd623aec33eac 100644 (file)
@@ -730,14 +730,8 @@ public:
     std::unique_lock image_locker(image_lock);
 
     // reset settings back to global defaults
-    for (auto& key : config_overrides) {
-      std::string value;
-      int r = cct->_conf.get_val(key, &value);
-      ceph_assert(r == 0);
-
-      config.set_val(key, value);
-    }
     config_overrides.clear();
+    config.set_config_values(cct->_conf.get_config_values());
 
     // extract config overrides
     for (auto meta_pair : meta) {