mirror of
https://github.com/ansible/awx.git
synced 2026-03-25 04:45:03 -02:30
log specific errors for problems managing lost instance
This commit is contained in:
@@ -246,8 +246,11 @@ def cluster_node_heartbeat(self):
|
|||||||
other_inst.save(update_fields=['capacity'])
|
other_inst.save(update_fields=['capacity'])
|
||||||
logger.error("Host {} last checked in at {}, marked as lost.".format(
|
logger.error("Host {} last checked in at {}, marked as lost.".format(
|
||||||
other_inst.hostname, other_inst.modified))
|
other_inst.hostname, other_inst.modified))
|
||||||
except (IntegrityError, OperationalError):
|
except DatabaseError as e:
|
||||||
pass # another instance is updating the lost instance
|
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)
|
@task(bind=True, base=LogErrorsTask)
|
||||||
|
|||||||
Reference in New Issue
Block a user