NSXV distributed routers cannot be attached to flat networks. Yet
OpenStack should fail with an error instead of letting the backend
transaction fail.
Change-Id: If2f0c4c47d049ec37348d6cea32f0bb069a0c9b2
integrate with neutron patch Id3f09b78c8d0a8daa7ec4fa6f5bf79f7d5ab8f8b
And also skip new tests added in I99681736d05eefd82bdba72b3866eab9468ef5dd
Change-Id: I8b119bc69cc87185ea77646e70135c5984200038
1.Upgrade pylint to 2.4.4, add exclusions to the tests, and
fix some lint errors in the code
2. Fix user creation with GRANT in MySQL 8.0(Ubuntu Focal)
In Ubuntu Bionic (18.04) mysql 5.7 version used to create
the user implicitly when using using the GRANT.
Ubuntu Focal (20.04) has mysql 8.0 and with mysql 8.0 there
is no implicit user creation with GRANT. We need to
create the user first before using GRANT command.
See also commit I97b0dcbb88c6ef7c22e3c55970211bed792bbd0d
3. Remove fwaas from the zuul.yaml
4. Remove DB migration test which is failing ue to FWaaS migration
with py38
5. Fix cover tests python version in .tox
6. fix requirememnts
Change-Id: I22654a5d5ccaad3185ae3365a90afba1ce870695
1. No need to rollback the interface creation in teh distributed router
driver. It is rolled back on the plugin level. the Double rollback causes
a new error to be raised.
2. In the plugin level - do not alert on the rollback faliure.
It may be legit
2. In the plugin level raise a proper error to neutron, instead of the
internal one.
Change-Id: I129f595d6cd17cd0af62fc9e2855451b97e73ff0
Changing router size is allowed only for exclusive routers.
Raise an error for this in case of shared or distributed routers.
Change-Id: I522db0a1a2160550f4a424b5b2939fd43d9b758e
When trying to add interface to another distributed
router, a proper message should notify the user
that this is incorrect and not supported.
Change-Id: If9230c821665813939e676fbaafe296d42cac498
Signed-off-by: Michal Kelner Mishali <mkelnermishal@vmware.com>
A recent change in pep/pycodingchecks introduced new warnings as part of
the pep8 target that causes pep8 to fail now.
This patch fixes code that issued warnings W503,E731,E266,E402
Change-Id: I57c035440bd847193ea5f8a8078016fb9baa3c31
In the CI we were seeing failures with _update_router_gw_info due
to stale DB resources. Posting this as a stopgap until the patch
https://review.openstack.org/520324 lands
Change-Id: I9c899a2edb59ead81d9a2bdf728ee7207d4da0b0
VDR-connected networks were using designated DHCP Edge appliances
to provide metadata.
That was necessary before we introduced option 121 - which can be
used for route injection, which directs metadata traffic towards the
DHCP Edge.
This change removes some redundant code which is supporting metadata
in the old manner.
The patch deprecates supports of older versions of NSX which do not
support insertion of host routes which is required for the change.
Therefore dhcp_force_metadata config parameter has been deprecated.
Change-Id: I6b5e2acf09ce61c87d8ae97471955599cddf320b
Ensure that we treat the locks in the same order with the
delete and create operations.
The fix above result in a deadlcok due to a change in neutron
where ipam delete call port_update. This conflicted with
commit d89eba1a85.
To ensure locking for this we make use of a new lock for the
DHCP interfaces.
Change-Id: I6c3f25ab40247853024560c00d3faa106e5d90b8
Sometimes during gateway-set the distributed router creation is not done yet,
and the edge-id is not found.
In this case we should make sure to produce an error before the 'super' method
adds the new GW to the DB.
Change-Id: I6faa824be3f70ed6f105e12b4fa2614e6f3e5c5f
Router interface deletion would not have the correct AZ. This would
result in an exception with the DLR.
Change-Id: Ic403692bf657a04a9bc60aa987f389b4dbbeafc5
1. Use new enginefacade + l3_db breakage
Use reader and writer for db operations.
Partially-Implements blueprint: enginefacade-switch
2. Fix the callback pass for _prevent_l3_port_delete_callback
which was changed in commit Ia8ac4f510c003667cac95f76dea0e9ae55159878
3. QoS driver integration
Commit I5f747635be3fd66b70326d9f94c85a6736286bd2 removes the qos
notification driver.
Fixing the nsx-v and nsx-v3 to work only with the regular driver
4. _get_extra_routes_dict_by_router_id was removed by
Ia815d6c597730bd5cb49455e7409ca747a4cc22c
5. Floating IP association without subnet gateway IP
not supported by our plugins.
Added in commit If212c36d918ed57400a53f4b5fa1925b3d1fa6fd
Co-Authored-by: Adit Sarfaty <asarfaty@vmware.com>
Change-Id: I277ec5c38c5895337011019f71d586b254bfafde
Adding two notifications for events AFTER_CREATE and BEFORE_DELETE to signal
subscribers a router is being associated or disassociated with a service edge
and a valid external interface.
This is required for integration with Neutron dynamic routing BGP
plugin, for supporting shared routers lazy allocation and to notify when
external interface is added to an edge (using ROUTER_GATWAY
notifications would not work as relevant plugin code structure doesn't
permit it).
Also moving calls for base class (remove/add_router_interface and
_update_router_gw) outside of edge lock, as these will invoke
notifications for subscribers which need to lock the edge as well and we
want to have a consistent behavior.
Change-Id: Ifbfa959526c5b5e3add94708d96517935e5cb3fa
The next global configurations are now added also per AZ:
- mgt_net_moid
- mgt_net_proxy_ips
- mgt_net_proxy_netmask
- mgt_net_default_gateway
- external_network
- vdn_scope_id
- dvs_id
In case any of them is not defined in the AZ section, the global value will be used.
Change-Id: I5fca433fb86163cee84e3b9fc54182017a5f266b
When a new dhcp edge is created for a network that was just detached
from a distributed router, FW rules were not created, causing the
metadata not to work.
Change-Id: I4a60e45f4e5e16dafb13649b431d1f7fbacc9ab1
When a network is attached to a VDR, we replace the DHCP edge which
the network subnets are using.
While doing so, a lock should be obtained on the DHCP edge.
Change-Id: Ib7b2975d00af816c4104fdac5bd68c53a7bd2320
Ensure that the subnet is not attached to a DHCP egde if there is
no DHCP enabled on the subnet
Co-Authored-By: Kobi Samoray <ksamoray@vmware.com>
Change-Id: I480267ee98efb4f88d8b75b732af6d2f82cc0267
When a subnet gateway changes, and this subnet is the gateway of a router
we need to update the next hop on the router edge
Change-Id: If232ac89c880e8a501466abbfaae7b954609aa0d
Allow the admin to set a global CIDR for VDR transit network which
connect the TLR with the PLR.
Value is global: set at the config file and will be used for all the
VDRs.
Change-Id: Idb0ac4c5629cfc00bb2c434a1771b4c4a551071e
Commit fe72c1bd0c added context to
the method above. Here we do 2 things:
1. add in the missing context to method calls
2. ensure that context is the first parameter to be consistant
Change-Id: Iad7f575a3a212f123ecdf7a4827e2ab61993a49b
While removing the last DHCP-enabled subnet interface from VDR, a
regular DHCP edge should be attached to the subnet's network.
Change-Id: Ie87fb708c561fa54a457f006f60d407a369dd0bf
When a network is detached from VDR and attached to a new DHCP Edge,
metadata LB should be configured on that Edge.
Change-Id: I74e11526b74c0699d91ea0ba9e34db5b63ab0a16
The availability zones support will now include also data-store ids.
The configuration will include a name for each availability zone, resource pool
ID, datastore ID and optionally also HA datastore ID.
The user can choose a hint from this list when creating a router or a network.
The relevant edge appliances will be created using this data.
DocImpact: New format for the configuration parameter availability_zones under nsxv
Should include a list of availability zones. For each of them name, resource pool id,
datastore id and optionally also HA datastore id.
Change-Id: Icb72f6f674b8610687a6be730161a206d4c76257
This critical error is introduced from commit
336431d016d163f3e46cb2aeff68fcca7caf68e7, which failed to filter out
non-distributed routers and instead get all routers leading to adding
network on different type routers failed.
Change-Id: Iff44d96db80016277c0ee87d2a2d11a687738e4c
Add support for availability zones hints on routers creation
- The router will be created on an edge that belongs to the requested resource pool
- The nsxv_router_binding db table has a new column for the edge resource pool
- New nsxv configuration: availability_zones which should contain a list
of resource pools ids, that can be used as hints
DocImpact: New configuration parameter availability_zones under nsxv
Change-Id: Ib34689d554dafe25f62a045feebe9eed68d2174d
neutron_lib should be used instead of the attributes and constants
imports. This patch moves to using neutron_lib. This removes all of
the deprecated warnings (there are still some from neutron and
l2gw - those are addressed in other patches).
Change-Id: I796d749c46a69107a1a484e8774c5d501fc4704f
We cannot support adding an external subnet/port as a router interface
at the backend, so it should fail. Adding thoe as a gateway will still
work
Change-Id: Ife2fe386bda96d1e748030d96aee5793b2d8e498
When we add_router_interface or update_router_gw ops, plugin inside may
occur unexpected errors. For this case, plugin needs to try to clear error
configuration except for raising error.
Change-Id: Iadfea91c26358417e314ae4b2beeba5ab7953331