Statsd: Error when a Device fails with no LB attached

This shouldn't happen but did happen with the Java API in staging

Change-Id: I048eaf548e8208b5c42793b6d3db64e51b5792fa
This commit is contained in:
Andrew Hutchings
2013-06-10 21:53:11 +01:00
parent 8dbb892566
commit eb60f4391c

View File

@@ -134,7 +134,12 @@ class Sched(object):
def _send_fails(self, failed_nodes, node_list):
for node in failed_nodes:
data = self._get_node(node, node_list)
if not len(data['loadBalancers']):
self.logger.error(
'Device {0} has no Loadbalancer attached'.
format(data['id'])
)
continue
message = (
'Load balancer failed\n'
'ID: {0}\n'