network_info cache should be cleared before being rescheduled
If an instance fails to boot due to a non-networking error the instance
then gets rescheduled and launched on another compute node. In these cases
deallocate_for_instance() is called which deletes the network ports
allocated though the info_cache for the instance is never cleared. This patch
adds a call to update_instance_cache_with_nw_info() which causes the cache
to get cleared out. Note: the cache is only cleared if the instance hasn't
been marked for deletion. This is due to how instance_info_cache_update()
is implemented.
Change-Id: If967884c9a6276f5949a7a04b597cedcce12ba09
Closes-bug: #1285158
(cherry picked from commit 3538a9cd06e1e46ec5698edf4018c8d3075b619b)
Reviewed: https:/ /review. openstack. org/84583 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=4f262692cef 46f2a7f78f3491c 31bd5bf245de00
Committed: https:/
Submitter: Jenkins
Branch: stable/havana
commit 4f262692cef46f2 a7f78f3491c31bd 5bf245de00
Author: Aaron Rosen <email address hidden>
Date: Mon Mar 3 22:55:35 2014 -0800
network_info cache should be cleared before being rescheduled
If an instance fails to boot due to a non-networking error the instance for_instance( ) is called which deletes the network ports instance_ cache_with_ nw_info( ) which causes the cache info_cache_ update( )
then gets rescheduled and launched on another compute node. In these cases
deallocate_
allocated though the info_cache for the instance is never cleared. This patch
adds a call to update_
to get cleared out. Note: the cache is only cleared if the instance hasn't
been marked for deletion. This is due to how instance_
is implemented.
Change-Id: If967884c9a6276 f5949a7a04b597c edcce12ba09 ec5698edf4018c8 d3075b619b)
Closes-bug: #1285158
(cherry picked from commit 3538a9cd06e1e46