|Soft deleting instances and the reclaim_instance_interval in Nova|
I got asked the other day how the reclaim_instance_interval in Nova works, so I thought I'd write it up here in case its useful to other people.
First off, there is a periodic task run the nova-compute process (or the computer manager as a developer would know it), which runs every reclaim_instance_interval seconds. It looks for instances in the SOFT_DELETED state which don't have any tasks running at the moment for the hypervisor node that nova-compute is running on.
For each instance it finds, it checks if the instance has been soft deleted for at least reclaim_instance_interval seconds. This has the side effect from my reading of the code that an instance needs to be deleted for at least reclaim_instance_Interval seconds before it will be removed from disk, but that the instance might be up to approximately twice that age (if it was deleted just as the periodic task ran, it would skip the next run and therefore not be deleted for two intervals).
Once these conditions are met, the instance is deleted from disk.
Tags for this post: openstack nova instance delete
Related posts: Nova vendordata deployment, an excessively detailed guide; Juno nova mid-cycle meetup summary: the next generation Nova API; Juno nova mid-cycle meetup summary: conclusion; Compute Kilo specs are open; Juno Nova PTL Candidacy; How we got to test_init_instance_retries_reboot_pending_soft_became_hard
posted at: 13:51 | path: /openstack | permanent link to this entry