21141 Commits

Author SHA1 Message Date
Bernard Cafarelli
d82a5d3c14
Update tests neutron.conf to use transport_url
The deprecated rpc_backend parameter was removed from oslo.messaging in
I193cc0e613459a6dbbfd54ed0901a54ded78d712

Use transport_url parameter instead

Change-Id: Ia73fe052986617dd6ce5e68cced0c4c88516a33e
Closes-Bug: #1795878
2018-10-04 11:39:23 +02:00
Zuul
26e6f961f9 Merge "Refactor l3hamode for ha migration." 2018-10-04 06:20:15 +00:00
Zuul
6eef68e384 Merge "Always set ovs bridge name in vif:binding-details" 2018-10-04 06:13:37 +00:00
Zuul
d58a5bc044 Merge "Disable some pylint checks" 2018-10-04 05:29:08 +00:00
Zuul
615705b2bd Merge "Update code review policies for sub-projects." 2018-10-03 22:39:51 +00:00
Zuul
2f421ecdd0 Merge "bump neutron-lib version to 1.19.0" 2018-10-03 22:05:54 +00:00
Nate Johnston
f721c3dcc7 Add argument to get ports by SG to allow excluding owners
When code needs to load a list of all ports that are not router
interfaces, they tend to fetch the port information into memory and then
iterate over the ports, inspecting each port's device_owner.  For large
numbers of ports this is presumably inefficient.  This came up in a
discussion of just such a part in the code [1].

A more efficient solution is to perform this filtering in SQL.  This
change adds an argument to an existing method in the Port object to do
that.

[1] https://review.openstack.org/580721

Change-Id: I742d8a79175209e42f8bd6319956e960c73201ee
2018-10-03 20:05:16 +00:00
Brian Haley
ed225d3f57 Optimize OVS DVR CSNAT port code a little
Change _bind_centralized_snat_port_on_dvr_subnet() to pull
the subnet uuid out of the fixed IP earlier, since that
is all it is passing in its remote RPC call.

Trivialfix

Change-Id: I9686fd619214a3c33af253af5ad69e9f406c7e18
2018-10-03 19:51:10 +00:00
Brian Haley
eea5aaac4f Fix corner case in failure assigning MAC to SR-IOV NIC
Sometimes due to NIC driver incorrect behavior, VFs might be
missing in 'ip link show' output.  This may lead to a VM boot
failure as agent will just skip such missing devices.

Make the agent do a resync in case a newly added device
'disappears' during processing, which should cause a MAC to
get assigned.

Co-authored-by: Oleg Bondarev <obondarev@mirantis.com>

Change-Id: I148b5a025fc388821fd1269d02908cc8ce1882fe
Closes-bug: #1784484
2018-10-03 19:32:12 +00:00
Brian Haley
bc4f93c232 Fix best_match() deprecation warning
wsgi call to best_match() generates the following warning:

DeprecationWarning: The behavior of AcceptValidHeader.best_match
is currently being maintained for backward compatibility, but it
will be deprecated in the future, as it does not conform to the RFC.

Change to use acceptable_offers() as was done in nova code.

Simlar changes in the wsgi best language code as well, except
new call is to lookup().

Required bump to get WebOb 1.8.2.

Trivialfix

Change-Id: I45a222c098658eef6a49adcc168b0f5625ea49db
2018-10-03 19:30:40 +00:00
Zuul
6a767c2954 Merge "Remove a bare raise noticed by the linter" 2018-10-03 19:20:29 +00:00
Zuul
0678e48b6b Merge "Create temp file in setUp() to avoid warning" 2018-10-03 19:00:54 +00:00
Miguel Lavalle
9a103c3c2a Update code review policies for sub-projects.
As agreed during the Stein PTG, this patch proposes an update to the
code review policies, aimed at minimizing the impact of code changes in
Neutron on the Stadium and other networking related projects.

Change-Id: I455a62daa9115962cd6347d1f3966dae533e4abb
2018-10-03 10:58:33 -05:00
Bence Romsics
3d5bed139c bump neutron-lib version to 1.19.0
This patch bumps the requirements and lower constraints to pick up
neutron-lib 1.19.0 so we can consume it.

