Handle case where etcd key is already removed on job complete
This commit is contained in:
parent
99dff912af
commit
c2dc1c9b75
1 changed files with 5 additions and 2 deletions
|
@ -329,7 +329,7 @@ class EphemeralBuilderManager(BaseManager):
|
|||
job.job_details['build_uuid'], build_component.builder_realm)
|
||||
yield From(build_component.start_build(job))
|
||||
except (KeyError, etcd.EtcdKeyError):
|
||||
logger.debug('Builder is asking for more work, but work already completed')
|
||||
logger.exception('Builder is asking for more work, but work already completed')
|
||||
|
||||
def build_component_disposed(self, build_component, timed_out):
|
||||
logger.debug('Calling build_component_disposed.')
|
||||
|
@ -344,7 +344,10 @@ class EphemeralBuilderManager(BaseManager):
|
|||
|
||||
# Release the lock in etcd
|
||||
job_key = self._etcd_job_key(build_job)
|
||||
yield From(self._etcd_client.delete(job_key))
|
||||
try:
|
||||
yield From(self._etcd_client.delete(job_key))
|
||||
except (KeyError, etcd.EtcdKeyError):
|
||||
logger.exception('Builder is asking for job to be removed, but work already completed')
|
||||
|
||||
self.job_complete_callback(build_job, job_status)
|
||||
|
||||
|
|
Reference in a new issue