Merge "Add some extra logging around external event handling"

This commit is contained in:
Jenkins 2016-10-05 01:35:48 +00:00 committed by Gerrit Code Review
commit 9c89e07d17
2 changed files with 7 additions and 2 deletions

View File

@ -85,9 +85,10 @@ class ServerExternalEventsController(wsgi.Controller):
accepted_events.append(event)
accepted_instances.add(instance)
LOG.info(_LI('Creating event %(name)s:%(tag)s for '
'instance %(instance_uuid)s'),
'instance %(instance_uuid)s on %(host)s'),
{'name': event.name, 'tag': event.tag,
'instance_uuid': event.instance_uuid})
'instance_uuid': event.instance_uuid,
'host': instance.host})
# NOTE: as the event is processed asynchronously verify
# whether 202 is a more suitable response code than 200
_event['status'] = 'completed'

View File

@ -6626,6 +6626,10 @@ class ComputeManager(manager.Manager):
LOG.debug('Processing event %(event)s',
{'event': event.key}, instance=instance)
_event.send(event)
else:
LOG.warning(_LW('Received unexpected event %(event)s for '
'instance'),
{'event': event.key}, instance=instance)
def _process_instance_vif_deleted_event(self, context, instance,
deleted_vif_id):