12314 Commits

Author SHA1 Message Date
Adit Sarfaty
e169e26ed2 NSX|V: Fix FWaaS error firewall delete
When deleting a firewall, errors like shared router attached to the FW
should be ignored, to allow the router deletion

Change-Id: I1c1d62418dbea5c9162fc7c84ee517928d4b12ee
2018-07-01 11:29:07 +03:00
Adit Sarfaty
c0f3149c40 NSX|v3 Admin utils refactor + additions
- Refactor nsx-v3 admin utilities by moving some of the code to a different
file which will later be consumed by the housekeeper code as well
- Adding orphaned firewall sections list/clean utilities
- Adding a capability to detect problems in logical port address bindings
- Update the documentation

Change-Id: If6aba167c2dd1234d1bb10a8a115fcdfe13cf2f0
2018-06-28 08:35:54 +00:00
Adit Sarfaty
f570c651bf NSX|V3 fix global SG creation duplication
In commit I0775e284f21012a01298168d5ca3dd1c74b95f05 we mocked the
db retry in order to prevent duplications in global SG creation
causeing the plugin to fail.
The mocked api was not enough, and should be replaces by teh oslo_db
api to cover all cases.

Change-Id: I31dfc519fc52c31d861352763b5b4d62adcbccea
2018-06-27 16:05:33 +03:00
Adit Sarfaty
d8a611316e TVD LBaaS fix for core plugin
For the TVD drivers, we need to get the relevant V/V3 core plugin
This support was neglected when we refactored the LBaaS drivers
recently.

Change-Id: I02c96ccdd23d1470c6d8a3945c6e0dea071a20d2
2018-06-26 08:07:33 +03:00
Boden R
2633ec0607 make python 3 the default for tox.ini
This patch is part of the community goals to enable python 3 first, and
only use python 2 when explict.

To do so, this patch:
- Makes python 3 the default env for non py27 tox targets.
- Adds a py3-dev target for running py3 locally.
- Refactors the pip install commands for stable dependency install into
their own target and refs them where needed.
- Updates the code to pass pep8 in python 3.
- Bumps the version of pylint to 1.7.1 to address some py3 issues in
earlier versions.

As part of this effort we should also look into making python 3 the
default for our VMware NSX 3rd party CI jobs.

Change-Id: Ibaa3e9d717f32ffb6479346163c14d4be7df50cf
2018-06-21 07:43:22 +00:00
Zuul
d6daec4455 Merge "Add devstack cleanup for loadbalancers" 2018-06-21 05:50:41 +00:00
sunqingliang6
2269aeb527 fix typos
Change-Id: I51bd8733774d890a28046cd197eb7ed6a89bb71e
2018-06-20 20:31:29 +08:00
Zuul
b91995ab0f Merge "LBaaS legacy mode bugfix" 2018-06-20 07:41:12 +00:00
Zuul
d3546ea6db Merge "NSX|V3: Fix update network rollback" 2018-06-20 07:39:50 +00:00
Adit Sarfaty
4902962453 Add devstack cleanup for loadbalancers
Delete all NSX LB objects on devstack cleanup, for LBaaS and Octavia

Change-Id: I6d3bd924414888406d60e1a3fa63e1f8aee949b9
2018-06-20 09:25:39 +03:00
Zuul
98bca2c201 Merge "fix typo" 2018-06-19 17:14:06 +00:00
Zuul
5e14ab11f9 Merge "modify grammatical errors" 2018-06-19 17:14:05 +00:00
sunqingliang6
946c16c4d1 modify grammatical errors
Change-Id: I6021f3ec0d7c06ed5fc63b175ea0995bb25013b4
2018-06-19 19:15:45 +08:00
sunqingliang6
64fe505ae4 replace 'a edge cluster' with 'an edge cluster'
Change-Id: Icc139961e7da66420b8e39e58b70514dd463956e
2018-06-19 19:11:06 +08:00
sunqingliang6
ea9e96c9b2 fix typo
Change-Id: I1a6f7fed010fc55e8370859d66d1b1faeaa4e23a
2018-06-19 19:07:33 +08:00
Adit Sarfaty
be77db2468 NSX|V3: Fix update network rollback
In case the NSX backend fails to update the logical switch the plugin
should roll back the changes.
The availability_zones_hints attribute of the network, that should not
be updated at all, faild this action.

Change-Id: Iaa4f675cbaad4e40f65b296c934ab6a8c1a0918c
2018-06-17 11:36:48 +03:00
Adit Sarfaty
a22c9e0b59 NSX|V3: Support LBaaS monitor update
Adding implementation for the LBaaS driver to update the backend
health monitor
In addition - add failure notification in the monitor create code

