To prevent data from being out of sync in the following situations:
1. Create a policy with two rules bound to the virtual machine
2. Stop l2-agent
3. Delete/change/clear policy rule
4. Start l2-agent (the rule is still there, out-of-sync)
Change-Id: I194c918d859172c31ae5ce1af925fdbb388f9cfb
Closes-Bug: #1812576
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.
Change-Id: I2e38457942518c8a3e07e606091bb6720317b77e
Closes-Bug: #1813279
The neutron.common.rpc module has been in neutron-lib for awhile now and
neutron is shimmed to use neutron-lib already.
This patch removes neutron.common.rpc and switches the code over to use
neutron-lib's implementation where needed.
NeutronLibImpact
Change-Id: I733f07a8c4a2af071b3467bd710290eee11a4f4c
1.It is best not to use 'netaddr.IPSet.add',
because _compact_single_network in 'IPSet.add' is quite time consuming
2.When the current address pool does not have enough addresses,
all addresses are allocated from the current pool,
and allocations are continued from the next address pool
until all addresses are assigned.
Change-Id: I804a95fdaa3552c785e85ffab7b8ac849c634a87
Closes-Bug: #1813253
If no override for dns_domain has been added by the user on the
tentant network, the default dns_domain should be used. Prior to
this fix, dns_domain got set to '' instead.
Closes-bug: #1774710
Change-Id: If206b943703eb638f7b22e59791ed8876f46f556
Instead of instantiating an IPDevice object just to get
the list of IPs, call get_devices_with_ip() instead since
that's what it's doing anyways.
Trivialfix
Change-Id: I5055d24a40d45f3f3b13b05249d353ea67acf4d5
If the Metering agent fails to send its report_state
to the server, it logs an exception:
Failed reporting state!: MessagingTimeout: Timed out...
If it then tries a second time and succeeds it just
goes on happily. It would be nice if it logged that
it had success on the subsequent attempt so someone
looking at the logs know it recovered.
Change-Id: If5522e5a975e05f195f1760d7fbd60264ac91fc3
In case of an l3 agent sync it is important to understand when
a router is processing an update to identify when it applies
changes that can cause failovers.
Change-Id: Ie9ba2a8ffebfcc3bfb35f7a48f73a25352309b4e
In Port Forwarding functional tests, port is created in setUp()
method. This port had specified exactly IP address and subnet to use.
This was proposed in [1] to fix issue when new port created in same
subnet got sometimes IP address outside of subnet range.
Unfortunatelly that fix was not enough and caused other issues
as sometimes this "fixed" IP address used for port might be
used e.g. by router_interface port and that caused sometimes
"409 conflict" response from Neutron sometimes.
This patch adds additional method in
neutron.tests.unit.db.test_db_base_plugin_v2 module to find first
free IP address from given subnet.
This method is now used in port forwarding tests module to choose
IP address for second created port in the subnet so there should be
no conflicts with IP addresses anymore.
[1] https://review.openstack.org/#/c/631815
Change-Id: Iee2f72acf6814a0f8f76d240862429a8b63c3b09
Closes-bug: #1813540
Today the neutron common exceptions already live in neutron-lib and are
shimmed from neutron. This patch removes the neutron.common.exceptions
module and changes neutron's imports over to use their respective
neutron-lib exception module instead.
NeutronLibImpact
Change-Id: I9704f20eb21da85d2cf024d83338b3d94593671e
This test class now inherits also from
neutron.tests.functional.base.BaseLoggingTestCase so logs from
those tests will be logged in file.
Change-Id: I69516e7417a655e320c3482ae7e59a3ba8891290
Dnsmasq driver used by dhcp agent has restart() method which is
calling disable() and then enable() dnsmasq process again.
What can be observed in functional tests from time to time it may
happen that start dnsmasq process will be called before old process
is really down. That leads to error that IP address to which
dnsmasq wants to bind is already in use and it fails to start.
This patch adds possibility to call disable() method with block flag
set to True. In such case driver will ensure in disable() method that
process is really not active.
This blocking disable() is used in restart() method now.
Change-Id: I419a451633badbc3d32edcee1945fca3e3d9f6be
Closes-Bug: #1811126
Developers run all sorts of different tools within Git repositories,
any of which can leave their own special trashfiles all over the
place. We can't every hope to catalog them all, so better to
recommend developers simply configure a global core.excludesfile to
filter the irrelevant files which tend to get created by their
personal choice of tools.
To this end, remove the long-standing sections for "Mr Developer"
and "Editors" since their mere existence here sends the signal that
we welcome (and have time to review) additions for any old tool
someone ever might happen to try. Also add a comment block
explaining this, for clarity.
We can, and should of course, continue to list files created by the
tools recommended by our workflow (test frameworks called from tox,
documentation and packaging builds, et cetera).
Change-Id: I4774772ec30611b0acd1ad2aadcf6a1a3f93938c
This patch switches over to the payload style callbacks for
BEFORE_DELETE events of SECURITY_GROUP resources.
NeutronLibImpact
Change-Id: I44ab8bfd92ece7501793979f8f45eae65f1e7a2c
Added VLAN parent device name and index and VXLAN link device
name and index.
Change-Id: Ib44a63c0648a7b5b07b1021b10e8994002031ce8
Related-Bug: #1804274
This patch switches BEFORE_DELETE callback events for PORT resources
over to the payload style args use a DBEventPayload object.
NeutronLibImpact
Change-Id: I8d8ff8f9ed7e2a1a6a66e3c3e6fc8e38cd9e29ca
The following methods are no longer used in CommonDbMixin:
- register_dict_extend_funcs
- _apply_filters_to_query
- _filter_non_model_columns
This patch removes them from neutron.
NeutronLibImpact
Change-Id: Ic7042cdcb29e95cc3a13292819d77abc3971fe8a