Merge "os_vif: fix logging of exceptions during plug/unplug"

This commit is contained in:
Jenkins 2016-06-09 16:03:17 +00:00 committed by Gerrit Code Review
commit f0b5b4f583
1 changed files with 4 additions and 4 deletions

View File

@ -76,8 +76,8 @@ def plug(vif, instance_info):
plugin.plug(vif, instance_info)
LOG.info(_LI("Successfully plugged vif %s"), vif)
except Exception as err:
LOG.error(_LE("Failed to plug vif %(vif)s. Got error: %(err)s"),
vif=vif, err=err)
LOG.error(_LE("Failed to plug vif %(vif)s"),
{"vif": vif}, exc_info=True)
raise os_vif.exception.PlugException(vif=vif, err=err)
@ -109,8 +109,8 @@ def unplug(vif, instance_info):
plugin.unplug(vif, instance_info)
LOG.info(_LI("Successfully unplugged vif %s"), vif)
except Exception as err:
LOG.error(_LE("Failed to unplug vif %(vif)s. Got error: %(err)s"),
vif=vif, err=err)
LOG.error(_LE("Failed to unplug vif %(vif)s"),
{"vif": vif}, exc_info=True)
raise os_vif.exception.UnplugException(vif=vif, err=err)