The issue here is that the ironic nova driver attempts to calculate total node resources AND the used resources. However, calculating the the amount of resources available in the presence of an instance is handled by nova's resource_tracker and that overrides the *_used keys we set in the driver:
If the properties of an Ironic node change while it is associated with an instance, I think the best we can do is lie about available resources until the instance has been deleted and the resource tracker hits the node when it is unused.
The issue here is that the ironic nova driver attempts to calculate total node resources AND the used resources. However, calculating the the amount of resources available in the presence of an instance is handled by nova's resource_tracker and that overrides the *_used keys we set in the driver:
https:/ /git.openstack. org/cgit/ openstack/ nova/tree/ nova/compute/ resource_ tracker. py#n596
If the properties of an Ironic node change while it is associated with an instance, I think the best we can do is lie about available resources until the instance has been deleted and the resource tracker hits the node when it is unused.