Neutron can associate a floating ip to a new port
without disassociate from original instance port.
This situation will send network changed event only
for new instance port, and that event object contains
the new instance's id.
In this case nova will update new instance's info
but not original one's in nova's database table
instance_info_caches. For nova can get new instance's
id from the above event. So in table instance_info_caches,
both original instance and new instance will have the
same floating ip in their records. And this make it
possible that, in most situation, after your re-assign
floating ip, run "nova list" will return incorrect info,
multiple instances have a same floating ip, and this may
confuse users.
Nova will sync data in table instance_info_caches, but it
may take dozens of seconds.
The new added code will send network changed event for the
original instance, and this will make nova update instance_
_info_caches table in a few seconds.
Change-Id: If3ee11535f649fc51bf1a52806008c1c5c0e73b6
Closes-Bug: 1381886
(cherry picked from commit add8944d4dba2a69e8f7da47f120d5dc63952f77)
Reviewed: https:/ /review. openstack. org/133985 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=70fb84390d1 30514b47b570480 2c0c3f30739f2c
Committed: https:/
Submitter: Jenkins
Branch: stable/icehouse
commit 70fb84390d13051 4b47b5704802c0c 3f30739f2c
Author: lzklibj <email address hidden>
Date: Mon Oct 20 23:55:53 2014 -0700
fix event_send for re-assign floating ip
Neutron can associate a floating ip to a new port
without disassociate from original instance port.
This situation will send network changed event only
for new instance port, and that event object contains
the new instance's id.
In this case nova will update new instance's info info_caches. For nova can get new instance's info_caches,
but not original one's in nova's database table
instance_
id from the above event. So in table instance_
both original instance and new instance will have the
same floating ip in their records. And this make it
possible that, in most situation, after your re-assign
floating ip, run "nova list" will return incorrect info,
multiple instances have a same floating ip, and this may
confuse users.
Nova will sync data in table instance_ info_caches, but it
may take dozens of seconds.
The new added code will send network changed event for the
original instance, and this will make nova update instance_
_info_caches table in a few seconds.
Change-Id: If3ee11535f649f c51bf1a52806008 c1c5c0e73b6 9e8f7da47f120d5 dc63952f77)
Closes-Bug: 1381886
(cherry picked from commit add8944d4dba2a6