Change-Id: Ib0e3d19c18e6688f274c0573331a4595f7dbdaf0
2018-10-03 12:01:56 +00:00
Matt Riedemann
0014c0c373 Add openstack/placement as a required project for neutron-grenade*
In order to get openstack/placement installed as part of the
neutron grenade jobs, we have to list it as a required project.

Needed by https://review.openstack.org/604454/

Change-Id: I742660f398b52c62503acf00aaf7faa9a5a8650a
2018-10-03 10:00:14 +00:00
Brian Haley
bb7b5a1e81 Create temp file in setUp() to avoid warning
The tempfile in test_unwatch_log() generates a warning
in the 'cover' tests:

sys:1: ResourceWarning: unclosed file
<_io.TextIOWrapper name='/var/tmp/tmpz1l83cix/tmpjz5uavc7/
 watch_log_temp_file_name' mode='a' encoding='UTF-8'>

Create it in setUp() which will trigger an automatic
cleanup on test completion.

Trivialfix

Change-Id: I816ac65a935250f8606dba75d7080eb9c384fceb
2018-10-03 10:00:03 +00:00
Sean Mooney
995744c576 Always set ovs bridge name in vif:binding-details
- This change updates _set_bridge_name to set
  the bridge name field in the vif binding details.
- This change adds the integration_bridge name
  to the agent configuration report.

Change-Id: I454efcb226745c585935d5bd1b3d378f69a55ca2
Closes-Bug: #1788009
2018-10-03 09:59:34 +00:00
Boden R
6a24efcb70 use payloads for AGENT BEFORE_DELETE callbacks
This patch switches BEFORE_DELETE callback events for AGENT resources
over to the payload style args use a DBEventPayload object. In addition,
the _delete_mac_associated_with_agent is now refactored into it's own
method to allow the context parameter to be parsed by
retry_if_session_inactive.

NeutronLibImpact

Change-Id: I0af951f4346f9290c2eba6aad17f772fbf27bb2f
2018-10-03 09:59:24 +00:00
Doug Hellmann
87d98dcbe2 Disable some pylint checks
Newer pylint added some checks that trigger a lot for this
code base. Turn them off until we are ready to apply the
new rules.  They are:

 - c-extension-no-member (Informational)
 - keyword-arg-before-vararg (Warning)
 - inconsistent-return-statements (Refactor recommendation)

Change-Id: I8c1f72bb334c87d62d47e8296d13c660d6bb5576
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-10-03 08:41:56 +00:00
Doug Hellmann
a8e8f88cde Remove a bare raise noticed by the linter
There is a bare raise in a function that is used as an exception
handler.  Remove it and have the caller raise inside it's except
block instead.

Change-Id: Ib494d320e1c2e6cc6daa20255e30291fc2e258e8
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-10-03 08:41:26 +00:00
Doug Hellmann
cf463cce43 tell pylint to ignore python2 version of gettext
pylint compares the function arguments for gettext to what it can see,
and under python3 the signature does not match. This code is already
correctly branching based on python version, so just tell the linter
to ignore the line.

Change-Id: I653fe8bc11804dc20206f6296d89c14568ee4bc1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-10-03 08:39:35 +00:00
Hongbin Lu
b43b8c446d Remove population of is_filter keyword
The population of is_filter in network_ip_availability and
portbindings_extended modules was a walk-around for the missing
of this keyword in neutron-lib's resource attributes.
This issue is resolved in the release of neutron-lib 1.19.0
so this walk-around can be removed.

Depends-On: https://review.openstack.org/#/c/605690/
Change-Id: I7bb29bbe68f7e9afbc20704948661dd5e9dae912
2018-10-02 20:45:19 +00:00
Brian Haley
00de8f9a9e Do not fail deleting namespace if it does not exist
Note: this is a squash of two changes since they are
dependent on each other, and are currently blocking
the gate queue.

Sometimes cleanup methods are failing in the check and
gate queues trying to delete non-existing namespaces.
Since they could have been deleted asynchronously, don't
raise if the failure is "No such file or directory" since
the system is in the intended state.

