When selecting IPs for MLAG peers SVIs, we typically choose
the top two IPs in the subnet (eg. .254 and .253 in a /24).
However, this may collide with the fixed_ip for the router,
which will cause EOS to reject the router create on one of
the peers as the VARP IP cannot be the same as the SVI IP.
The fix prosed here is to use the third highest IP in the
subnet if the fixed_ip is one of the two highest IPs in the
subnet.
Change-Id: I6a320a31b55edc947d288c9ad030bc476ae6ee9f
Notable changes:
- bump hacking to make it py38+ compatible
- (with changes to pass against the newer pep8 rules)
- ensure requests get monkey-patched to avoid exceeding
maximum recursion depth in SSL
- start running openstack-python3-yoga-jobs-neutron
Change-Id: I84be86737b493dfc811a772bbeabefd10e645206
A recent to the way neutron sends network info in callbacks
(4aa5de254d)
partially breaks the Arista L3 plugin.
This change moves over to the new format.
Change-Id: I553f8911a79d2b3ad8fdb03c9ceb9f9ff2acb6b0
This change removes the delete_default_gateway function from
create_router call path and updates the synchronize function to update
proper VRF default gateways only when needed.
Change-Id: I874b3f15f39e914282d7b92a07af9024c39e916f
Updated the code to use show version to check which vrf creation command
the switch supports. This will eliminate extra entries in syslog
Change-Id: Id3c3e42d2fc7165e5ea3c20bec3343c559f6465f
On switches that do not support vrf instance command, if the command
fails it will try again to check which commands are supported and will
generate a loop. This will prevent the L3 plugin to check for vrf
supported commands while it is checking what command are supported
Change-Id: If441bbf2c5d3863282aaede55f7f6f130c67844e
This commit is removing support fro python2 in networking-arista and
synchrinizing the package requirements with neutron. Because of this
some code changes have been performed in order for the pep8 test to pass
Change-Id: I829d7eec72cb22d1142782894b9833769f432a66
When an exception happens in synchronize thread, it will die and not
recover. Wrapping in try/catch to protect against any error. Also added
some logging to know step in processing
Change-Id: Ic0c9016daebd547ffa23408444c43849b953d98b
This change adds the option to create default route for routers that
have a default gateway defined. This is controled by setting
vrf_default_route option in the configution
Change-Id: I16ae7feacb04730111a4b5eb61d2c3ae0fb3f041
L3 plugin will be able to handle both swtiches that support only the
newer syntax with vrf instance and the old vrf definition syntax.
Change-Id: I2e9b88c4e6d18eb3880f44532c93cc8cb9b2f2f4
We were filtering ports only by device_id for the purpose of SVI/VLAN
creation. We only create SVIs for network:router_interface ports in the
driver, so the same should hold for the sync worker.
Change-Id: I31f6229b3c50b0c57ecbfb32de99ec080070cb94
This adds two new config settings: enable_cleanup and protected_vlans
that allows the L3 sync worker to cleanup stale VRFs, SVIs and VLANs
on L3 hosts without affecting config from sources that are not the Arista
L3 plugin. This change also adds support for automatic config file
generation with oslo-config-generator.
Change-Id: Ia1f151e7e54a7d8712279aa0d7b3adf7731feaab
The neutron.common.rpc and exceptions were rehomed into neutron-lib and
are currently shimmed in neutron [1]
This patch consumes those modules from neutron-lib by using lib's
modules rather than neutrons.
[1] https://review.openstack.org/#/c/586525/
Change-Id: I5da2225efcb330a4840b82ca8c185e4e9a8d7d44
Also:
- Improved error logging for L3/SG/arista_vlan
- Fixed tenant_id filter for router query
- Fixed VRF creation for routers with a space in their name
Change-Id: I7917b988d3e45e653a19c791b8529077ba93389b
The create_connection function in neutron.common.rpc is just an alias to
Connection. This patch switches to the later so we can remove the former
in: https://review.openstack.org/#/c/560130
Change-Id: I8f0a3f18d0fb1131fe1df581bfa4c720c0808648
The neutron.common.topics module was rehomed into neutron-lib with
commit Ie88b84949cbd55a4e7ad06341aab77b286cdc485
This patch consumes it by using neutron-lib's version of the module in
prep for Ia4a4604c259ce862597de80c6deeb3d408bf0e95
Change-Id: I300f81cb4c93a485dfef4e7d8a1ad61d239dccf5
The well known service type constants are in
neutron_lib.plugins.constants, but for legacy reasons a few still exist
and are referenced from neutron_lib.constants [1] that we'd like to
remove.
This patch switches references over to neutron_lib's plugin constants.
[1] https://github.com/openstack/neutron-lib/blob/master/neutron_lib/constants.py#L353
Change-Id: Iea954a5c916b527c7bb9d1db761204c3297b1fa6
This change documents option dependencies within the code and ensures
isolated test runs will work properly and not depend on other import side
effects.
Change-Id: I42aa0a496f64ecbae3f70af214b03e3dc9bae243
Remove the external dependency on jsonrpclib to better align with the
upstream OpenStack requirements. This change introduces a new
EAPIClient class for the L3 agent. In the future, the ML2 driver will be
refactored to use shared EAPI code.
Change-Id: Ia7cae6a9ae091f2ec306bd64ef1617236cfd6d83
The jsonrpclib library module is not python 3 compatible and not
actively maintained. jsonrpc-requests is newer, python compatible and
based upon the underlying requests library already in use.
Change-Id: I04878c7a56c4afea595bd85e65b54ce6193f3fb4
Ensure that the plugin uses the constant defined in neutron-lib.
L3_ROUTER_NAT will be dropped in favor of this. This change is in
https://review.openstack.org/#/c/394164/.
NeutronLibImpact
Partially-implements: blueprint neutron-lib
Change-Id: I6f569d8f914a92c27d97a2f82c8f693157222e16
Some of router functions (i.e. update, delete, etc) have been updated
to invoke ML2 fuctions which are executed in the session's context.
Arista L3 Plugin was invoking router base class funtions in context
as well. This now causes the problem because of upstream changes.
This patch removes those calls from the session's context.
Change-Id: Ifa859f3076f73528b36c6395001ff4b9f6958bce
This patch adds Ironic support to Arista ML2 driver.
This patch also adds support for Security Groups for
baremetal instances
Change-Id: I7449f511d172678a77e1b5f087f1b182a78948c0
An upstream code was changed to get the tenant_id for router.
This patch fixes L3 plugin to match with the upstream fix
Change-Id: I20ba82d014cbe8fabae59cfeded53dd1f8af88f2
Added missing 'r' to AristaServicePluginConfigError in a few places
in arista_l3_driver.py
Change-Id: I38b8db68fd7503ab565beb6cd2561d315618b569
Closes-Bug: #1552963
occured -> occurred
for arista_l3_driver.py
Also fixed following spelling typo in comments:
authentification -> authentication
genric -> generic
vaild -> valid
infromation -> information
Change-Id: Ic4b7c5a990a8de7576334a9715dd78ddba63a539
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
This patch moves all of remaining Arista code
from neutron repo to openstack/networking-arista
Change-Id: Ifeb5986a45acebf2e53e4769706d9d2e46b62f50
Closes-Bug: 1479937
Fixes three unit tests which have been broken since the network
type check was added. Adds the network_type field to the network
context dummy object.
Change-Id: I5dbc325fd941fad0d436510361f62a5024034812
Closes-bug: 1475735
Moving back-end drivers for Arista's L3
Service Plugin from Neutron tree to
networing_arist.
Change-Id: Ie394c31ae317a71f00be7195e15e05dc56df0ad0
Closes-bug: 1428904