Commit Graph

11330 Commits

Author SHA1 Message Date
Adit Sarfaty d458a7e475 Fix bulk subnets unittests
Commit Ia32ec4c11c0793e7df07dcce19c122b3c7f865e1 broke bulk sunbets
creation unittests.
This patch fixes some tests, and skips other.

Change-Id: I25cad6447a2a2ccf3b9c7689904455c9468e01c5
2019-04-28 11:15:01 +00:00
OpenDev Sysadmins 6cdc3383aa OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:49 +00:00
Ian Wienand 74dc8c320b Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: I7cd7c387d1c33b5c2dbec2e416ee3cc58525d4f1
2019-03-24 20:36:25 +00:00
Kobi Samoray 2447232f5b Complete the init of the Neutron main process
Neutron doesn't trigger AFTER_INIT event for the main neutron context
but only for the workers.
As AFTER_SPAWN is called only on the main context, completing the
initialization from this event will resolve that problem.

Change-Id: I6a0cf73f3a433363e83f9b5bc17ac984266356d5
2019-03-06 16:12:09 +02:00
Adit Sarfaty fedbb65eba Fix security group broken code & tests
Commit I34e41a128f28211f2e7ab814a2611ce22620fcf3 broke the MH plugin
security groups + some other SG tests.
This patches fixes those.

Change-Id: I9634583ce22f4c1be53283495426905979c9ea81
(cherry picked from commit baafb2a16a)
2019-02-10 15:21:58 +02:00
Adit Sarfaty b5cc343aae NSX-V3: Add agent config to FWaaSV2 callbacks
Commit I8982523dbb94a7c5b8a4db88a196fabc4dd2873f added the need for
agent_config values for the routerInfo structure creation.
The NSX FWaaS does not use the agent at all, so this patch only adds
a dummy implementation to allow to code to continue working

(Cherry picked from: I6fd4c1f94d8deebfc457451ee7eb12536c37ba65)

Change-Id: I772eb697978da309684cf1ff58309465f07f76a8
2018-12-19 14:38:13 +02:00
Zuul e684309e00 Merge "NSXv: use admin context for metadata port config" into stable/pike 2018-12-02 13:37:21 +00:00
Kobi Samoray 0c379e52ef 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-11-20 23:55:19 +02:00
Kobi Samoray 0d74b99a16 NSXv: use admin context for metadata port config
Using session context for the port creation caused conflict with IP
allocation for the metadata port.
Use of a new admin context resolves this issue.

Change-Id: Ic65b70ffd80be07aae4b668b4b8af09a915ab747
Co-Authored-By: Salvatore Orlando <sorlando@vmware.com>
2018-11-13 12:40:28 +00:00
Adit Sarfaty e61d5bb237 NSX|V3 Support non-overlay networks with DHCP
Cherry pick this support from Queens branch, depending on the NSX
version support

Change-Id: I19e0d6e926a643bf5b6837dcfdd8d0bf39c5520f
2018-09-05 08:48:09 +03:00
Zuul 3f8a5609bf Merge "NSX|V3 update port revision on update_port response" into stable/pike 2018-08-27 06:19:54 +00:00
Adit Sarfaty c29eb608c3 NSX|V3 update port revision on update_port response
Change-Id: I0e8ea977b277fb0bc72e33dbdb0da62c02fa6c0e
2018-08-20 12:03:08 +03:00
Adit Sarfaty b1d1b4dc1c NSX|V+V3 QoS rbac support
When the network or port has qos-poliy-id, the plugin needs to
validate this ID is real and accessable for this project.
Until now this was done only when setting the policy id in teh network/port
mapping table, which just ignored errors.
This patch adds the validation early in the create/update process.

Change-Id: If8ad0ce844cbf4706793a45f8698031b5eaf7e3d
2018-08-14 12:06:39 +03:00
Zuul d6d64335bf Merge "NSX|V3: Handle port-not-found during get_ports" into stable/pike 2018-07-29 10:29:55 +00:00
Adit Sarfaty 4ce29e7d87 Skip new neutron unittests
Commit I32e76a83443dd8e7d79b396499747f29b4762e92 added new unittests which
requires multiple fixed ip per port, which the nsx plugins do not support.
This patch will skip the new tests.