Cleaned-up the DHCP agent to longer check for existence
first, and the tests to longer mock-out the namespace
exists check.

Fix test_legacy_router_lifecycle failures

Multi-path routes returned via the pyroute2 library have
their outgoing interfaces in the 'multipath' dictionary
element, not in the route dictionary.  In that case return
all the multipath routes correctly.

Change-Id: I5415cb3a88ff2640a19598a1fcb2278388815343
Closes-bug: #1795482
Closes-bug: #1795548
2018-10-02 09:52:22 -04:00
Manjeet Singh Bhatia
82d7c2beed Make binding statement singular.
The method _create_ha_port_binding returns only single binding
but add_ha_port using it use plural bindings while safe_execution
of create_ha_port_binding. I noticed this while converting l3ha_model
to ovo in [1], which required access to db_obj of bindings.

[1]. https://review.openstack.org/#/c/602497

Change-Id: Ifabed41c59b2a946e968fdb0748c17e654bd4fcc
2018-10-02 11:50:43 +02:00
Zuul
f0ba3f99c8 Merge "Fix doc output examples" 2018-10-01 20:58:00 +00:00
Zuul
2a18c8ac33 Merge "Do not install centralized FIP if HA port is down" 2018-09-30 06:07:28 +00:00
tianhui
3e96bbade5 Fix doc output examples
Update the response of openstack network agent list

Change-Id: Idbc6cb24ffa0ff58eb5a67fd83508184310baac5
2018-09-30 02:29:47 +00:00
LIU Yulong
656a8f8729 Do not install centralized FIP if HA port is down
The issue scenario happens when we disassociate a floating IP
while the 'master' router host is restarted or powered-off.

When the L3 agent is powered-on again, the HA router state config
still remains 'master', but the ha port is down. And the message
queue still has one 'router_update' message (floating IP
disassociate message), so the L3 agent will sync this router info
at least twice during the restart, one is the router_update, the
other is the L3 agent full-sync.

The first one will add the centralized FIP to the qg-device, because
the router state is 'master'. So for DVR HA routers, only add the
centralized floating IP to the qg-device in the snat-namespace when
the HA port is up. For the restart procedure, if the HA port is up,
but the router is set to 'backup', do not add the floating IP.

Closes-Bug: #1794305
Change-Id: Ib39fe7dcd437a867c69852885c461a594167f6a1
2018-09-28 13:15:34 +00:00
Zuul
bf6844fba1 Merge "use is_retriable from neutron-lib" 2018-09-27 23:56:12 +00:00
Manjeet Singh Bhatia
6ef54ff379 Refactor l3hamode for ha migration.
Reduce the check requested_ha_state to one by adding
old_owner and new_owner to make it simple.

Change-Id: I7ae2a6862d9020ba527229fb46e0b889237ace26
2018-09-27 02:41:36 +00:00
Brian Haley
920f3e7fb5 Fix pep8 F402 import shadowing
F402 import 'router' from line 44 shadowed by loop variable

Trivialfix

Change-Id: Ia0d42506889074d3e84a54f3bf29240e7885245e
2018-09-26 22:01:55 -04:00
Zuul
5928d25613 Merge "fix spell error" 2018-09-27 02:00:00 +00:00
Zuul
e9a793aaf2 Merge "Add PortForwarding to neutron.objects entrypoint." 2018-09-27 01:32:37 +00:00
Zuul
56bcb6fe0a Merge "Remove async_process, moved to "common"" 2018-09-26 05:25:36 +00:00
Wenran Xiao
66991f1c8b Add PortForwarding to neutron.objects entrypoint.
Closes-bug: #1794406
Change-Id: Ifad26642d730456136dfa9177d1c9515fe5ec421
2018-09-26 10:30:39 +08:00
Zuul
74c3ffa090 Merge "Bump pecan version to 1.3.2" 2018-09-26 00:58:51 +00:00
Zuul
f88cb5276d Merge "Pass context in l3 flavor notifications" 2018-09-25 10:10:29 +00:00
Slawek Kaplonski
40ba4ebe6a Bump pecan version to 1.3.2
In version 1.3.2 there is fix for issue which caused
failure of start neutron-server process.
Same issue was also reported in [1]

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1597622

