Commit Graph

10579 Commits

Author SHA1 Message Date
OpenDev Sysadmins eb53257b73 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:47 +00:00
Ian Wienand ac3d848aaf 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: I05fbfc5df08e7c861a8f7a0d677a39d43d06cb15
2019-03-24 20:36:24 +00:00
Kobi Samoray 1fd1e831d2 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:37 +00:00
Adit Sarfaty 1798018557 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.

Conflicts:
      vmware_nsx/tests/unit/nsx_v3/test_plugin.py

„קפקמגד-םמ: I32e76a83443dd8e7d79b396499747f29b4762e92
Change-Id: I22a799d25c15ec087f6d1cdd7981dd7b3b608cc7
(cherry picked from commit 5fda6ccd31)
(cherry picked from commit 4ce29e7d87)
2018-10-30 10:40:39 +01:00
Kobi Samoray d368b041f7 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 19:59:20 +03:00
Zuul 67a14f7bae Merge "NSX|v3: : ensure that 0.0.0.0/# is treated correctly in SG rules" into stable/ocata 2018-05-09 18:21:21 +00:00
Zuul 4902c6d00b Merge "V and D: make security group logging more robust" into stable/ocata 2018-05-09 16:46:04 +00:00
Adit Sarfaty 5226a855e6 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
(cherry picked from commit 7804ad22de)
2018-05-09 16:06:26 +00:00
Gary Kotton 14e9eef0cc 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
(cherry picked from commit 22dc5454f3)
2018-05-09 13:00:03 +00:00
Gary Kotton 152b21f526 V and D: make security group logging more robust
Prevent exceptions

Change-Id: I1a318347f92d6d793768dd20d653c872a3f75da3
(cherry picked from commit 8960282459)
(cherry picked from commit c9e0278f8a)
2018-05-09 12:59:01 +00:00
Boden R c1628f674c Fix doc build failure
Do not call pip install without argumetns

Change-Id: I4d453e313930a2dc6dd74c439add98fb460ab1ff
2018-05-02 14:43:47 +02:00
Zuul 801c266d56 Merge "NSX|V3: ensure that 0.0.0.0/0 is treated correctly" into stable/ocata 2018-04-08 16:26:34 +00:00
Gary Kotton 678b4e0e93 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:27 +00:00
Kobi Samoray de0fadd88e 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:54:19 +00:00
Gary Kotton 3971523c07 NSX|V: ensure that only LAG is configured and not standby
In the event that there is a LAG only configure the LAG
and no standby.

Change-Id: Ieacf386ce9a8ca02d795e53c7ddab9d1356ecf88
(cherry picked from commit 41e61b9ae8)
2018-01-23 19:52:03 +02:00
Adit Sarfaty b12f75bf2c NSX|V prevent deleting md proxy neutron objects
It is not allowed to delete metadata network / subnet / port or router.

(Cherry picked from: I7d99c9c1f51ffa076bda63ec3e59aea2a977f2d6)

Change-Id: I6a29f52b2c8d7877b4d025cd6e1338a73cfe3e3f
2017-12-11 09:19:15 +02:00
Zuul 3a56f40fbb Merge "NSX|V3: ensure that metadata works with windows instances" into stable/ocata 2017-12-10 10:35:10 +00:00
Gary Kotton 692f04d5f3 NSX|V3: ensure that metadata works with windows instances
The 121 support required that we add a route for the metadata
to be via the interface. There are some operting systems that
do not support this. This needs to be '0.0.0.0'. we pass both
options and the OS will decide which one to use.

Change-Id: Id5d43c7b5eb7c7b7a12c47dc31f7f52af804494c
(cherry picked from commit 520758a1c2)
2017-12-10 01:18:09 -08:00
Zhenmei 490368b779 Add metadata setting for new created dhcp edge.
Change-Id: Ie33d3d13207fafa2dca002f985e8e9724089128f
(cherry picked from commit 1342ec78dc)
2017-12-10 08:50:44 +00:00
Adit Sarfaty 56376f0943 NSX|v: Add qos policy id to port
When the QoS is enabled, the port object should have the qos policy
attribute, even if empty.
We should add it to get _port as well.

Change-Id: I8df740c4a883b188764fe291e9baf282c051e576
2017-11-30 12:55:12 +00:00
Gary Kotton 02b476a898 NSX|V3: address edge case of subnet deletion when attached to router
There is a edge case when when a subnet deletion fails due to it
being attached to a router. If the subnet did not have an attached
instance ports then the DHCP server was deleted.

Subsequent instance ports will not get IP addresses.

Change-Id: I12ffcda503f3647d481d574a09104e837c7af5d6
2017-11-21 15:03:07 +00:00
Adit Sarfaty c8d8a895c1 NSX-Migration of default security groups
When migrating a security from to the nsx-v3 cloud,
if it is named 'default' try to mark it as the default SG in the DB