„קפקמגד-םמ: I32e76a83443dd8e7d79b396499747f29b4762e92
Change-Id: I22a799d25c15ec087f6d1cdd7981dd7b3b608cc7
(cherry picked from commit 5fda6ccd31)
2018-07-26 05:25:24 +00:00
Adit Sarfaty 6258c7fccd NSX|V3: Handle port-not-found during get_ports
Under stress, a port might be deleted while geting ports list.
This patch prevent this port from being at the results, or crashing
the api.

Change-Id: Ib6d298a7990556da73277f549580d9c04512518e
2018-07-25 10:17:43 +00:00
Anna Khmelnitsky 3cffa0dfa9 NSXAdminV3: Add message on client cert generation
When certificate is generated with nsxadmin, alert the user to
restart neutron service, but only in case no previous certificate
existed.
If previous certificate was functional, neutron server will pick
up certificate change on next request automatically.

Change-Id: I79b390b32b570afdcf40b3cdd522566bca76027e
2018-07-05 03:31:31 +00:00
Adit Sarfaty ac97e7e3a1 NSX-V: Add server-ip-address to the supported dhcp options
server-ip-address is another neutron supported name for
tftp-server-address.

Change-Id: I9b2850c8f162dd5d15ae7c13c430729d10b8f40b
(cherry picked from commit bee0962b2b)
2018-06-30 14:36:22 +00:00
Adit Sarfaty 36b6bbe08c 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 14:58:26 +00:00
Adit Sarfaty 6741422048 Fix security groups ext_properties loading
Commit I123ae390bec489a931180a2e33f4bf7b1d51edb2 broke the extended
security group code, by removing the 'is_default' attribute from the
list of fields that should have been updated in the DB.
Not sure exactly why it broke us.

Change-Id: I891bc792e62ac90683ce8745f98a3139c9ffd3d9
(cherry picked from commit f9071f3f9f)
2018-06-20 05:41:18 +00:00
Salvatore Orlando cc893ca056 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.

Cherry-picked from commit 50aba50eef

Change-Id: I91b5c1d9eb4493c0d19dadaca0af271d0a2afe5c
2018-06-12 10:30:29 +00:00
Zuul 39d0830470 Merge "Add mock to the requirements" into stable/pike 2018-06-01 17:05:52 +00:00
Zuul afbb9178ef Merge "NSXv: Handle listener failures on backend" into stable/pike 2018-06-01 10:31:05 +00:00
Adit Sarfaty 5ab93b95f9 Add mock to the requirements
Commit I0775e284f21012a01298168d5ca3dd1c74b95f05 added an import of
the mock package, so it should be added to the requirements

(Cherry picked from commit I444ab50d5bdb20c528c3a1581dc7e9301ab06dad)

Change-Id: I561e66c199e050d50f4df822274b282e89300b5e
2018-05-31 15:28:12 +00:00
Adit Sarfaty 911732cfb0 NSX|v3: Do not retry on DB duplications on section init
When initialzing the default NSX section and NS group, the plugin
create a default global security group, in order to make sure no
other server is doing it at the same time.
In case anotehr server does, we get a DP duplicated entry error,
but after retry it somehow works, causing the 2 process to handle
the backend at the same time.
This patch avoids the retry in case of DB errors for this case.

Change-Id: I0775e284f21012a01298168d5ca3dd1c74b95f05
2018-05-30 12:41:16 +00:00
Adit Sarfaty 20bfcce043 AdminUtils V3: Do not set nat_pass for NO-NAT rules
The NSX backend doed not support setting nat_pass to false for
NO_NAT rules.

Change-Id: I90c506ac8ee50aa988bbd07999eca20c410499ee
2018-05-28 08:24:52 +00:00
Kobi Samoray 6093f89a0d NSXv: Handle listener failures on backend
Backend doesn't produce NotFound exception when deleting a virtual server
or an application profile which doesn't exist.
Instead it produces RequestBad exception which should be caught and handled.

Change-Id: I9f3e7e55ddfea470c69c46b95dd0ac64136ecf97
2018-05-27 16:50:12 +00:00
Adit Sarfaty caa41dfc16 NSX|V3: Wait for another neutron to create default section
When creating the global SG for the default section & NS group,
if it already exists, but the section and NS group are not in the
DB, it means that anotehr neutron server is creating them,
and we should wait for it.

