The agent code is enhanced to allow the trunk agent-side counterpart
to be activated seamlessly by means or local registry notifications.
Some integration with the server side is provided by loading the
RPC agent-side skeleton. Basic unit testing provides some coverage.
More effective functional and system coverage will be provided once
everything comes together.
Partially-implements: blueprint vlan-aware-vms
Co-Authored-By: Adolfo Duarte <adolfo.duarte@hpe.com>
Change-Id: Id70553e8980593f99548a4d2b0a78355933f7c2c
With 7c0f189309 in tree, we made
neutron-db-manage require neutron/tests/tools.py installed. Some
distributions, like RDO, may split the python package into core package
and the one that contains python code needed for testing only (anything
under neutron/tests/), and hence don't guarantee that all setups have
neutron.tests package available.
This fix moves the import_module_recursively function from
neutron.tests.tools into neutron.common.utils because it has non-testing
use cases. All existing cases where we use the function switched to the
new location. The old symbol still works, though triggers a deprecation
warning, and will be removed in the next cycle.
Change-Id: Ia8d91a1704c894bc1f6cf14e6cdd971fab255b62
Closes-Bug: #1612959
Problem: The process of transaction is too short.
In case of concurrent requests, both requests can pass all tests
and going to write to database. Sometimes the transaction of first
request closed before the transaction of the second request has been
open, because of the above problem. So both of them can access the
latest data (revision number), then passing the StaleDataError and
writing to database successfully.
This patch moved the _check_for_duplicate_rules_in_db into transaction
to prevent race condition.
Change-Id: I9ff2bf830c0c9d1114833d33603622f447ee7ca2
Closes-bug: #1532696
This patch revisits the is_bound() condition for ports that
are about to be used as parent in a trunk. The existing
logic checked that for a port to be bound it is either an
unbound compute port or it is associated to a host. In pratice
only the latter suffices.
Partially-implements: blueprint vlan-aware-vms
Change-Id: I1c2c877b5cc421e05d97c7f528546a6a2c14aa46
This patch introduces the RPC backbone required for the trunk plugin to work
with agent-based L2 drivers (like Open vSwitch); to this aim it uses the RPC
callback registry to send/receive trunk and subports OVOs over the wire.
More patches will follow up to complete the RPC integration; some stuff is
still work in progress, but there is enough substance that make this
patch worth it.
Partially-implements: blueprint vlan-aware-vms
Co-Authored-By: Ryan Tidwell <ryan.tidwell@hpe.com>
Co-Authored-By: Armando Migliaccio <armamig@gmail.com>
Co-Authored-By: Adolfo Duarte <adolfo.duarte@hpe.com>
Change-Id: I3c749e9287cc778e12d3e022ddfd157ac9c1569b
DB errors or retry exceptions that bubble up to the
plugin may get masked by integrity violation errors
due to partial provisioning of resources. When that
happens, we should make sure any pending resource
is cleaned up before reattempting the operation.
Closes-bug: #1612615
Change-Id: I76e9f8e4b61fb3566d70af4236c19e4c5a523646
Those objects are intentionally not integrated into the database code so
far. This is to quicken access to their definitions to implement
push-notifications for security groups and ports.
Expanded the list of possible values for IpProtocolEnumField to allow
port numbers in addition to symbolic names since security group API
supports both.
This patch also makes DeclarativeObject not override extra filters on
class creation and instead reuse the list of filters defined on the
class as an attribute. This allows to define it per class not per object
(in __init__).
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
Partially-Implements: blueprint push-notifications
Change-Id: Idcdc928d37d5d661428525700001154f50c3056e
Co-Authored-By: Sayali Lunkad <sayali.lunkad@suse.com>
Co-Authored-By: Victor Morales <victor.morales@intel.com>
With the in-tree pluggable IPAM driver, IPAM rollback tries to use the
DB session after it has been rolled back due to an exception. This
driver doesn't need roll back, so fix this by adding a method to the
driver signalling that rollback shouldn't be attempted.
Change-Id: Ic254789e58a8a51cd1aa943cb71de12410f4c0a7
Closes-Bug: #1603162
Related-Bug: #1516156
This patch addresses all the DeprecationWarning errors related
to constants in neutron.db.models_v2.
Change-Id: I54402d4441b3ccb15bab63adf830fa196bba62c3
get_engine() can be called directly with
context_manager.get_legacy_facade().get_engine()
Related-bug: #1520719
Change-Id: Id38c06aee428200a061c59a984b59b81b24056e3
This patch moves the module into the canonical place. It does it in
backwards compatible way, by leaving the model available under the old
location, only emitting a deprecation warning on access from there. In
the future, the old module will be completely cleaned up.
This patch also makes head.py file that is used to import and register
all models in the tree to import everything from under neutron.db.models
without explicitly naming each module. In that way, we can avoid the
need to import each new module with models as long as it's located in
the designated place. The file is a well known abuser in terms of git
conflicts, and it's better to avoid manual work.
Change-Id: I084031e6b3c8d9113cc6ee6e3967f0e1edaee0b5
Partial-Bug: #1597913
This change is depends on change in oslo.db that adds option to
set hook for osprofiler.
Depends-On: I78bef4979c2000d05658ce17d0348cd0a10c24d9
Related-bug: #1600739
Related-bug: #1520719
Change-Id: Ie971654f988c98015edc7a59cf00b27e83c0c1b7
Some drivers, like the Open vSwitch one, may restrict the creation of a
trunk from a bound port (i.e. prevents from creating trunks after a VM
is already booted on the port).
This limitation frees us from worrying about dataplane migrations for OVS
as trunk ports and regular ports are wired differently.
However, other drivers, like the Linux Bridge one, may not be affected by
this limitation, and the existing rule should be relaxed to allow the
operation based on whether not the driver can support it.
Partially-implements: blueprint vlan-aware-vms
Change-Id: Ia938eb7cc845f6f144924acdb0e333d23516fcca
In this patchset, attribute 'ipam_segment_id' is added to ports to
contain the id of the segment where the port is bound in the case of a
routed network. This new attribute will be used by the Nova scheduler
to place an instance using the port in a host bound to the segment
Change-Id: Ide13a7c53c5f4a33894f459c38924830ba583f98
Partially-Implements: blueprint routed-networks
Refactoring configuration options for agent/l3/keepalived_state_change
to be in neutron/conf/agent/l3. This would allow centralization of all
configuration options under neutron/conf and provide an easy way to
import.
Change-Id: I18e5f683690cffd6e0ad5e35f459b86c5b3332ac
Partial-Bug: #1563069
This patch will separate security group db models from mixins for OVO
implementation work.
Change-Id: Ie38d3cc2efa5f580261f207748affb5840ba23c9
Partial-Bug: #1597913
This adds an API test to ensure that we maintain the behavior
of disassociating a floating IP if it receives an update with
an empty body.
Change-Id: I9efd941b621e15691af95cd88f391aa564e4b9bd
Related-Bug: #1607746