Deleting an instance before scheduling with BFV fails to detach volume
Bug #1750666 reported by
Mohammed Naser
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Mohammed Naser | ||
Pike |
Fix Committed
|
Undecided
|
Mohammed Naser | ||
Queens |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
If you try to boot and instance and delete it early before scheduling, the '_delete_
However, if the cloud contains compute nodes before Pike, no block device mappings will be present in the database (because they are only saved if using the new attachment flow), which means the attachment IDs are empty and the volume delete fails:
2018-02-20 16:02:25,063 WARNING [nova.compute.api] Ignoring volume cleanup failure due to Object action obj_load_attr failed because: attribute attachment_id not lazy-loadable
tags: | added: queens-rc-potential volumes |
To post a comment you must log in.
It should be noted that this was found during backporting of https:/ /review. openstack. org/#/c/ 545132/ to stable/pike where we don't have this code to set the bdm.attachment_id:
https:/ /github. com/openstack/ nova/blob/ stable/ queens/ nova/compute/ api.py# L3765
This is also a problem for rocky/queens if there are older computes in the deployment.
So the delete code path needs to handle the case that the bdm in the build request doesn't have an attachment_id field set and ignore it, like:
if 'attachment_id' in bdm and bdm.attachment_id: api.delete_ attachment( ...)
volume_
else:
# do the old volume cleanup thing