Change-Id: Ibcd1932c18491e9f1a2d4bb54cae6d830dd3108f
2017-11-15 04:59:08 -08:00
Adit Sarfaty d4ce0cb47f NSX|V3: allow updating a floatingip without changing the port
Change-Id: Id4f6accc047c2020338687c9c2fbd077b3d56183
2017-11-14 10:48:37 +00:00
Gary Kotton 9103293506 NSX|V3: don't fail on already deleted network/port
If under lolad a network deletion fails for the internal metadata
then swallow the DB exception and continue. No need to fail the
neutron opertaion here.

If there are orphan metadata networks afterwards then they can be
cleaned manually.

Change-Id: Ib4f657bed84a2c84363597f861c39cb7fbde7b18
(cherry picked from commit 2af1cf3451)
2017-11-13 13:22:20 +00:00
Gary Kotton aad3afdfc4 NSX|V3: add NSX headers for logging on NSX
1. 'X-NSX-EREQID' - pass the neutron request id
1. 'X-NSX-EUSER' - from 2.2 use pass the 'user_identity'

Change-Id: Ie58d2c78b88cd5ec869dd9dfe16c89f060a5e6b0
2017-11-09 04:46:36 -08:00
Zuul 3d41006dd5 Merge "NSX|V fix exclude list counting" into stable/ocata 2017-10-31 08:18:43 +00:00
Boden R f365b6ebc3 zuul v3 gate changes
This patch updates our tox_install_project.sh script to account for zuul
v3 changes. The changes are made to be backwards compatible so the
script should also still work with zuul v2 jobs. Also see the depends on
patch for the project-config changes needed for our zuul v3 support.

It also includes some updates to the UTs to skip tests that were
introduced in neutron causing our ocata UTs to fail.

Depends-On: I9ac364dc27dc091cce56179707d21527f166229f

Change-Id: I104335376fe9161e2b649979e75571a847195d53
2017-10-30 09:11:09 -06:00
Adit Sarfaty 740826a513 NSX|V fix exclude list counting
When adding/removing a port to the exclude list, we check if there
are other ports of the same device there.
this test was done is a wrong way expecting the device owner to be
'compute:none', instead of starting with 'compute'

Change-Id: I5c6ed8f3c5cf0d4ebb63e1a9ec36614fa4c4f15b
2017-10-16 16:41:19 +00:00
Adit Sarfaty 5bbbc955be NSX|V: check md proxy handler exists before usage
When something fails during the init_complete process, the plugins
md_proxy data is not fully initialized, so it is possible that even the default
handler was not set yet.
This patch ensures that the relevant md-proxy handler exists before using it.

Change-Id: I1db84c0abc30d8ea3d601f26b5b852a254a6036c
2017-09-24 10:46:55 +00:00
Anna Khmelnitsky 9df1370f4b NSXv3: Rewrite client certificate provider
The provider was designed under assumption of thread per session.
However, different sessions can simultaneously occupy same thread.
To prevent filename collisions, each request will create its own
provider object with random filename.
Since this creates significant overhead, this is hopefully a short
term solution. For long term, we'll seek a way to pass certificate
data in memory to the ssl library (requires changes in python libs)

In addition, remove certificate generation/removal printout to avoid
spamming thde debug log.

Change-Id: Ib11b8ae38d663c53107e02e6febb676c6e9572a0
2017-09-07 17:03:29 +00:00
Adit Sarfaty aea205b69d NSX|v3 use nsxlib in devstack cleanup
Refactor the devstack cleanup script to use nsxlib instead of accessing
the nsxmanager directly.
This patch is needed for the XSRF support.

(cherry picked from commit 9ac5edd12e)

Change-Id: I6bc4f68412331fb4b1de1f5da1c6660fb608e86e
2017-09-05 11:34:27 +03:00
Anna Khmelnitsky aa8e690326 Nsx admin: Initialize nsx-lib on demand
Avoid initializing cluster (including xsrf token acquisition) on
process init. Connection parameters may change as a result of admin
command, in which case connections will need to be reinitialized.

(cherry picked from commit 3c51978d6b)

Change-Id: I9a26f4662a3e4200ce3745377f51e8187cca21bd
2017-09-05 09:56:00 +03:00
Gary Kotton 7fcbc0ffa1 NSX|V: ensure that vnic reads/writes are atomic
Change-Id: I584574941397102b5cd0a848d59cf5d77a406ecf
2017-08-30 22:14:56 -07:00
Jenkins 6b3a2c9bd8 Merge "NSX|v: Admin Util remove router binding orphaned entries" into stable/ocata 2017-08-30 09:11:39 +00:00
Jenkins 7896d3e30f Merge "NSX|v AdminUtil ignore irrelevant orphaned networks" into stable/ocata 2017-08-30 08:36:55 +00:00
Adit Sarfaty 287b52dec4 NSX|v AdminUtil ignore irrelevant orphaned networks
If the backend network name does not contain a uuid, it is not a neutron
network.

