18808 Commits

Author SHA1 Message Date
Brian Haley
b212951e17 Add a missing _LW()
Missed a _LW() in a recent ip_lib change.

Trivalfix

Change-Id: I1df870258fad2fb0f01c6bd34685efcb89acf4ce
2017-06-15 12:00:51 -04:00
Jenkins
a56fcd6728 Merge "Trigger port status DOWN on VIF replug" 2017-06-15 14:58:56 +00:00
Jakub Libosvar
33778d9605 functional: Add support for python35 flavor
configure_for_func_testing.sh configures rootwrap into venv directory.
This patch consumes venv passed from project-config including python
version flavor.

Change-Id: I7fea6e9aa09550e00edf6ce2d7301312307df5fd
2017-06-15 13:57:30 +00:00
Jakub Libosvar
5d619e54e2 net_helpers: Set process streams to text mode
RootHelperProcess extends Popen from subprocess and sets all
stdin/stdout/stderr descriptors to PIPE. These descriptors use byte
array by default in Python 3. If universal_newlines [1] is set for Popen
object, then those descriptors work in text mode.

[1] https://docs.python.org/3.5/library/subprocess.html#popen-constructor

Change-Id: I3fa2192271aed81fb6da658b8196b365a20fa286
2017-06-15 12:32:18 +00:00
Jenkins
2d752108d0 Merge "Fix test_dvr_gateway_host_binding_is_set" 2017-06-15 11:56:14 +00:00
Kevin Benton
0d7952400b Trigger port status DOWN on VIF replug
Now with the merge of push notifications, processing a port update
no longer automatically implies a transition from ACTIVE to BUILD
to ACTIVE again.

This resulted in a bug where Nova would unplug and replug an interface
quickly during rebuild and it would never get a vif-plugged event.
Nothing in the data model was actually being updated that resulted in
the status being set to DOWN or BUILD and the port would return before
the agent would process it as a removed port to mark it as DOWN.

This fixes the bug by making the agent force the port to DOWN whenever
it loses its VLAN. Watching for the VLAN loss was already introduced
to detect these fast unplug/plug events before so this just adds the
status update.

Closes-Bug: #1694371
Change-Id: Ice24eea2534fd6f3b103ec014218a65a45492b1f
2017-06-15 02:48:11 -07:00
Rodolfo Alonso Hernandez
7064e587db Remove unreachable code in OVS mech driver
Removed an unreachable section of code in OpenvswitchMechanismDriver.

Trivial-Fix

Change-Id: I756594d4d2cc6a63e2ecfdf713f18bebdffeb4d2
2017-06-15 09:26:31 +01:00
Rodolfo Alonso Hernandez
3e87e4ab0d Add "default" behaviour to QoS policies documentation
Added devref documentation related to the "default" behaviour
for QoS policies.

Change-Id: Ic3b149ec5dfdc732a4b5851237389abaef8992b7
Closes-Bug: #1694298
2017-06-15 09:02:12 +01:00
Jenkins
c507656044 Merge "Integrate Security Groups OVO" 2017-06-15 07:37:38 +00:00
Kevin Benton
73776facdc Use super to make _build_routers_list safer
This switches _build_routers_list to call 'super' in both
of the override cases so we aren't sensitive to class ordering.

Change-Id: I2f8b54826918280cf63d69a6d34bfc4b358b3b6a
Related-Bug: #1695101
2017-06-15 00:28:16 -07:00
Kevin Benton
803f7b8544 Fix test_dvr_gateway_host_binding_is_set
Router scheduling was happening before the schedule call
so sometimes the router was being scheduled to a different
host than the test was expecting.

This fixes it by explicitly setting the router to not be HA
and calls schedule before adding interfaces that would trigger
scheduling.

