Not able to spawn Instnance, Error: Instance object has no attribute flavor

Bug #1449273 reported by Ignatious Johnson Christopher
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
nova-docker
Fix Committed
Undecided
Ignatious Johnson Christopher

Bug Description

Launching Instance fails with the following trace, AttributeError: 'Instance' object has no attribute 'flavor'

Nova-compute.log:
------------------------------
2015-03-05 13:01:07.159 5255 ERROR nova.compute.manager [-] [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] Instance failed to spawn
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] Traceback (most recent call last):
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 224
3, in _build_resources
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] yield resources
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 211
3, in _build_and_run_instance
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] block_device_info=block_device_info)
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] File "/usr/lib/python2.7/site-packages/novadocker/virt/docker/driver.py",
 line 422, in spawn
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] 'mem_limit': self._get_memory_limit_bytes(instance),
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] File "/usr/lib/python2.7/site-packages/novadocker/virt/docker/driver.py",
 line 335, in _get_memory_limit_bytes
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] return instance.flavor.memory_mb * units.Mi
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] AttributeError: 'Instance' object has no attribute 'flavor'
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621]
2015-03-05 13:08:06.978 5255 WARNING nova.compute.manager [-] While synchronizing instance power states, found 1 instances in the database and 0 instances on the hypervisor.
2015-03-05 13:58:07.683 5255 ERROR nova.compute.manager [-] [instance: 418e51b8-89e6-4940-815c-55d334e65b38] Instance failed to spawn
2015-03-05 13:58:07.683 5255 TRACE nova.compute.manager [instance: 418e51b8-89e6-4940-815c-55d334e65b38] Traceback (most recent call last):
2015-03-05 13:58:07.683 5255 TRACE nova.compute.manager [instance: 418e51b8-89e6-4940-815c-55d334e65b38] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 224
3, in _build_resources
2015-03-05 13:58:07.683 5255 TRACE nova.compute.manager [instance: 418e51b8-89e6-4940-815c-55d334e65b38] yield resources
2015-03-05 13:58:07.683 5255 TRACE nova.compute.manager [instance: 418e51b8-89e6-4940-815c-55d334e65b38] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 211
3, in _build_and_run_instance
2015-03-05 13:58:07.683 5255 TRACE nova.compute.manager [instance: 418e51b8-89e6-4940-815c-55d334e65b38] block_device_info=block_device_info)
2015-03-05 13:58:07.683 ...

Changed in nova-docker:
assignee: nobody → Ignatious Johnson Christopher (ijohnson-x)
Changed in nova-docker:
status: New → In Progress
Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/#/c/165196/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova-docker (master)

Reviewed: https://review.openstack.org/165196
Committed: https://git.openstack.org/cgit/stackforge/nova-docker/commit/?id=5dd4f95c8aca6213323c754fab7dec2d8056f088
Submitter: Jenkins
Branch: master

commit 5dd4f95c8aca6213323c754fab7dec2d8056f088
Author: Ignatious Johnson Christopher <email address hidden>
Date: Tue Mar 17 12:37:35 2015 -0700

    Fix to use the get_flavor method to retrieve the flavor information from
    the Instance Object.

    Closes-Bug: #1449273

    Change-Id: I7cbc06d51551963b162c54174866728a40c8f047

Changed in nova-docker:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.