Commit Graph

10 Commits

Author SHA1 Message Date
Boden R 839e575fa6 use plugin utils from neutron-lib
The remainder of the neutron.plugins.common.utils were rehomed into
neutron-lib with [1][2]. This patch consumes them by using the functions
from neutron-lib, and removing the neutron.plugins.common.utils module
all together as it's fully rehomed now.

NeutronLibImpact

[1] https://review.openstack.org/#/c/560950/
[2] https://review.openstack.org/#/c/554546/

Change-Id: Ic0f7b37861f078ce8c5ee92d97e977b8d2b468ad
2018-07-12 08:13:05 -06:00
Boden R 410a83c89d use plugin common utils from neutron-lib
A bulk of the public APIs that are part of neutron.plugins.common.utils
were rehomed into neutron-lib with [1] and the remaining with [2].

This patch consumes [1] by:
- Removing the rehomed code from neutron.
- Removing the UTs that are no longer applicable.
- Leaving the functions in [2][3] in neutron.plugins.common.utils until
we release [2][3] and can consume it at which point we should be able to
remove the utils module.

NeutronLibImpact

[1] Iabb155b5d2d0ec6104ebee5dd42cf292bdf3ec61
[2] I2c0e4ef03425ba0bb2651ae3e68d6c8cde7b8f90
[3] I73f5e8ad7a1a83392094db846d18964d811b8bb2

Change-Id: I1d63cbea463e92e1d2e053f8e1a564ed52cb84f8
2018-04-17 12:06:28 -06:00
Gary Kotton 99d0ff92e8 Utils: make delete_port_on_error more informative
When under load the port may have been deleted by another process.
Here we will log the port that was not found. This will help
debug.

Change-Id: I2556c54584c84cbdb777a4fa366b18a9195b60c5
Closes-bug: #1694389
2017-05-02 06:23:51 +03:00
Anh Tran 17005132d1 Rollback port after failed to add it to router
After failed to add port to a router, we cannot re-use and/or delete
this port.

With concurrent requests occuring, neutron will accept one request
and the other will be rejected with an 'overlapped CIDR' message.
Patch [1] fixed the race condition, but neutron raises
'Port already has an attached device' instead of
'overlapped CIDR', because neutron didn't cleanup the port when
the request was retried.
[1] https://review.openstack.org/#/c/303966/

This patch is needed to fix the bug completely. We will catch any
exception when adding an interface by port to a router. After that,
we rollback this port to its original state.

Change-Id: Ib68aee164a3062648fc882012d57b5e381f52196
Closes-Bug: #1535549
2016-09-08 12:59:26 +00:00
Kevin Benton fbd3578d64 Delete gw port on exceptions
Clean up related core plugin ports on routers when there is a failure
creating the record for the router port.

The two partial bugs will be fixed after
I476d3e03c8ee763cc4be6d679fe9f501eb3a19b5 has merged.

Closes-Bug: #1600344
Partial-Bug: #1535225
Partial-Bug: #1535226
Change-Id: I8dd832f35e20d1ee090ebab921f0deea533b6fc8
2016-07-11 06:07:03 -07:00
Henry Gessau 4148a347b3 Use constants from neutron-lib
With this we enable the deprecation warnings by default.

Related-Blueprint: neutron-lib

Change-Id: I5b9e53751dd164010e5bbeb15f534ac0fe2a5105
2016-04-23 21:23:56 -04:00
Bhagyashri Shewale 88e899f7a0 Fix module's import order
Made corrections in import order for built-in, third party and
project specific modules as per OpenStack import standards [1].

[1] http://docs.openstack.org/developer/hacking/#import-order-template

Change-Id: I899deefd6ee4732d6c0afd17a5afbe42b0fa37ba
2016-01-22 06:38:42 -08:00
Andreas Scheuring c3d2526727 ovs: Make interface name hashing algorithm common and extend it
The OVS device name hashing algorithm shortens interface names that are too
long. To ensure uniqueness it makes use of a hashing algorithm.

Move this function to a common place where it can be shared between ml2
drivers and agents.

Extend the function to support defining the max device length to be used.

Change LOG level to info to help deployers figuring out the unhashed name
of an hashed inteface.

Adapt OVS agent to use this common function instead of its
own implementation.

Change-Id: I5c04f39928d070aa7e372934fcb2675609d2761c
Partial-Bug: #1495960
2015-11-23 09:26:37 +01:00
Sean M. Collins e7488570e7 Revert "Make OVS interface name hashing algorithm common and extend it"
Based on discussion with Ihar and Cedric, this may break upgrades. Let's
revert it for the time being and reassess.

This reverts commit 3d0db13370.

Change-Id: I69d74befb08e074c1bccd823cca0899de6ed57d6
Closes-Bug: 1504647
2015-10-15 11:10:52 -04:00
Andreas Scheuring 3d0db13370 Make OVS interface name hashing algorithm common and extend it
The OVS devcie name hashing algorithm shortens interface names that are too
long. To ensure uniqueness it takes use of a hashing algorithm.

Move this function to a common place where it can be shared between ml2
drivers and agents.

Extend the function to support interface name postfix in addition to the
prefix.

Change LOG level to info to help deployers figuring out the unhashed name
of an hashed inteface.

Adapt OVS and linuxbridge agent to use this common function instead of their
own implementation.

Change-Id: If7ee8240c8f60da3400365138832a5d9badf98b4
Closes-Bug: #1495960
2015-09-30 10:04:49 +02:00