Value of perserve_on_delete not correct after _heal_instance_info_cache
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Triaged
|
Medium
|
Unassigned | ||
Stein |
Triaged
|
Medium
|
Unassigned |
Bug Description
Description
===========
We spawn VM with port-id ,the value of preserve_on_delete is True ,When we lose some ports from instance_
Steps to reproduce
==================
1.Spawn VM with command :nova boot --flavor xx --nic port-id xx --image xx instance_name
2.nova interface-list instance_
3.Update nova db row, drop one interface from interfaces,such as
Update instance_
4.nova show instance_name (we can see ,vm lost network info )
5.after periodic task _heal_instance_
6.nova interface-list instance_name (Preserve On Delete became False ,not the original value)
summary: |
- Value of perserve_on_delete not corrte after _heal_instance_info_cache + Value of perserve_on_delete not correct after _heal_instance_info_cache |
This is the related mailing list thread:
http:// lists.openstack .org/pipermail/ openstack- discuss/ 2019-June/ 007363. html
I've proposed that when forcefully rebuilding the cache, since we don't know which ports nova created on behalf of the user, we should detect that and set preserve_ on_delete= True so that the ports are not accidentally deleted when the server is deleted (or when the ports are detached). This is a change in behavior for the user, but so is deleting the ports they didn't want us to delete and that's arguably worse. With my suggested solution we'd at least give the owner of the port the chance to clean it up.