mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
log specific errors for problems managing lost instance
This commit is contained in:
parent
cddd9dfbef
commit
93aed04389
@ -246,8 +246,11 @@ def cluster_node_heartbeat(self):
|
||||
other_inst.save(update_fields=['capacity'])
|
||||
logger.error("Host {} last checked in at {}, marked as lost.".format(
|
||||
other_inst.hostname, other_inst.modified))
|
||||
except (IntegrityError, OperationalError):
|
||||
pass # another instance is updating the lost instance
|
||||
except DatabaseError as e:
|
||||
if 'did not affect any rows' in str(e):
|
||||
logger.debug('Another instance has marked {} as lost'.format(other_inst.hostname))
|
||||
else:
|
||||
logger.exception('Error marking {} as lost'.format(other_inst.hostname))
|
||||
|
||||
|
||||
@task(bind=True, base=LogErrorsTask)
|
||||
|
Loading…
Reference in New Issue
Block a user