Also add Logging to default NS group and section creation
This may help debugging cases of 2 processes creating/deleting
those at the same time

Change-Id: Ib68090c1b5b335c81080a5d0eccc82b69c640390
2018-05-25 09:41:01 +00:00
Adit Sarfaty 7481a77f5f Fix broken unit tests
Commit  I5867f77fc5aedc169b42f50def0424ff209c164c broke the MH unittests
by adding new unsupported tests.
This patch will skip those.

Depends-on: I5867f77fc5aedc169b42f50def0424ff209c164c
Change-Id: Iaf30e5f60e7403b73dc08d54bf442d4657bccca6
2018-05-15 09:08:12 +00:00
Gary Kotton f696ab50d0 NSX|V3: cleanup duplicate sections on startup
There may be an edge case where duplicate rules are not cleaned
up at boot time. This will deal with that case by validating that
the contents of the database matches what is defined on the NSX.

In this case the database is the source of truth.

Change-Id: I8249b946ffeeaf8bd682716a87fca0681ab29e37
2018-05-08 05:51:52 -07:00
Adit Sarfaty 7804ad22de NSX|v3: : ensure that 0.0.0.0/# is treated correctly in SG rules
Commit I24adc9da9f52d17621117b46d8a535ccedf93227 handled ips of
0.0.0.0/0 in security group rules.
This commit extends the fix to any ip starting with 0.0.0.0, since
those are also not supported by the nSX.

Change-Id: I08d89b070b08e5e100e9e1c6cf7a4d509968152c
2018-05-03 08:34:42 +00:00
Gary Kotton c9e0278f8a V and D: make security group logging more robust
Prevent exceptions

Change-Id: I1a318347f92d6d793768dd20d653c872a3f75da3
(cherry picked from commit 8960282459)
2018-05-03 06:17:57 +00:00
Adit Sarfaty a64c821955 NSX|V fix create/delete subnet race condition
In case subnet_delete and subnet_create run concurrently for
overlapping subnets, the lock for dhcp edges on the delete case should
be taken before deleting the sunbet from the neutron DB, since looking
for available edges (for the created subnet) uses the neutron DB and might
select an edge with a conficting subnet on it, which was deleted from
neutrn but not uet from the edge.

Change-Id: Ic44cc0b70f565a87e5a39e4051e90f68673ca066
2018-04-24 10:28:03 +00:00
Zuul c3c6e1b05d Merge "Fix doc build failure" into stable/pike 2018-04-17 16:56:16 +00:00
Boden R 19851e8bc2 Fix doc build failure
Do not call pip install without argumetns

Change-Id: I4d453e313930a2dc6dd74c439add98fb460ab1ff
2018-04-17 11:27:41 +00:00
Adit Sarfaty 6017242f28 NSX-V3: fail FWaaS rules with 0.0.0.0/x cidrs
The NSX backend does not support 0.0.0.0/cidrs in the edge firewall
rules.
This patch will issue a driver error in case a similar cidr is in the
rule for the FWaaS V1 & V2 drivers

(Cherry picked from: Iebc3642a58bd2e737a6ac2b87dfd99206603a37d)

Change-Id: I50f6af5e2530083a1b94d2164d8b9c79083fe5e4
2018-04-17 14:13:56 +03:00
Adit Sarfaty e68048bb00 Temporarily ignore build-openstack-sphinx-docs
build-openstack-sphinx-docs is failing on non-master branches
This patch temporarily ignore it, untill it is fixed upstream.

Change-Id: I78b7d2cc0412061a29724cc0ccbb472e410a0f95
2018-04-17 06:28:25 +00:00
Zuul b45904abb4 Merge "NSXv: Fix admin util member IP overwrite" into stable/pike 2018-04-12 16:18:36 +00:00
Kobi Samoray 0ea28562c2 NSXv: Fix admin util member IP overwrite
Admin utility overwrote the IPs of the metadata proxy members while
attempting an update of the DHCP/router edge members.

