Comment 1 for bug 1503453

Revision history for this message
Mark Silence (madasi) wrote :

My initial thought was to swap the logical order of the _node_resources_used and the _node_resources_unavailable checks so that the check for instances only happens after we check for unavailable conditions, however I think that would cause the same situation as bug #1502177 where if you have a maintenance node with an active instance that nova does know about, it would set the usage itself from the instance record, subtract it from the 0 total resources we sent due to maintenance state, and would report negative free space.

It looks like if the ironic driver implements the get_per_instance_usage() call, then the compute's resource tracker would properly account for orphaned instances and stop reporting them as available capacity. However, I think we would need to pass an ironic node identifier since this probably addresses a compute under nova's one compute == one host assumption. This would mean changing the function signature and thus the driver API, which is not a trivial change.

Trying to see what the best way to do this is.