Change-Id: Iafe10b13ee729d781a79fcfa328521acfecdaec1
Closes-Bug: #1794259
2018-09-25 11:58:13 +02:00
Lucian Petrut
253db749a7 Remove async_process, moved to "common"
This module's contents have been moved to the common module, keeping
it for backwards compatibility.

Three subprojects were using it. Once those projects start using
the new location, we can cleanup the old module.

Change-Id: I7f67dea25473552cd815ad734c1ec1c57b8cc5cf
Depends-On: I08563f4e609dfb6d446814c3497961d7d63c336e
Depends-On: I4486794cf04f1ebd08da906379a0f15e5452380a
2018-09-25 06:49:45 +00:00
Boden R
9849209bbd use is_retriable from neutron-lib
The db api is_retriable function is now available in neutron-lib. This
patch consumes it by removing is_retriable and related internal
functions and using neutron-lib's version where applicable.

NeutronLibImpact

Change-Id: Ie33a4eb4d1e52b2d985c9498edea2efb63ef569c
2018-09-24 11:11:13 -06:00
Zuul
ef71a924cf Merge "Make neutron-fullstack-python36 job voting" 2018-09-24 00:15:56 +00:00
Zuul
48a0d56e4b Merge "Use mktemp instead of tempfile in gate_hook.sh" 2018-09-21 22:06:58 +00:00
Nate Johnston
15ba1d7d64 Make neutron-fullstack-python36 job voting
The neutron-fullstack-python3[56] job has a record of stability at least
as good as the neutron-fullstack job at this point for the past 2 weeks
[1].  Make it a voting check and add it to the gate queue.

[1] http://graphite.openstack.org/render/?width=1242&height=553&_salt=1533933299.32&from=-14days&drawNullAsZero=true&lineMode=connected&connectedLimit=&areaMode=all&yStep=1&title=neutron-fullstack-python35%20job%20data&target=stats_counts.zuul.tenant.openstack.pipeline.check.project.git_openstack_org.openstack_neutron.master.job.neutron-fullstack-python35.SUCCESS&target=stats_counts.zuul.tenant.openstack.pipeline.check.project.git_openstack_org.openstack_neutron.master.job.neutron-fullstack-python35.FAILURE

Change-Id: I6e647cb502485bef8fed55046a2cd7778eb64ab2
2018-09-21 17:23:37 -04:00
Zuul
71701acbe0 Merge "Don't uninstall flow tables in setup_dvr_flows_on_integ_br" 2018-09-21 15:50:34 +00:00
Thomas Morin
fdaf24bead doc: OpenVSwitch firewall internal design, improvements (+ newline fix)
* explain 'ingress' and 'egress'
* reword a few explanations
* provide table numbers as well as table names
* capitalize protocol names: IP, ARP, TPC, etc.
* reword explanations for tables acting as integration
  points with L2 other extensions
* nits

This change also includes a newline removal in the related portion
of the code; this newline separates constants that are in fact related,
and its removal had been agreed upon to be handle as a follow-up
change to I60d299275effd9ef35c8007773d3c9fcabfa50fa.

Change-Id: Ied215b8942bfffa1f2af2f569d0e4a110a64a364
2018-09-21 15:07:09 +00:00
Zuul
f1c2fc6b2f Merge "Parse dhcp leases file in a more robust way" 2018-09-21 09:20:11 +00:00
Zuul
52a6328bdf Merge "Use Tempest slow job to run all slow tests" 2018-09-21 07:17:57 +00:00
Zuul
8eb17b4c8a Merge "Use templates for cover and lower-constraints" 2018-09-21 07:11:48 +00:00
Zuul
4fb500135d Merge "Fix broken link to Open vSwitch installation instructions" 2018-09-20 15:18:43 +00:00
Zuul
91dc9f9952 Merge "Update vpnaas-scenario docs" 2018-09-20 08:26:30 +00:00