17703 Commits

Author SHA1 Message Date
Ihar Hrachyshka
391ac43bf3 Deprecate gateway_external_network_id option
This option is used only when external_network_bridge is set to
non-empty value, and that other option is already marked for removal.

DocImpact The gateway_external_network_id option is deprecated and will
          be removed in next releases.

Change-Id: Ie6ea9b8977a0e06d69d735532082e9e094c26534
Related-Bug: #1511578
2017-02-23 10:25:11 +00:00
Jakub Libosvar
d46636112f gate-hook: Accomodate devstack-gate local.conf changes
With devstack-gate switching to local.conf we can no longer use bash for
evaluating settings variables. Also we shouldn't populate local.conf
directly and let devstack-gate do that.

Since now devstack never uses localrc file directly, we set [[localrc]]
sections for local.conf instead.

As a nice side effect, it will make the gate hook work with devstack
that may not have the Ie571b5fa5a33d9ed09f30ba7c7724b958ce17616 in
(Newton and below), which may make backports easier later.

Change-Id: Ibe640a584add3acc89520a2bbb25b6f4c5818e1b
Closes-bug: 1667331
2017-02-23 00:38:06 +00:00
Jakub Libosvar
e674034aa1 tempest: Skip QoS test until fixed
The test is failing intermittently. In order to reach a better stability
of the job running in-tree tempest tests, this patch skips the test
until we come up with a proper fix.

Change-Id: I37f1488db258f6a4d383fb472cb5433c65371ac5
Related-bug: 1662109
2017-02-22 11:19:50 -05:00
Bertrand Lallau
f3322b21d6 Fix string case issue in rpc_api documentation
TrivialFix

Change-Id: I25fa87bd3d39779398fd712935ef6a3c7535d694
2017-02-22 11:58:39 +01:00
Jenkins
c9f83dcaa8 Merge "Skip segment checks during network delete operations" 2017-02-22 09:29:24 +00:00
Ihar Hrachyshka
19307f6edf Avoid applying noop lambdas per object in db_api.get_objects
It's a waste of cpu time, and I hate grep catching my name in tree. ;)

TrivialFix

Change-Id: I6fad4a4413e41f1fdb434e800e135f6cbe93ffda
2017-02-22 06:11:40 +00:00
Ihar Hrachyshka
37a1b4a46f Stop handling interface drivers that don't support MTU
We were issuing a deprecation warning for interface drivers that have
not accepted mtu= argument for a cycle. It's time to clean that code
path up.

NeutronLibImpact

Change-Id: I47eca98c25d4f5a30a5a726d5edc1a919954a280
2017-02-22 06:07:48 +00:00
Jenkins
39a8b3937b Merge "Remove test cases that moved to tempest" 2017-02-22 04:09:57 +00:00
Jenkins
e96580c8fd Merge "Avoid segment DB lookup in _expand_segment on port" 2017-02-22 01:27:08 +00:00
Jenkins
9979acf859 Merge "Make ML2 OVO push notification asynchronous" 2017-02-22 01:24:57 +00:00
Jenkins
e6557fc0d7 Merge "Pass --concurrent flag to ebtables calls" 2017-02-21 19:47:38 +00:00
Kevin Benton
82a4c59e9e Registry decorator to bring subscribes to methods
This adds some sugar to allow subscription to resources via
a decorator directly on a method as it is defined in a class.

This will allow us to stop overriding __new__ everywhere for
subscriptions and will allow the fact that a method is subscribed
to a resource to be visible right above the method itself.

See the follow-up patch[1] for an example of how this can clean
things up.
1. I764be99b2edbd0e7b54673c1940e883d7f313bf5

Change-Id: I1020c5ddec57f535e5b94f803144dfa19d668937
2017-02-21 15:51:14 +00:00
Kevin Benton
7c8f4c5294 Add some debug statements to root-cause 1666493
It seems like the allocate is being called on the wrong subnet
in the related bug report. Add an assert and some debug
statements to help figure out why.

