]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nfs: fix unintentional recursion
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 28 Feb 2022 20:43:47 +0000 (15:43 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 1 Mar 2022 15:11:18 +0000 (10:11 -0500)
The `exports` property of the ExportMgr exists to cache the exports
configuration found in the .nfs namespace. Using that property
within the property method is probably not intentional and is probably
only working due to the lucky construction of the _exports dict
immediately after the None check so that the _exports dict is returned
(and is a mutable type).

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/nfs/export.py

index 3ca4147123e3297e536447a6c07ec8f1b16fe3a8..4e1a8251aa7d044bfb7515758e790a9959d20e49 100644 (file)
@@ -196,7 +196,7 @@ class ExportMgr:
             for cluster_id in known_cluster_ids(self.mgr):
                 self.export_conf_objs = []  # type: List[Export]
                 self._read_raw_config(cluster_id)
-                self.exports[cluster_id] = self.export_conf_objs
+                self._exports[cluster_id] = self.export_conf_objs
                 log.info("Exports parsed successfully %s", self.exports.items())
         return self._exports