Use the new deleted flag in statsd
Change-Id: Ifd453044ff2ac4007516aa8963571d45a135479d
This commit is contained in:
parent
719eb29395
commit
622331a450
@ -42,6 +42,11 @@ class GearJobs(object):
|
|||||||
retry_list.append(ping.job.task)
|
retry_list.append(ping.job.task)
|
||||||
continue
|
continue
|
||||||
if ping.result['hpcs_response'] == 'FAIL':
|
if ping.result['hpcs_response'] == 'FAIL':
|
||||||
|
if (
|
||||||
|
'status' in ping.result and
|
||||||
|
ping.result['status'] == 'DELETED'
|
||||||
|
):
|
||||||
|
continue
|
||||||
# Error returned by Gearman
|
# Error returned by Gearman
|
||||||
failed_list.append(ping.job.task)
|
failed_list.append(ping.job.task)
|
||||||
continue
|
continue
|
||||||
|
@ -132,14 +132,8 @@ class Sched(object):
|
|||||||
return tested, repaired
|
return tested, repaired
|
||||||
|
|
||||||
def _send_fails(self, failed_nodes, node_list):
|
def _send_fails(self, failed_nodes, node_list):
|
||||||
api = AdminAPI(self.args.api_server, self.logger)
|
|
||||||
for node in failed_nodes:
|
for node in failed_nodes:
|
||||||
data = self._get_node(node, node_list)
|
data = self._get_node(node, node_list)
|
||||||
# device could have been marked offline between getting the list
|
|
||||||
# and testing, check if this is the case
|
|
||||||
status_code, device_status = api.get_device(data['id'])
|
|
||||||
if device_status['status'] != 'ONLINE':
|
|
||||||
continue
|
|
||||||
|
|
||||||
message = (
|
message = (
|
||||||
'Load balancer failed\n'
|
'Load balancer failed\n'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user