Change-Id: I22b8f1f537f905f4b82ce9e50d6fcc5bf2210f9f
Related-Bug: #1666493
2017-02-21 07:36:46 -08:00
Jenkins
f3287313d8 Merge "Don't delete_port on binding deadlock" 2017-02-21 08:26:30 +00:00
Jenkins
5a79873632 Merge "Avoid loading network and all rels for subnet query" 2017-02-21 07:09:16 +00:00
Kevin Benton
60edb4c951 Allow no network to be passed into PortContext
This allows a PortContext to be constructed without a network
passed in for cases like update_port_status that don't examine
bindings, segments, or any other network properties.

In the event that a mechanism driver is loaded that does reference
the 'network' property for these occasions, the context will look
up the network then in a late binding fashion.

This will improve the performance of the update_port_status call
from the provisioning blocks callback, which doesn't provide a
cached network to update_port_status.

Partial-Bug: #1665215
Change-Id: I498791614fd456ab67c453cad691f7658d107123
2017-02-21 06:59:50 +00:00
Kevin Benton
2c01ad9c56 Avoid segment DB lookup in _expand_segment on port
The port context already has a network attached to it that contains
all of the segments for that network. In all cases the segments the
port wants to lookup should be present here so we can just iterate
over them without a separate DB query.

Partial-Bug: #1665215
Change-Id: I9014c4e401134f4db908ed989e0095d0ca95b7c9
2017-02-21 06:59:37 +00:00
Kevin Benton
4134f882cc Make ML2 OVO push notification asynchronous
The OVO push notification logic was blocking the AFTER_UPDATE
event for all core resources. This isn't problematic for individual
HTTP API calls. However, the agent current updates the status of
every port it wires two times, including on agent restarts.

In order to drastically reduce the impact of this notifier, this
patch moves it into a spawned eventlet coroutine so it doesn't
block the main AFTER_UPDATE events. A semaphore is used to prevent
multiple coroutines from trying to hit the database at once in the
background.

This doesn't change the semantics of the notifier since its goal
is always to send the latest events.

Partial-Bug: #1665215
Change-Id: Ic259bad6f65f4bc45f5b900e0979c9a91865089b
2017-02-21 06:58:12 +00:00
Jenkins
ee08bdc5f5 Merge "Allow no network to be passed into subnet context" 2017-02-21 01:04:14 +00:00
Jenkins
6f944bab1e Merge "Remove ORM relationship between ports and networks" 2017-02-20 19:00:59 +00:00
Jenkins
2bef2e6699 Merge "Revert "Don't disable Nagle algorithm in HttpProtocol"" 2017-02-20 17:24:49 +00:00
Kevin Benton
bc306a5512 Avoid loading network and all rels for subnet query
The Subnet model has a relationship to Network that is only
used for bumping the revision of the network. However, loading
the network loads all of its relationships as well so we end
up wasting a bunch of time loading segments, DHCP agents, etc all
for no reason. During a subnet update, we get the subnet from the
DB several times (policy engine, before update, after update,
and dhcp agent scheduler) so the slowness in get_subnet is amplified.

The recent switch to subqueries[1] has made loading all of this
unrelated data much more expensive since each relationship requires
a query, which was likely what brought this problem to the surface.

This adjusts the relationship to just load the standard attr object
of the network directly so we can still bump the revision of the network
without having to load the network itself.

This resulted in a ~20%-30% reduction of time spent in single update-subnet
operations on my dev environment (1sec to 650-850ms).

1. I6952c48236153a8e2f2f155375b70573ddc2cf0f

Closes-Bug: #1665967
Change-Id: Ie5f956ddf0704a5dde6e4f801a446f48fea5f697
2017-02-20 01:22:33 -08:00
Kevin Benton
715e9c81fc Don't log about retrying failed devices if empty
In a regular gate run we have hundreds of entries of
"retrying failed devices set([]) _update_port_info_failed_devices_stats",
which makes it hard to see when things are actually failing and
retrying.

This patch just makes it only log if there is a failed device present.

TrivialFix

Change-Id: I3388bce4d51f18a527de425927b7bfc96992f703
2017-02-20 07:33:39 +00:00
Kevin Benton
8a1371588d Allow no network to be passed into subnet context
Similar to change I498791614fd456ab67c453cad691f7658d107123,
we can avoid an unnecessary network retrieval by making the network
part of the subnet context lazily loaded by allowing None to be
passed into the subnet context.

