Stop logging swiftclient errors

Swiftclient is logging a 404 when looking for
overcloud-without-mergepy.yaml.  To stop this, disable logging
below the critical level for swiftclient.  Note that we catch the
resulting exception from swiftclient and log it ourselves if
necessary, so there's no loss of information in the legitimate
error case.

Change-Id: I24144f3ab2b63c4a0f5fc2c9271e4a51a9ea1353
Closes-Bug: 1626267
(cherry picked from commit 4f9e959704)
This commit is contained in:
Ben Nemec 2016-09-21 21:35:55 +00:00 committed by Julie Pichon
parent 225b023f8b
commit d6cbbdb2c8
1 changed files with 7 additions and 0 deletions

View File

@ -1030,6 +1030,13 @@ class DeployOvercloud(command.Command):
def take_action(self, parsed_args):
self.log.debug("take_action(%s)" % parsed_args)
# Swiftclient logs things like 404s at error level, which is a problem
# because we use EAFP to check for the existence of files. Turn off
# most swiftclient logging to avoid cluttering up our output with
# pointless tracebacks.
sc_logger = logging.getLogger("swiftclient")
sc_logger.setLevel(logging.CRITICAL)
self._validate_args(parsed_args)
clients = self.app.client_manager