Don't log about retrying failed devices if empty

In a regular gate run we have hundreds of entries of
"retrying failed devices set([]) _update_port_info_failed_devices_stats",
which makes it hard to see when things are actually failing and
retrying.

This patch just makes it only log if there is a failed device present.

TrivialFix

Change-Id: I3388bce4d51f18a527de425927b7bfc96992f703
(cherry picked from commit 715e9c81fc)
This commit is contained in:
Kevin Benton 2017-02-16 10:42:19 -08:00 committed by Maciej Jozefczyk
parent 114973abb7
commit f2a99ab02b
1 changed files with 2 additions and 1 deletions

View File

@ -1239,7 +1239,8 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
port_info['removed'] &= port_info['current']
# retry failed devices
port_info['added'] |= failed_devices['added']
LOG.debug("retrying failed devices %s", failed_devices['added'])
if failed_devices['added']:
LOG.debug("retrying failed devices %s", failed_devices['added'])
port_info['removed'] |= failed_devices['removed']
# Update current ports
port_info['current'] |= port_info['added']