From: Varsha Rao Date: Mon, 16 Aug 2021 05:39:18 +0000 (+0530) Subject: mgr/nfs: don't log fsal keys X-Git-Tag: v16.2.7~52^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5a5189163ca050c1823c1145fd9be36cdc0bb250;p=ceph.git mgr/nfs: don't log fsal keys FSAL keys are written to export objects. Don't log it, instead log the initial export before generating keys and user config object mostly will not contain export block. It's okay to log user config object content. Signed-off-by: Varsha Rao (cherry picked from commit b8c47c8d223f45092325cb8c02fa137eeebefb25) --- diff --git a/src/pybind/mgr/nfs/cluster.py b/src/pybind/mgr/nfs/cluster.py index 4211bc6760c8..f6afcf2b6df4 100644 --- a/src/pybind/mgr/nfs/cluster.py +++ b/src/pybind/mgr/nfs/cluster.py @@ -235,6 +235,7 @@ class NFSCluster: return 0, "", "NFS-Ganesha User Config already exists" rados_obj.write_obj(nfs_config, self._get_user_conf_obj_name(cluster_id), self._get_common_conf_obj_name(cluster_id)) + log.debug("Successfully saved %s's user config: \n %s", cluster_id, nfs_config) restart_nfs_service(self.mgr, cluster_id) return 0, "NFS-Ganesha Config Set Successfully", "" raise ClusterNotFound() diff --git a/src/pybind/mgr/nfs/export.py b/src/pybind/mgr/nfs/export.py index 6f84e3567201..4b1427fee034 100644 --- a/src/pybind/mgr/nfs/export.py +++ b/src/pybind/mgr/nfs/export.py @@ -65,8 +65,8 @@ class NFSRados: if not config_obj: # Return after creating empty common config object return - log.debug("write configuration into rados object " - f"{self.pool}/{self.namespace}/{obj}:\n{conf_block}") + log.debug("write configuration into rados object %s/%s/%s", + self.pool, self.namespace, obj) # Add created obj url to common config obj ioctx.append(config_obj, GaneshaConfParser.write_block( @@ -78,8 +78,8 @@ class NFSRados: with self.mgr.rados.open_ioctx(self.pool) as ioctx: ioctx.set_namespace(self.namespace) ioctx.write_full(obj, conf_block.encode('utf-8')) - log.debug("write configuration into rados object " - f"{self.pool}/{self.namespace}/{obj}:\n{conf_block}") + log.debug("write configuration into rados object %s/%s/%s", + self.pool, self.namespace, obj) ExportMgr._check_rados_notify(ioctx, config_obj) log.debug(f"Update export {obj} in {config_obj}") @@ -258,8 +258,8 @@ class ExportMgr: raw_config = obj.read(size) raw_config = raw_config.decode("utf-8") log.debug("read export configuration from rados " - "object %s/%s/%s:\n%s", self.rados_pool, - rados_namespace, obj.key, raw_config) + "object %s/%s/%s", self.rados_pool, + rados_namespace, obj.key) self.export_conf_objs.append(Export.from_export_block( GaneshaConfParser(raw_config).parse()[0], rados_namespace)) @@ -599,6 +599,7 @@ class ExportMgr: "clients": clients, } ) + log.debug("creating cephfs export %s", export) self._create_export_user(export) self._save_export(cluster_id, export) result = { @@ -634,6 +635,7 @@ class ExportMgr: "clients": clients, } ) + log.debug("creating rgw export %s", export) self._create_export_user(export) self._save_export(cluster_id, export) result = {