Comment 7 for bug 1446449

Revision history for this message
vikas choudhary (choudharyvikas16) wrote :

Balazs Gibizer 2:19 PM
"I cannot really comment form ironic point of view. However I think you create a race between _query_driver_power_state_and_sync (which is called from the periodic task _sync_power_states) and _run_pending_deletes (see https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L6347) which also a periodic task. The later gets deleted but not cleaned instances from the db and cleans up the instance disk while the former sets the cleaned flag without cleaning the instance disk. Therefore I think if the former runs first then the instance disk will not be deleted and we will leak resources."

Thanks Gibi. You are right. I was doing mistake.Actually libvirt driver and ironic driver does not behave exactly same.In case of a deploy failure, ironic driver do clean up hypervisor but thats not the case with libvirt driver. https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L2490 https://github.com/openstack/nova/blob/master/nova/virt/ironic/driver.py#L796
Fix should be related to ironic driver only.I will be re-submitting changes soon.