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.
Reviewed: https:/ /review. openstack. org/129826 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=add8944d4db a2a69e8f7da47f1 20d5dc63952f77
Committed: https:/
Submitter: Jenkins
Branch: master
commit add8944d4dba2a6 9e8f7da47f120d5 dc63952f77
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
Closes-Bug: 1381886