EC2: fixed AttributeError when metadata is not found
Change-Id: I91e0141bd89cd18596ccae2ea213f641ba4d7f74 Closes-Bug: 1324091
This commit is contained in:
parent
e6015ce523
commit
904fad326b
|
@ -206,8 +206,7 @@ class MetadataRequestHandler(wsgi.Application):
|
|||
if meta_data is None:
|
||||
LOG.error(_LE('Failed to get metadata for instance id: %s'),
|
||||
instance_id)
|
||||
|
||||
if meta_data.instance['project_id'] != tenant_id:
|
||||
elif meta_data.instance['project_id'] != tenant_id:
|
||||
LOG.warn(_LW("Tenant_id %(tenant_id)s does not match tenant_id "
|
||||
"of instance %(instance_id)s."),
|
||||
{'tenant_id': tenant_id, 'instance_id': instance_id})
|
||||
|
|
Loading…
Reference in New Issue