Closes-Bug: #1698058
Change-Id: I6c6319f1da72546a9d21af198daf9a2a67e6dec8
2017-06-15 00:25:35 -07:00
Jenkins
920c2f6afa Merge "Add myself to the list of our Infra liaison" 2017-06-15 05:51:46 +00:00
Jenkins
0f2bb3ca1d Merge "Add a dashboard for Infra reviews" 2017-06-15 05:51:31 +00:00
Jenkins
4b4fdee678 Merge "Integration of Allocation/Endpoints OVO" 2017-06-15 03:20:09 +00:00
Jenkins
817ca843fa Merge "Add support for ingress bandwidth limit rules in ovs agent" 2017-06-15 03:19:53 +00:00
Kevin Benton
9c0a0de556 Manually increment revision numbers in revision plugin
Don't rely on the SQLAlchemy revision_col flag to bump revision
numbers and instead bump them in a before_flush handler. This
will allow the follow-up patch to do enforcement on conditional
updates before the revision number is incremented.

Partial-Bug: #1493714
Partially-Implements: blueprint push-notifications
Change-Id: I5feeec5b8385727eff53dc669363bc41db8ceaba
2017-06-14 18:47:17 -07:00
Kevin Benton
5d66e3f198 Decompose SG RPC API DB methods
Break apart the SG RPC API into sg info generation logic,
notification logic, and logic to retrieve the rules from
the database.

This allows a follow-up patch to re-use the same security
group info generation logic while retrieving the security
group info from a push notification cache on the agent rather
than a DB on the server.

Partially-Implements: blueprint push-notifications
Change-Id: Ib4359e4016b5a72f70f3fd4f9134887eef59a0bd
2017-06-14 16:11:41 -07:00
Jenkins
1720468638 Merge "DVR: Fix DVR Router snat ports and gateway ports host binding issue" 2017-06-14 22:43:09 +00:00
Jenkins
0ec5c033c2 Merge "Drop IPv6 Router Advertisements in OVS firewall" 2017-06-14 21:42:36 +00:00
Anindita Das
995e646b11 Integration of Allocation/Endpoints OVO
This patch integrates the Oslo-Versioned Objects created for
VlanAllocation, VxlanAllocation, VxlanEndpoints, GreAllocation,
GreEndpoints, GeneveAllocation and GeneveEndpoints into the
code base.

Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
Change-Id: I0d592bae452876b24c28ca4cc4bf6392b5ab6493
Co-Authored-By: Victor Morales <victor.morales@intel.com>
2017-06-14 20:24:58 +00:00
Jenkins
74b126dc44 Merge "[log]: db models and migration rules" 2017-06-14 19:01:01 +00:00
Jenkins
ab8555a2ff Merge "Reduce extension logging on init" 2017-06-14 18:51:56 +00:00
Jenkins
02d94aaec6 Merge "Stop arping when interface gets deleted" 2017-06-14 18:35:16 +00:00
Bernard Cafarelli
681f611249
python3: use a list of IPDevice objects in tests
Fixes "TypeError: unhashable type: 'IPDevice'" in
neutron.tests.functional.agent.linux.test_ipset.IpsetManagerTestCase

IPDevice class defines an __eq__() method, which in Python 3 disables
the default __hash__() method (and cannot be used in a set). Use a list
instead as it is enough for the test

Change-Id: I09c538908e55df1b8d305265774c57df1ec42f21
2017-06-14 18:29:28 +02:00
Brian Haley
6451e07503 Fix linuxbridge ebtables locking
Change linuxbridge ARP protection code to always hold the
neutron ebtables lock while operating on rules.  There
were a couple of places where we were reading the rules
without it.

Change-Id: Id7b38a3a662fb2e2736baa015492c36699319e58
Related-bug: #1697833
2017-06-14 15:12:37 +00:00
Rodolfo Alonso Hernandez
0a185354a1 TC doesn't rise exception if device doesn't exist
If device doesn't exit, TC doesn't need to raise an exception
during the deletion of the qdisc.

In iproute2 source code [1], the error code used is "1".

[1] https://kernel.googlesource.com/pub/scm/linux/kernel/git/shemminger/iproute2/+/master/tc/tc_qdisc.c#188