Change-Id: Iecfc9e4c627057054eba455e618fc02680b0cff3
2017-08-30 07:11:22 +00:00
Adit Sarfaty e07cd5531b NSX|v: Admin Util remove router binding orphaned entries
New utilities to list/delete orphaned router binding entries,
meaning entries that the object behind them (router, loadbalancer
or network) does not exist on neutron.

(Cherry picked from: I8a239b9d33a4900e2e90035111899015d68d30bb)

Change-Id: I552daefa96942b922e48bdcec66c36ad6d11d4e5
2017-08-30 06:39:43 +00:00
Adit Sarfaty e9ffad5797 NSX|V3 Admin utils expect different notFound error
There are 2 types of "resource not found" errors returned from the nsx
backed.
Status 404 with error code 202, and status 404 with error code 600.
The admin utils should excpect both.

Cherry picked from: I1091dfe4a13610f223229b0b9f63d65956af7cbe

Change-Id: Ib14240e0faecf68543fbedff2f05dc1f01a00d40
2017-08-30 08:22:58 +03:00
Adit Sarfaty d8ea6d0f4e NSX|v: Fix lock when removing a distributed router interface
There was a missing lock when removing a distributed router interface.
when the interface is removed, and this is the last one, the dedicated dhcp edge
will be added to the pool, and this should be under lock.
In addition, avoid freeing the edge if it has more router-binding entries
since it can indicate the lock issue, and other network can be using this edge.

Change-Id: I2c23fabe0e8c7c3d11e1bbd1b39560573b649708
2017-08-28 12:16:47 +03:00
Adit Sarfaty c7263510e4 NSX|V: keep availability zones on router migration
When migrating a router from shared to exclusive, we need to keep the
configured availability zone

Change-Id: Ibf13804da79e6abad6f8077d7a95ebcc99cbadba
2017-08-24 07:12:57 +00:00
Gary Kotton 7e53726113 NSXV3: harden subnet creation for external networks
A external network subnet should not have DHCP enabled. When
creating the external network we ensure that the binding will be
created. This ensures that the subnet validations are done
correctly.

Change-Id: I036740736445550d9e08580a90a97ca147619222
(cherry picked from commit 305d75d8fb)
2017-08-22 20:53:03 +00:00
Jenkins d087c8718d Merge "NSX|v: get internal net by az fix" into stable/ocata 2017-08-16 16:24:00 +00:00
Adit Sarfaty 52fc9be6be NSX|v: get internal net by az fix
getting the internal network per availability zone has a fallback to the
default az which should not always be used.
This patch creates a version of this db api without a fallback and uses
it when we shouldn't use the default az.

Change-Id: I2ec37e431fa08c80c19c32a50ed4e5a71222b0c2
2017-08-16 08:47:39 +00:00
Gary Kotton 612e52ec4f NSX|V3: ensure that MAC learning does not invoke switch profiles
There are cases where MAC learning on a port may have a a DHCP
server. Here we do not want to disacrd traffic. So we set a default
switch profile that enables all traffic to pass.

Change-Id: I7914bd01681c7ae6351ff5e900da028009bead2c
(cherry picked from commit 02c28ee5ea)
2017-08-15 08:31:24 -07:00
Kobi Samoray 6195f523bf NSXv: locking DHCP
Change-Id: If3aed690dd5607288cbc23faa3809ab59f6f92d0
2017-08-09 11:07:48 +03:00
Kobi Samoray 4b9a162a29 NSXv DHCP locking refactor
Address issues with NSXv DHCP locking

Change-Id: I993acb821b2807404e3232fec24c160da702b058
2017-08-09 11:06:04 +03:00
Anna Khmelnitsky fdc850bc6d NSXv3: set nsxlib to be stable/ocata for devstack
nsxlib should be on same branch as vmware_nsx

Change-Id: Ia05643f3e78f5b42022141f75e008e9c1db7956e
2017-08-02 19:09:15 -07:00
Adit Sarfaty fecdd7942a NSXv: LB objects delete failure while pool binding missing
When pool binding is missing, LBaaS call shouldn't fail, but
exit gracefully.

(Cherry picked from: I59dfad729f31ce79eb83a278d994adce50c05bc9)

Change-Id: Ie04bab4318820715d0d34a84d1b2998510992058
2017-07-27 14:27:30 +03:00
Gary Kotton 0aa4e06e40 NSXV: use correct exception for NoResultFound
Change-Id: Icbe226e3ea86d16860c20d9b18ac49b6410f9de5
2017-07-25 04:33:34 -07:00
Gary Kotton 682e0de44b NSX|V: ensure that router updates are atomic
Make sure that router updates are atomic. This could prevent edge
cases for example of updating a router and then updating a router
type.

The lock with be of the format router-<UUID of router>

Change-Id: I95e78d420d57b514837cf2bfd300f0a6f235c2f6
(cherry picked from commit c4298cd368)
2017-07-24 15:25:24 +00:00