Fix logging levels

This is a fixup patch for bde6ed557034bc2eac633ff84f2e9515a5ef14d6,
and should follow the OpenStack Logging Standards.

Change-Id: Ie277c5742ab736f4c5cee1ee1badedf055323515
This commit is contained in:
Josh Gachnang 2015-08-04 09:29:44 -07:00
parent 74bd6142be
commit 50875381d8
2 changed files with 8 additions and 8 deletions
ironic_python_agent/extensions

@ -162,8 +162,8 @@ class AsyncCommandResult(BaseCommandResult):
self.command_error = e
self.command_status = AgentCommandStatus.CLEAN_VERSION_MISMATCH
self.command_result = None
LOG.info('Clean version mismatch for command %s',
self.command_name)
LOG.error('Clean version mismatch for command %s',
self.command_name)
except Exception as e:
LOG.exception('Command failed: %(name)s, error: %(err)s',
{'name': self.command_name, 'err': e})
@ -227,16 +227,16 @@ class ExecuteCommandMixin(object):
def execute_command(self, command_name, **kwargs):
"""Execute an agent command."""
with self.command_lock:
LOG.info('Executing command: %(name)s with args: %(args)s',
{'name': command_name, 'args': kwargs})
LOG.debug('Executing command: %(name)s with args: %(args)s',
{'name': command_name, 'args': kwargs})
extension_part, command_part = self.split_command(command_name)
if len(self.command_results) > 0:
last_command = list(self.command_results.values())[-1]
if not last_command.is_done():
LOG.info('Tried to execute %(command)s, agent is still '
'executing %(last)s', {'command': command_name,
'last': last_command})
LOG.error('Tried to execute %(command)s, agent is still '
'executing %(last)s', {'command': command_name,
'last': last_command})
raise errors.CommandExecutionError('agent is busy')
try:

@ -59,7 +59,7 @@ class CleanExtension(base.BaseAgentExtension):
the step returns.
"""
# Ensure the agent is still the same version, or raise an exception
LOG.info('Executing clean step %s', step)
LOG.debug('Executing clean step %s', step)
_check_clean_version(clean_version)
if 'step' not in step: