Log firewall status on delete in case of status inconsistency

This should help to troubleshoot related gate failres.

Change-Id: I92d4d886cafed5faeb2a6d0b224f4b5dc8522100
Related-Bug: #1314313
This commit is contained in:
Eugene Nikanorov 2014-06-02 14:26:09 +04:00
parent a657c06d10
commit 85c7dc391f
1 changed files with 3 additions and 2 deletions

View File

@ -67,9 +67,10 @@ class FirewallCallbacks(object):
self.plugin.delete_db_firewall_object(context, firewall_id)
return True
else:
LOG.warn(_('Firewall %(fw)s unexpectedly deleted by agent, '
'status was %(status)s'),
{'fw': firewall_id, 'status': fw_db.status})
fw_db.status = const.ERROR
LOG.warn(_('Firewall %s unexpectedly deleted by agent.'),
firewall_id)
return False
def get_firewalls_for_tenant(self, context, **kwargs):