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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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