From: John Mulligan Date: Mon, 28 Feb 2022 20:43:47 +0000 (-0500) Subject: mgr/nfs: fix unintentional recursion X-Git-Tag: v18.0.0~1280^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=daa455cd168d62cd8fbcaba4d7aa79b56e68ef0d;p=ceph.git mgr/nfs: fix unintentional recursion 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 --- diff --git a/src/pybind/mgr/nfs/export.py b/src/pybind/mgr/nfs/export.py index 3ca4147123e32..4e1a8251aa7d0 100644 --- a/src/pybind/mgr/nfs/export.py +++ b/src/pybind/mgr/nfs/export.py @@ -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