]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nfs: don't log fsal keys
authorVarsha Rao <varao@redhat.com>
Mon, 16 Aug 2021 05:39:18 +0000 (11:09 +0530)
committerRamana Raja <rraja@redhat.com>
Thu, 30 Sep 2021 01:35:50 +0000 (21:35 -0400)
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 <varao@redhat.com>
src/pybind/mgr/nfs/cluster.py
src/pybind/mgr/nfs/export.py

index 993d046cd686d742a4fbbda6466c74fca98c55bd..5a0490023a593d1f7a992d9665f92644449d92d6 100644 (file)
@@ -221,6 +221,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()
index 0797160d4075ea6d721186f3e30ec2d87aa21d60..521f7c55b8d507f94fe2bd4b14dc372fccdbb3f7 100644 (file)
@@ -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}")
 
@@ -244,8 +244,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))
 
@@ -570,6 +570,7 @@ class ExportMgr:
                     "clients": clients,
                 }
             )
+            log.debug("creating cephfs export %s", export)
             self._create_export_user(export)
             self._save_export(cluster_id, export)
             result = {
@@ -605,6 +606,7 @@ class ExportMgr:
                     "clients": clients,
                 }
             )
+            log.debug("creating rgw export %s", export)
             self._create_export_user(export)
             self._save_export(cluster_id, export)
             result = {