From 44a3caba77b49379b7b647188ae9d4a60213e295 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Tue, 18 Jun 2019 16:12:30 -0500 Subject: [PATCH] Make NFS already mounted message debug level When a share is already mounted there is currently a message logged at info level stating this whenever mount is called. Mount is called for every remote share when collecting stats, so this results in unactionable and useless messages filling the log file once a minute by default. Since nothing needs to be done in this case, and it is not really useful information to the administrator, this changes that logging to debug level so it is only seen if enabling the verbosity where an admin would want to see something like this. Change-Id: If7dc84c50ca7c9bae878a72b330c6d5ef9a3bab1 Signed-off-by: Sean McGinnis --- os_brick/remotefs/remotefs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os_brick/remotefs/remotefs.py b/os_brick/remotefs/remotefs.py index 3d036fa72..76c7f8fd6 100644 --- a/os_brick/remotefs/remotefs.py +++ b/os_brick/remotefs/remotefs.py @@ -97,7 +97,7 @@ class RemoteFsClient(executor.Executor): mount_path = self.get_mount_point(share) if mount_path in self._read_mounts(): - LOG.info('Already mounted: %s', mount_path) + LOG.debug('Already mounted: %s', mount_path) return self._execute('mkdir', '-p', mount_path, check_exit_code=0) @@ -122,7 +122,7 @@ class RemoteFsClient(executor.Executor): run_as_root=True, check_exit_code=0) except processutils.ProcessExecutionError as exc: if 'already mounted' in exc.stderr: - LOG.info("Already mounted: %s", share) + LOG.debug("Already mounted: %s", share) # The error message can say "busy or already mounted" when the # share didn't actually mount, so look for it. @@ -218,7 +218,7 @@ class ScalityRemoteFsClient(RemoteFsClient): same method signature for class inheritance purpose. """ if self._mount_base in self._read_mounts(): - LOG.info('Already mounted: %s', self._mount_base) + LOG.debug('Already mounted: %s', self._mount_base) return self._execute('mkdir', '-p', self._mount_base, check_exit_code=0) super(ScalityRemoteFsClient, self)._do_mount(