Change-Id: I96410f60835fd2920d4c53bab59725b8d0d147ef
2018-06-17 08:18:44 +00:00
Zuul
225206afad Merge "shim references for port_binding" 2018-06-17 07:56:15 +00:00
Zuul
5501bd9517 Merge "Fix V3 UT mocks to return the correct type of output" 2018-06-17 07:25:01 +00:00
Boden R
cc09f65ca4 shim references for port_binding
As a consequence of implementing multiple port bindings in the Neutron
reference implementation [1], the following attributes were made lists:

- 'port_binding' in the in the SQLAlchemy Port model.
- 'binding' in the Port OVO

As a consequence of this change, these attributes names were changed to
'port_bindings' and 'bindings' respectively. This patch updates the
references to those attributes.

To support neutron envs, both with and without the neutron change [2],
this patch adds a shim to use the proper port binding accessor.
NB: this shim may allow the tests to pass but does not test using the
proper "depends on" approach since that doesn't work today with the 3rd
party VMware NSX CI.

For more details see [1][2].

[1] https://review.openstack.org/#/c/571041
[2] https://review.openstack.org/#/c/414251

Change-Id: I35c24b83150d84a15997c5ebe3e7b51015f87e99
2018-06-15 15:23:55 -06:00
Zuul
675251af75 Merge "fix lower constraints targets in tox ini" 2018-06-15 20:29:30 +00:00
Zuul
1c0d8402fa Merge "NSX|V3: Fix ENS check on update network with QoS" 2018-06-15 18:27:46 +00:00
Boden R
3cce888421 fix lower constraints targets in tox ini
This patch updates tox ini to support both a dev and build target;
lower-constraints-dev and lower-constraints respectively.
The dev target is for running locally so it manually installs the
required projects whereas the build target doesn't as per zuul's
required project definition in project.yaml.

Also see https://review.openstack.org/#/c/573386/

Change-Id: I0e6cf1ca0f4b07c080ff5a7b221dabedfd8bf6cf
2018-06-14 06:45:46 -06:00
Boden R
b42661c957 updated lower constraints jobs for include dependencies
This patch updates our local zuul.yaml to define the required projects
so they are pulled into the jobs.

Change-Id: I1e668f9413363954f148f35f88c4c0687ce4f2c0
2018-06-14 06:44:21 -06:00
Kobi Samoray
c662acf6e0 LBaaS legacy mode bugfix
In LBaaS legacy mode we use the exclusive router edge as platform for
neutron LBaaS.

The following patch addresses two issues in this mode:
- In the legacy code, LBaaS driver maintained a DFW section which allows
 traffic between the LB and its members. This code wasn't added when we
 added the legacy mode.
- The original code had a bug which failed to cleanup these DFW rules when
 a pool or members were deleted. The patch adds an admin utility which
 cleans up such stale DFW rules.

Change-Id: I1c95ec6292e6cf50641581a65cbb4bdf8942aa8f
2018-06-14 14:21:10 +03:00
Adit Sarfaty
7d02b8b5fe NSX|V3: Fix ENS check on update network with QoS
Change-Id: I5209fdfe1e5099b6fcafd3bdd5b1d815302fb000
2018-06-14 10:13:47 +00:00
Zuul
c9f7c18b36 Merge "Fix LB drivers to have a core plugin" 2018-06-14 08:56:27 +00:00
Zuul
ed4d20b20b Merge "NSX-V: fix exception for distributed router" 2018-06-14 08:38:54 +00:00
Zuul
1ab44433bb Merge "NSX|V3: Add ovs_hybrid_plug flag in ports" 2018-06-14 08:38:54 +00:00
Zuul
3de53d493a Merge "Fix FWaaS callbacks imports" 2018-06-14 08:28:47 +00:00
Zuul
e196b84fbb Merge "add enabled/disable on lbaas listener" 2018-06-14 07:02:01 +00:00
Zuul
b56e65eac5 Merge "NSX|V3 add LBaaS listener description to the backend object" 2018-06-14 06:57:09 +00:00
Adit Sarfaty
c65ba95117 Fix V3 UT mocks to return the correct type of output
Some out hte unittests have DB errors while trying to insert badly
formatted entries to the DB.
This was the results of Mocks returning the wrong type of output,
or just a mock object.

