list_instances() returns a list of nodes, not instances
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic |
Fix Released
|
Medium
|
Lucas Alvares Gomes |
Bug Description
From nova.virt.driver:
def list_instances(
"""Return the names of all the instances known to the virtualization
layer, as a list.
"""
However, the ironic driver currently just returns a list of ironic nodes. The best we can do from the Ironic driver is to return a list of instance uuids.
This causes some inaccurate accounting of running instances in nova.compute.
Returning names would require an added instance lookup, but there is also a list_instance_
Changed in ironic: | |
assignee: | nobody → Lucas Alvares Gomes (lucasagomes) |
Changed in ironic: | |
importance: | Undecided → Critical |
importance: | Critical → Medium |
Changed in ironic: | |
milestone: | none → juno-1 |
status: | Fix Committed → Fix Released |
Changed in ironic: | |
milestone: | juno-1 → 2014.2 |
Looking at this closer, it appears difficult to resolve instance names from Ironic node's associated instance_uuids from within IronicDriver: list_instances( ). We do not have access to the request context and consequently cannot use nova.objects. instance. Instace. get_by_ uuid(). In addition to adding the list_instance_ uuids() , I think list_instances() needs to be fixed. It is used in various checks throughout nova.compute. manager, which always return False for Ironic. This happens to work because of the single instance-to-node ratio, but who knows where this will bite us in the future.