Change-Id: I9abecd6ef9d74abff27fb0ed0f5f4535c0622fd6
Closes-Bug: #1697937
2017-06-14 15:58:33 +01:00
Kevin Benton
7737e69809 Fix usage of registry.receives in Nova notifier
Receives expects a list of events for each resource.

TrivalFix
Change-Id: I4a39f2e9d2f10639a209e7311fe44b94d369c5b1
2017-06-14 12:56:57 +00:00
Boden R
7cae827b6b replace WorkerSupportServiceMixin with neutron-lib's WorkerBase
neutron-lib contains the WorkerBase class [1] that is the equivalent of
neutron's WorkerSupportServiceMixin. This patch switches over to
neutron-lib's version.

Note: IIUC no consumers are using WorkerSupportServiceMixin so this
patch can land without waiting for them to sync-up. I've included
the lib impact tag just in case.

NeutronLibImpact

[1] https://review.openstack.org/#/c/424151/
[2] http://codesearch.openstack.org/?q=WorkerSupportServiceMixin

Change-Id: Iacf1b6dfe318e3e6cfc76e61c65d407cf9ae7b36
2017-06-14 06:56:48 -06:00
Boden R
85a44ee3c0 use neutron-lib's callback fixture
There were a few places left in the code (with TODOs) that were still
mocking out the callback manager. This patch switches them over to
the neutron-lib callback fixture.

Change-Id: I9e710db6a5103436b0f098e8f73625e3941df492
2017-06-14 06:50:29 -06:00
Jenkins
1a8901a1ed Merge "Retry ebtables lock acquisition failures" 2017-06-14 12:25:23 +00:00
Sławek Kapłoński
2d0d1a2d76 Add support for ingress bandwidth limit rules in ovs agent
Add support for QoS ingress bandwidth limiting in
openvswitch agent.
It uses default ovs QoS policies on bandwidth limiting
mechanism.

DocImpact: Ingress bandwidth limit in QoS supported by
           Openvswitch agent

Change-Id: I9d94e27db5d574b61061689dc99f12f095625ca0
Partial-Bug: #1560961
2017-06-14 11:11:43 +00:00
Kevin Benton
ec5b75f543 Don't log ipam driver on every IP allocation
We only support one driver right now so there isn't a point
in logging it for every single IP allocation call.

TrivialFix

Change-Id: Iebd753e9ca433227c9622227ba76a246b4fea2b3
2017-06-14 02:11:17 -07:00
Kevin Benton
3ad8b30e2f Remove unnecessary debug statement from OVO push
neutron.api.rpc.handlers.resources_rpc already logs the object
being pushed so we don't need to log that we are about to call it.

TrivialFix

Change-Id: I3f37f0788d8f5cc86d37b16c13054d74c5fee6c6
2017-06-14 02:10:10 -07:00
Kevin Benton
355dab604a Reduce extension logging on init
Reduce from 4 separate lines into 1

TrivialFix

Change-Id: I137944fe4c6cfbb1e27ad4e4a233d4220642f3e4
2017-06-14 02:03:08 -07:00
IWAMOTO Toshihiro
1c6b51259c python3: Do not pass MagicMock as ConfigOpts
Doing so causes a eventlet.sleep(MagicMock()) call, which results
in comparing MagicMock with float and generates a TypeError in python3.

Change-Id: I970c215433fda05fa4570b2250a36aab4c18c616
2017-06-14 08:47:33 +00:00
Jenkins
044a06383b Merge "Stop using nested transactions in OVO get/delete" 2017-06-14 08:40:38 +00:00
Jenkins
18cffe63ae Merge "Add libffi-dev to bindep.txt" 2017-06-14 07:47:42 +00:00
Kevin Benton
2e7b787f0e Retry ebtables lock acquisition failures
It seems after the merge of
https://bugs.launchpad.net/ubuntu/+source/ebtables/+bug/1645324
that ebtables can fail to acquire a lock and bail with an error
255. This adds some retry logic to retry it up to 10 times to
work around this issue.

