RouterInfo class has got internal_ports cache which is updated
in _process_internal_ports() method.
There was an issue in this updates logic because it was
iterating through enumerate local variable "internal_ports"
which represents current router ports and if such current port
was found in updated_ports list it was storred in
RouterInfo().internal_ports variable under same index as was
found in "internal_ports" local variable.
This sometimes leads to an issue because same port can be
stored under different index in internal_ports and
RouterInfo().internal_ports lists thus wrong port in
RouterInfo().internal_ports was overwritten.
Such issue leads to problem with generating radvd config file
because in ports cache list there was duplicate info about same port
so radvd config file contained duplicate interface definitions too.
This should be properly fixed by changing RouterInfo.internal_ports
to be a dict instead of list of ports but such patch would be much
bigger and (possibly) harded to backport to stable branches.
Reviewed: https:/ /review. openstack. org/633618 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=21cddc47b44 6fdfb5535b347c1 d7825a04e02c62
Committed: https:/
Submitter: Zuul
Branch: master
commit 21cddc47b446fdf b5535b347c1d782 5a04e02c62
Author: Slawek Kaplonski <email address hidden>
Date: Mon Jan 28 23:53:04 2019 +0100
Fix update of ports cache in router_info class
RouterInfo class has got internal_ports cache which is updated internal_ ports() method. ).internal_ ports variable under same index as was ).internal_ ports lists thus wrong port in ).internal_ ports was overwritten.
in _process_
There was an issue in this updates logic because it was
iterating through enumerate local variable "internal_ports"
which represents current router ports and if such current port
was found in updated_ports list it was storred in
RouterInfo(
found in "internal_ports" local variable.
This sometimes leads to an issue because same port can be
stored under different index in internal_ports and
RouterInfo(
RouterInfo(
Such issue leads to problem with generating radvd config file
because in ports cache list there was duplicate info about same port
so radvd config file contained duplicate interface definitions too.
This should be properly fixed by changing RouterInfo. internal_ ports
to be a dict instead of list of ports but such patch would be much
bigger and (possibly) harded to backport to stable branches.
Change-Id: I2e38457942518c 8a3e07e606091bb 6720317b77e
Closes-Bug: #1813279