If a driver does need items off of the network, the context will
trigger a lookup at the time of reference.

Partial-Bug: #1665967
Change-Id: Ic6651f1d44fcdbb749c99a6cc2c7300b1036388c
2017-02-19 21:32:54 -08:00
Jenkins
99fe2f25a2 Merge "Add a tempest scenario for floating-ip" 2017-02-19 02:35:16 +00:00
Rodolfo Alonso Hernandez
4ffeef246f Enforce port QoS policies for all ports.
This patch enforces the port QoS policies applied on all ports.
Besides that, a port QoS policy must prevail over a network QoS
policy, if both are present on the same port.

Change-Id: Icccb835e48bb70ac1a08e0887ecb34160bec8cfa
Closes-Bug: #1659312
Closes-Bug: #1665282
2017-02-18 15:33:40 +00:00
Jenkins
d7020ce931 Merge "Pecan: Get loaded by paste deploy" 2017-02-18 05:11:04 +00:00
Jenkins
7406d028d7 Merge "Skip native DHCP notifications on status change" 2017-02-18 05:10:49 +00:00
Jenkins
3e4dbb5d16 Merge "Turn nova notifier into a proper rate limiter" 2017-02-18 00:40:52 +00:00
tonytan4ever
ebc7e1fb2f Pecan: Get loaded by paste deploy
This sets up the factory methods needed to have paste deploy create the
pecan app and return it.  It also changes the legacy factory methods to
conditionally use the pecan factory methods if the web_framework config
option is set to 'pecan'.  This way, all deployments of neutron will not
need to change their api-paste.ini files to get pecan toggled on.  It
should just happen without notice once pecan becomes the default.

Also, by moving this to be loaded by paste deploy, there is a good chunk of
code that has been removed because it is no longer necessary.

Co-Authored-By: Brandon Logan <brandon.logan@rackspace.com>
Change-Id: I8b1bbea8d90fdc62715cd8b6738ad955df53d7cd
2017-02-17 14:54:27 -06:00
Kevin Benton
3dddfa56db Macvtap: Check for no original port in is_live_migration
Change 6865f4d9f22d5daa2f07ff9651c2280aed489c8c mistakenly
assumed that None would not be present for the 'original'
property on a PortContext. However, this is the default value
for the original field in PortContext, which is what is used
in the construction as part of the _create_port_db process
in ML2.

This resulted in binding failures for the macvtap mech drivers
due to an attribute error in cases like brand new ports.

This patch simply checks for None before trying to determine
if it's a live migration (which it isn't in the case of port creation).

Part of the issue is likely that the FakePortContext in the unit tests
was defaulting to an empty dict which is the not the same behavior as
the real PortContext.

Change-Id: I6659235a70aa4528fd21911c04e651194591e449
Closes-Bug: #1658802
2017-02-17 17:41:17 +00:00
Jenkins
e6fd02d941 Merge "Move dhcp_release6_supported to runtime checks file" 2017-02-17 02:08:08 +00:00
Jenkins
45db3d3202 Merge "Move ovsdb_nested transaction to ovs_lib" 2017-02-16 15:21:49 +00:00
Jenkins
0480a07b49 Merge "Adding cleanup of floating ips" 2017-02-16 12:20:37 +00:00
Jenkins
833843d9a2 Merge "Flavors: move dict extend out of txn" 2017-02-16 07:26:32 +00:00
Kevin Benton
840e04b6f1 Skip native DHCP notifications on status change
On profiling the get_devices_details communications between
the agent and the server, a significant amount of time
(60% in my dev env) is being spent in the AFTER_UPDATE events
for the port updates resulting from the port status changes.

One of the major offenders is the native DHCP agent notifier.
On each port update it ends up retrieving the network for the
port, the DHCP agents for the network, and the segments.

This patch addresses this particular issue by adding logic to
skip a DHCP notification if the only thing that changed on the
port was the status. The DHCP agent doesn't do anything based on
the status field so there is no need to update it when this is
the only change.

