commit 1153a46738fc3ffff98a1df9d94b5a55fdd58777
Author: Boden R <email address hidden>
Date: Fri Oct 3 13:48:08 2014 -0400
Preserve preexisting ports on server delete
When using the '--nic port-id' option for nova boot to bind
a server to an existing port, nova deletes the preexisting
port on server terminate (delete). This behavior is not correct
since the user has preallocated the port object and will
expect it to only be unbound from the server on delete.
This patch allow the existing port to be unbound from the instance
on server delete whereupon the port will still exist but not
be associated with the instance in neutron (note the '--nic
port-id' opt is only supported with neutron). The patch also
adds unit tests to verify the behavior + changes.
This patch also moves instance.info_cache.delete() to be called
after _shutdown in the compute manager as shutdown calls
deallocate_for_instance so the info_cache is still needed at this point.
Existing applications that created neutron ports and assigned them to a running
instance or to a instance that is created will need to be aware
that they are now respponsible for the deletion of the ports and that these
ports will not be deleted by nova when the instance is destroyed.
Reviewed: https:/ /review. openstack. org/126309 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=1153a46738f c3ffff98a1df9d9 4b5a55fdd58777
Committed: https:/
Submitter: Jenkins
Branch: master
commit 1153a46738fc3ff ff98a1df9d94b5a 55fdd58777
Author: Boden R <email address hidden>
Date: Fri Oct 3 13:48:08 2014 -0400
Preserve preexisting ports on server delete
When using the '--nic port-id' option for nova boot to bind
a server to an existing port, nova deletes the preexisting
port on server terminate (delete). This behavior is not correct
since the user has preallocated the port object and will
expect it to only be unbound from the server on delete.
This patch allow the existing port to be unbound from the instance
on server delete whereupon the port will still exist but not
be associated with the instance in neutron (note the '--nic
port-id' opt is only supported with neutron). The patch also
adds unit tests to verify the behavior + changes.
This patch also moves instance. info_cache. delete( ) to be called for_instance so the info_cache is still needed at this point.
after _shutdown in the compute manager as shutdown calls
deallocate_
Based on original work from Aaron Rosen <email address hidden> /review. openstack. org/#/c/ 77043/
for which you can see a stale patch review here:
https:/
UpgradeImpact:
Existing applications that created neutron ports and assigned them to a running
instance or to a instance that is created will need to be aware
that they are now respponsible for the deletion of the ports and that these
ports will not be deleted by nova when the instance is destroyed.
Co-authored-by: Aaron Rosen <email address hidden>
Co-authored-by: Davanum Srinivas <email address hidden>
Change-Id: Ia5367cf064d406 90670ffeac3c1f1 6998464c234
Closes-bug: 1158684