Closes-Bug: #1697833
Change-Id: Ic9dcf4b236a93e8811413c6ce2c4b82602544c6d
2017-06-13 22:50:19 -07:00
Kevin Benton
a30f2cbb1b Move info retrieval methods below notifier
This is a simple code move within a class to prepare
for a class separation in the following patches.

TrivialFix
Partially-Implements: blueprint push-notifications
Change-Id: Ibe40973568f1c9def2ded2f3a750e3423f4bd416
2017-06-13 22:15:48 -07:00
Kevin Benton
1a64aad6a3 Move db methods to bottom of SG RPC class
This is a simple code move within a class to prepare
for a class separation in the following patches.

TrivialFix
Partially-Implements: blueprint push-notifications
Change-Id: I843b316b01ca67cfe4636b01f960e0ae751b37a6
2017-06-13 22:13:18 -07:00
YAMAMOTO Takashi
5c2e607dd5 Add a dashboard for Infra reviews
Generated from https://review.openstack.org/#/c/473683/

Change-Id: I0ff12d258e4ad048199ebb593fbb92224f9ca528
2017-06-14 12:11:58 +09:00
YAMAMOTO Takashi
fc72c0ceb8 Add myself to the list of our Infra liaison
I hereby volunteer.

Change-Id: Ie1279637b10214f69b8038617b4ec556425e06d9
2017-06-14 12:07:17 +09:00
Kevin Benton
a272022026 Move retry decorator to DB methods
This moves the retry decorators onto the DB querying
functions in preparation for a refactor that allows
the data structure generating functions to be backed
by the push notification cache on the agents.

Partially-Implements: blueprint push-notifications
Change-Id: Id43783a244e4bc121b7efc378b37d1f70ffd33b3
2017-06-13 18:14:23 -07:00
Jenkins
ce33de5f51 Merge "Do not defer allocation if fixed-ips is in the port create request." 2017-06-14 00:46:00 +00:00
Jenkins
e8597e05e0 Merge "Remove unused class 'QoSPolicyDefaultNotFound'" 2017-06-13 19:55:49 +00:00
Jenkins
f7efec5c25 Merge "Switch to start_all_workers in RPC server" 2017-06-13 19:37:32 +00:00
sayalilunkad
af52d499a5 Integrate Security Groups OVO
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
Change-Id: I2d43ad79eb004e68866050fbd63d166920b9f2b0
Co-Authored-By: Ihar Hrachyshka <ihrachys@redhat.com>
Co-Authored-By: Victor Morales <victor.morales@intel.com>
Co-Authored-By: Manjeet Singh Bhatia <manjeet.s.bhatia@intel.com>
2017-06-13 19:27:27 +00:00
Akihiro Motoki
8e8f721f6f Add libffi-dev to bindep.txt
libffi-dev is required to install cffi and PyNaCL from tarballs.
cffi is installed from requirements.txt, so 'test' profile is not
specified.

We usual use wheel packages when installing python packages,
but tarball is sometimes used, for example, when a new version
is uploaded. I think it is worth adding it to bindep.txt
to avoid accidental gate failure.

Closes-Bug: #1697613
Change-Id: I4800c9f213fa5c8f28c8603e022264e6aa139090
2017-06-13 19:26:49 +00:00
Swaminathan Vasudevan
abe9938367 DVR: Fix DVR Router snat ports and gateway ports host binding issue
DVR snat ports and gateway ports are not bound to any host
and so we don't see the snat namespace getting created.

The issue is the _build_routers_list in l3_dvr_db.py is not called due
to the inheritance order.

Change-Id: I56f9de31524aeef262cf2a78be3abf8487c21a12
Closes-Bug: #1695101
2017-06-13 10:25:58 -07:00
Jenkins
36926a4192 Merge "Don't log about no notification on GET requests" 2017-06-13 16:54:18 +00:00