Change-Id: I948132924ec5021a9db78cf17efbba96b2500e8e
Partial-Bug: #1665215
2017-02-15 20:49:45 -08:00
Jenkins
0456789673 Merge "Clean up ovsdb-native's use of verify()" 2017-02-16 01:11:28 +00:00
Terry Wilson
7e4b9f2446 Move dhcp_release6_supported to runtime checks file
Since one of the main reasons for the sanity check system was to
avoid doing runtime checks, importing a sanity check to do a
runtime check encourages bad behavior. This moves the check to a
new runtime_checks.py file that includes a note encouraging people
to use sanity checks wherever possible.

Change-Id: I06bffe00bb796b4727dca7867a15302582ffcc10
2017-02-15 16:29:01 -06:00
Jenkins
811b288a8e Merge "Remove logging import unused" 2017-02-15 18:08:24 +00:00
Jenkins
edbc4b9b6f Merge "Invert device_owner to avoid filtering too much" 2017-02-15 18:07:11 +00:00
Kevin Benton
79ca8fb848 Flavors: move dict extend out of txn
Change I583aef9735cfa5984312507f66198d009eef9ce2 moved
_make_flavor_dict inside of the transaction to avoid detached
instance errors on loading the relationship. However, we should
avoid the pattern where we can of building the response before
the changes are flushed to the database because things like
default values on columns will not be evaluated yet.

This moves it back out of the transaction and adds a subquery lazy
load to the relationship required by the dict extend function to
avoid the detached instance error.

Partially-Implements blueprint: enginefacade-switch
Change-Id: I5d01ca79ee2970849c3f807232f658fa19a23592
2017-02-15 08:58:35 -08:00
Gary Kotton
02b15f267f Remove deprecated methods supported by neutron_lib
The following methods are now supported in neutron_lib. These have
been marked as depracted in neutron for over a cycle now so we can
remove them:
 - parse_mappings - Use parse_mappings from neutron_lib.utils.helpers
 - get_hostname - Use get_hostname from neutron_lib.utils.net
 - compare_elements - Use compare_elements from neutron_lib.utils.helpers
 - safe_sort_key - Use safe_sort_key from neutron_lib.utils.helpers
 - dict2str - Use dict2str from neutron_lib.utils.helpers
 - str2dict - Use str2dict from neutron_lib.utils.helpers
 - dict2tuple - Use dict2tuple from neutron_lib.utils.helpers
 - diff_list_of_dict - Use diff_list_of_dict from neutron_lib.utils.helpers
 - cpu_count - Use cpu_count from neutron_lib.utils.host
 - round_val - Use round_val from neutron_lib.utils.helpers
 - replace_file - Use replace_file from neutron_lib.utils
 - safe_decode_utf8 - Use safe_decode_utf8 from neutron_lib.utils.helpers

NeutronLibImpact

Change-Id: Ie31da47b34e49a1974ad6b50d9e46ea8e82db294
Partially-implements: blueprint neutron-lib
2017-02-15 11:36:15 +00:00
Quan Tian
291f856919 Fix typo in blueprints.rst
TrivialFix

Change-Id: I8824d6d384e45d05eb1244d0089312ecc80dd08c
2017-02-15 18:23:40 +08:00
Jenkins
ca8abce1d5 Merge "For typo in sqlalchemytypes" 2017-02-15 09:57:22 +00:00
Jenkins
a13007ea92 Merge "fullstack: Fix race between updating port security and test" 2017-02-15 07:18:25 +00:00
Cao Xuan Hoang
f3f87f8d7f Remove logging import unused
Change-Id: Ica1f91a0f8258f59e7d6590b4997c63855806ca1
2017-02-15 14:01:04 +07:00
Jenkins
967a99aca8 Merge "Simplify the QoS bandwidth test to increase reliability" 2017-02-15 06:36:52 +00:00
YAMAMOTO Takashi
2e9d4ed079 Add a tempest scenario for floating-ip
Examine E-W traffic with or without floating-ip.

Change-Id: Ibc480d8b8f09c978f874e1e74bd52e3d615a57f6
2017-02-15 14:14:42 +09:00
Jenkins
20d8899294 Merge "tempest: Log server console output of failed SSH" 2017-02-15 03:37:42 +00:00
Jenkins
c4a8511260 Merge "Update docstring for base OVO" 2017-02-14 20:28:35 +00:00