This patch moves the start notifications emitted in the API
layer ('network.create.start', etc) to before the DB retry
decorator. This prevents benign retry events from resending
notifications onto the message bus.
Change-Id: I8159692a107ede397a4abeff71310a99fffa4862
Closes-Bug: #1532051
The routing table manager maps address scope ids to routing tables.
It uses the rt_tables file specific to each namespace to maintain the
mapping so that id can simply be used as the table name when running
iproute2 commands. This will be useful when debugging.
Change-Id: Icd5e98c82a070045a50e0c5d3762906b7e159d3d
Partially-Implements: blueprint address-scopes
In DhcpAgent, when enable_isolated_metadata_proxy() spawns
a metadata proxy agent for a network, it will pass router_id
instead of network_id if metadata network is enabled and
a router port is connected to this network.
Later, MetadataDriver will register this uuid (i.e. router_id)
with monitor for the new metadata proxy process.
But when disable_isolated_metadata_proxy() destroys a metadata
proxy agent for a network, it always passes network_id as the uuid.
Thus MetadataDriver can not find the matching process. So the
corresponding metadata proxy agent can not be destroyed.
Closes-bug: #1526084
Change-Id: Icab94f4e09e95fa6729c458522a3fe50e850a4be
pylint complains about this:
************* Module neutron.tests.api.base
C:207, 4: Class method _try_delete_resource should have 'cls' as
first argument (bad-classmethod-argument)
Change-Id: I189c54a2c641b97579761ff37c8f87077037697b
Currently there is no test coverage for when prevent_arp_spoofing is set to true.
This fix address that issue.
Change-Id: Ie8bfa873120378dcdcb9d43e307daa5d55c038f2
Closes-Bug: #1520255
This will make us more in line with other projects in terms of testing
API. It also allows to remove some duplicate code from base test classes
for Neutron, leaving just Neutron specific fixture setup there.
Note: we don't add a new dependency because the library is already used
in some of database functional tests through oslo.db base test classes.
Change-Id: Ifec6cce386d8b024605496026c8469200f3c002b
Closes-Bug: #1531484
The oslo.utils reflection module/code handles more variations of
where a class name may come from (on python 2 and python 3) so its
usage allows getting more accurate class names so we might as well use it.
Change-Id: I8e9bb4a8e517111eee80a60c518f29c8d87490e9
when creating macvtap passthrough to SR-IOV VF in Kernel >= 3.13 an
upper_macvtap symbolic link is created. For Kernel < 3.13 the only
way to know it is by parsing the ip link show output and look for
macvtap[0-9]+@<vf ifname>.
This patch used the ip link show command to detects
macvtap assigned vf so that detection of macvtap assigned vf
will work on all kernels
Closes-Bug: #1523083
Change-Id: Icbc8d6af5c00d1453095e04dd779210dc7244c7f
I saw a patch set [1] that was running in to circular imports and
removing these. I thought it'd be better to remove them all in one
shot.
[1] https://review.openstack.org/#/c/261222/1/neutron/db/agents_db.py
Change-Id: If1a9ba3091ac99f01f73b98a7459358c3efd4dd5
Skip IPv6 subnets when looking for an unused IP in the
floating IP tests since floating IPs cannot be requested
with v6 addresses.
This also fixes the iterator for the non-allocation pool
case.
Closes-Bug: #1531706
Change-Id: Id0b2c28970ab61e45755818e3e0798daa4453ce7
This reverts commit be63289c273fa02159a6958e0b456d5fda217431.
Yes, it's a third order revert. Ain't it cool?
Now that tox 2.3.1 is used in gate, and it is expected to fix the issue
that we originally hacked around here, let's revert to the previous
code.
For the least, it makes API target executable locally without the need
to set TEMPEST_CONFIG_DIR in the external environment.
Also bump minimal tox version to 2.3 to avoid users hitting the old
issue with their tox 2.2.* package.
Change-Id: Ic64cb466d117ad39436cb1d079c8f5657260da2c
Related-Bug: #1515335
In the case of outbound traffic, set remote_ip to dst.
In the case of inbound traffic, set remote_ip to src.
Change-Id: I7f27b93efa67baf3efccaa94f6a1337d6886e230
Closes-Bug: #1528137
DocImpact: Clarify remote_ip_prefix description of metering label rule in API site
It's a method called 'get_port_infos' that returned
4 values, most of which were not a function of the port.
What the method did or its naming was very unclear to me
so I broke it up according to its usage.
Change-Id: Ib1fd589e9123fc5009f0887dd400c550efa687a3
Require explicit enablement for the service. Enable the service in API
gate job because we have API tests for the service.
Change-Id: Ibdd41eb761b64499a992f49ac0159167c7fb7d79
Adds a test to Neutron to check object versions for any changes
to objects. It prompts the developer to update the version of the
changed object. It uses oslo.versionedobjects.
Change-Id: I99454b28ae0b5fa663354eeccdf709d4030a280b
Co-Authored-By: Ryan Rossiter <rlrossit@us.ibm.com>
The SR-IOV agent support l2 agent extension due to
this patch https://review.openstack.org/#/c/210483/
This patch allow to show the loaded l2 agent extensions
when executing neutron agent-show <SR-IOV agent id>
Closes-Bug: #1527307
DocImpact update the agent configuration to show
l2 agent extensions
Change-Id: I5dcb79ef539e4f18693e4a8eff03fff40873d3fa
This patch adds a notification for systemd after the agent has reported
its initial state to the Neutron server. This enables configuring
orderly startup of services that are dependent on the server having a
healthy openvswitch agent running.
Related-Bug: #1525901
Change-Id: I8d08f1b2ae196b1e48f9d91e06966687c0a8bd43
The check of the tenant done in the method _get_tenant_id_for_create()
is already did by the Neutron Controller in prepare_request_body(),
with a call to attributes.populate_tenant_id().
Moreover, when the Controller processes a "create" requests, it
will add the 'tenant_id' to the resource dict.
Thus, _get_tenant_id_for_create() can be deleted.
Calls to this method are replaced by the res['tenant_id'].
Changes have to be done in UT to explicitly add the tenant_id while
creating resources, since the UT framework is bypassing the controller code
that automatically adds the tenant_id to the resource.
Co-Authored-By: Hong Hui Xiao <xiaohhui@cn.ibm.com>
Closes-Bug: #1513825
Change-Id: Icea06dc81344e1120bdf986a97a6b1094bbb765e
Depends-On: I31022e9230fc5404c6a94edabbb08d2b079c3a09
Depends-On: Iea3f014ef17a1e1b755cd2efe99afd1a36ebbc6a
Depends-On: I604602d023e0cbf7f6591149f914d73217d7a574
There is extensions mechanism for l2 agents already but it was
implemented only for openvswitch l2 agent. This patch adds support for
such extensions also for linuxbridge agent.
This patch also adds support for network_update events received by the
agent via RPC. It is required because sometimes when a network is
updated (for example with a QoS policy is attached to it) all ports that
belong to the network should also be updated.
Change-Id: Ie81c818d0eb817b044a6df1cbddc5864f118fe3f
Partial-bug: 1468803
Patch https://review.openstack.org/#/c/256164/
broke the Neutron API job by unsetting Tempest configuration
values that were unused by Tempest, but used by Neutron's fork
of Tempest. This patch copies credentials from the 'auth' section
to the 'identity' section.
The longer term plan is detailed here:
https://etherpad.openstack.org/p/neutron-tempest-defork
TL;DR: Removed overlap of tests between the Tempest and Neutron
repos, then use Tempest's plugin architecture for the tests that
will remain in the Neutron repo.
Change-Id: Ieb396cfd17f9cb66776ead11e7f760c1c26a0b08
Since dvr routers have to be scheduled and updated for
all dvr service ports other than vms, it is better to
rename the function appropriately.
Change-Id: I4e3d58bb9a01798cc808ac1e77584153a29a89e3
Iptables-firewall use commands sysctl and conntrack.
These are missed out in the plugins resulting in (No filter matched) errors in
non-l3 nodes. L3 nodes do not have this problem as l3.filters rootwraps these
commands.
Closes-bug: #1528641
Change-Id: I1167544a41f2ea91781ae2bb7aa208e25fec1524
Since oslo-incubator is no longer maintained[1] after
90ae25e38915cc502d9e9c52d59e8fb668a72ae1. And
openstack/common/_i18n.py is not referenced by Neutron. Let's remove it.
[1] http://lists.openstack.org/pipermail/openstack-dev/2015-November/
079343.html
Change-Id: Ia81d30d9722a5cc7d6ad21b0cbb27df8cd80c848
Juno will be deprecated with Mitaka release, so juno_initial migration
should be replaced with kilo_initilal migration in Mitaka.
Optimized execution time of "upgrade head" command.
Test on my local machine on MySQL shows about 28% reduce (from 188
seconds to 137 seconds).
Related-Bug: #1501380
Change-Id: I26571f1c43764a01d1ae9869ce43ff18ea677892
In some scenario, like in OpenStack Kolla, system may lack
iptables-ipv6 package. This may cause command ip6tables-save
or ip6tables-restore invalid and ovs-agent error.
This patch allows checking ip6tables support from CLI:
neutron-sanity-check --ip6tables_installed
Or using configuration options, for example:
neutron-sanity-check --config-file /etc/neutron/neutron.conf
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini
Change-Id: Ia6cf1ed6b5033442f03eac61d2d0d783c146d797
Closes-Bug: #1530042
Misspelling in following message:
"# interconnect physical and integration bridges using veth/patchs".
Should be:
"# interconnect physical and integration bridges using veth/patches".
Totally 1 occurrence in Neutron base code.
Change-Id: If752b8c65cf4993447b93dfc9a06de15389f2675