]> 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)
committerAlfonso Martínez <almartin@redhat.com>
Wed, 3 Nov 2021 11:37:16 +0000 (12:37 +0100)
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>
(cherry picked from commit b8c47c8d223f45092325cb8c02fa137eeebefb25)

src/pybind/mgr/nfs/cluster.py
src/pybind/mgr/nfs/export.py

index 4211bc6760c876a588f6c297fd70dff95fa44b60..f6afcf2b6df44f117047a79a6d2dae823a75a039 100644 (file)
@@ -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()
index 6f84e35672011018802ed5368f2ca3a81ddc311a..4b1427fee0349b5f290218be9e11128171618ff0 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}")
 
@@ -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 = {