Change-Id: Ia67f91672ef07885fe27865e75ad1ac860e15d40
Depends-on: Ia0d3b58b7e66aead01f1dcaa53b67129cb98a60b
2018-06-14 09:26:18 +03:00
Zuul
f69dc80a2f Merge "NSX|V3: Fix router delete callback for LBaaS" 2018-06-13 19:24:24 +00:00
Adit Sarfaty
c114e8a571 NSX|V3 add LBaaS listener description to the backend object
Change-Id: Ia13c283510b657ac9a5dc18f2932b4963a2308a4
2018-06-13 14:35:45 +03:00
Zuul
41c16b6a03 Merge "NSXv3: add pool-level lock for LB pool member operations" 2018-06-13 11:07:55 +00:00
Adit Sarfaty
63fbeaa3bc Fix LB drivers to have a core plugin
The recent Octavia preparation caused the LB drivers not to have
a core_plugin property which fails the on-router-action callbacks.
This patch will address it.

Change-Id: I6b2c98bd605ff33bf173911898267a8ed3f7045f
2018-06-13 10:55:25 +00:00
Adit Sarfaty
007350b0bb NSX|v Do not allow changing the type of a router with firewall
Currently the plugin does not support shared routers with FWaaS firewalls.
So it should fail when the user tries to change the type of a
router with a firewall to 'shared'.

Depends-on: Ib31210121a56561fb33a8ed0a1fbbdf6b01db727
Change-Id: Ieeed46ffd7309a8a8d423e44f766fec5f47b6184
2018-06-13 07:52:38 +00:00
Adit Sarfaty
8d06a9f1f3 NSX|V3: Add ovs_hybrid_plug flag in ports
FWaaS expects OVS ports to have this flag, so the patch adds it
as False to the get_port results

Change-Id: Ifc1f1cddc0ee737a4c463e4e1e0f8bb6de49e71b
2018-06-12 15:34:51 +03:00
Adit Sarfaty
fd1747a41c Fix FWaaS callbacks imports
Commit I4ebd24f1b13eb823c4d63452fd37cace5bcf5481 moved some files
that the FWaaS callbacks import.

Change-Id: Iec0d68f2d62f1f32e12e09db40253f5545f8fcec
2018-06-12 15:13:24 +03:00
Michal Kelner Mishali
7a402d2bdc NSX-V: fix exception for distributed router
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>
2018-06-12 14:36:19 +03:00
Salvatore Orlando
50aba50eef NSXv3: add pool-level lock for LB pool member operations
Add a lock around operations that read LB pools from the backend
and adjust members to add/update/remove items.
This ensures that in case of concurrent operations no stale items
could be added back to the pool accidentally.

Change-Id: I91b5c1d9eb4493c0d19dadaca0af271d0a2afe5c
2018-06-12 10:24:03 +00:00
Adit Sarfaty
2eaf0a0ad4 NSX|V3: Fix router delete callback for LBaaS
When a router is deleted, we check if any of its subnets is used
by LBaaS.
Since normally there are no subnets at this point, the check fails.
Should verify the subnets existence in teh callback.

Change-Id: I2c23722e616a8a05f6fc6d24336356355b96ca9b
2018-06-12 07:29:43 +00:00
Boden R
2e6ed98749 bump neutron-lib requirement to 1.16.0
This patch bumps the neutron-lib required version to 1.16.0, mainly to
pick up the fix in https://review.openstack.org/#/c/574068/

Change-Id: I8c445f7214164ff91c1513cb019d37b167eb0c9f
2018-06-11 15:00:23 -06:00
junbo
19be1cdc63 add enabled/disable on lbaas listener
copy listener.admin_state_up to vse dict

Change-Id: Ib6e4747978033bfee4a1e6c1f955954d6ab08a63
2018-06-11 21:12:56 +08:00
Zuul
e6d11cc04c Merge "NSX|V+V3: Preparations for Octavia support" 2018-06-07 12:51:20 +00:00
Adit Sarfaty
f6b0643782 NSX|V+V3: Preparations for Octavia support
Create internal drivers for each object that will use dictionaries
instead of objects, and will use a generic fail/success notifiers.
The LBaaS nsx-v/v3 drivers will translate the objects to dictionaries
and use the LBaaS callbacks for successful_completion and failed_completion.
Later we can add drivers for Octavia that will use the same internal
drivers.

Change-Id: I5f99f979bd5333ccfc781217379d217d611cb015
2018-06-06 09:17:51 +03:00
Zuul
4b4fd78454 Merge "Housekeeper: implement get_housekeeper_count method" 2018-06-06 00:41:55 +00:00
Zuul
8f74e2e9e8 Merge "use retry_db_errors from neutron-lib" 2018-06-04 10:06:52 +00:00
Zuul
af99078936 Merge "load neutron objects using neutron-lib" 2018-06-04 10:04:54 +00:00