Change-Id: Ie82cd57bf42584976dc4d7874bdddcf2592c15bc
2018-04-12 14:01:58 +00:00
Gary Kotton 22dc5454f3 NSX|V3: Use empty value and not ANY for remote prefix
ANY should not be used and we should remove the value of
0.0.0.0/0.

Change-Id: Ie4c8d334ae73b8b40f8be8ca6b540b0fa2370a2c
2018-04-12 11:58:47 +00:00
Boden R b942090318 suppress W503,E731,E266,E402 hacking checks
A recent change in pep/pycodingchecks introduced new warnings as part of
the pep8 target that causes pep8 to fail now.

This patch adds W503,E731,E266,E402 to our ignore hacking checks,
and also fix other small pep8 warnings.

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

Change-Id: Ibb76343eb7b2c10fa693432dedd3670fcf150905
2018-04-12 11:15:20 +03:00
Zuul 4f0831e0ca Merge "NSX|V3: ensure that 0.0.0.0/0 is treated correctly" into stable/pike 2018-04-08 16:24:05 +00:00
Gary Kotton c37e8f446d NSX|V3: ensure that 0.0.0.0/0 is treated correctly
The NSX will not accept 0.0.0.0/0 for remote and local IP
prefixes. This is changed internally to 'ANY'

The 'ANY' will only be internal. The API for the user will not
change, they will stell see the 0.0.0.0/0

Change-Id: I24adc9da9f52d17621117b46d8a535ccedf93227
2018-04-08 14:15:18 +00:00
Kobi Samoray 5e263f6581 NSXv: Fix LBaaS foreign key migration
LBaaS forreign key migration adds several foreign keys, to enforce the
cleanup of stale NSXv DB objects when the LBaaS object is being deleted.
However, garbage rows may exist - and must be cleaned up prior to the
creation of the foreign key.

Change-Id: Ie6a0348df8b19a49525a1f2bad89f12370a3cd46
(cherry picked from commit 78e8080c06)
2018-04-08 13:53:53 +00:00
Zuul be4ca23ded Merge "L2GW: support missing methods" into stable/pike 2018-03-13 13:13:55 +00:00
Gary Kotton 17f7183ac5 L2GW: support missing methods
Adds missing methods. Something changed witht he way in which
the callbacks were invoked which showed that we did not support
the correct methods.

(cherry picked from commit abb8dbb3ff)
Change-Id: I253ceee343d829923b874057603a32ccd8c662f6
2018-03-12 15:17:21 +00:00
Gary Kotton f61bac3a86 NSX|V3: ensure that description is not None
Commit a96d83ece6 set the internal
security group description to be None. This should be a string.

(cherry picked from commit c04fcdaf41)
Change-Id: Ia4b1e0cea3f4e1493e41bf1e97bcf3016e389bf9
2018-03-12 14:29:35 +00:00
Gary Kotton 37efaf51a6 NSX|V3: prevent duplicate default FW sections
When the plugin starts it will check if the global NS group and
OS DFW section are created on the NSX. If not it will create these.
There is a edge case where two servers are started in parallel and
they both create the default section. This will lead to traffic
being dropped.

This is dealt with in the following way:
1. We store the default OS section and NS group in the database
2. If the entries do not exist then we create them, the DB will
   indicate if there is a duplicate and then the plugin will do a
   cleanup of the incorrect resources.

In order to do this we need asecurity group. A default global one
with ID 00000000-def0-0000-0fed-000000000000 is created.

If the admin wishes to delete the global section then she/he should:
1. delete the NSX section
2. delete the security group
3. restart the neutron service

Change-Id: Ide7a7c75efac3e49d51e522a11c77e754f3d1447
(cherry picked from commit a96d83ece6)
2018-03-10 23:18:52 -08:00
Adit Sarfaty cadcbf7b0c NSX-V3: Fix AZ retrieving for DHCP profile
When getting the AZ of a network for its DHCP profile, we need to
use the az-by-id api, so that the hints data is initialized correctly

Change-Id: I47525564af3622899b4f9ea1284207ec5c007679
2018-03-01 09:02:59 +00:00
OpenStack Proposal Bot c8fa36ed88 Updated from global requirements
Change-Id: I86de384bc99e8a1d68dfeaaeeae6d07302fd6579
2018-02-09 20:42:11 +00:00