18548 Commits

Author SHA1 Message Date
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
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
Jenkins
36926a4192 Merge "Don't log about no notification on GET requests" 2017-06-13 16:54:18 +00:00
Jenkins
fd0003aba7 Merge "Set HA network port to DOWN when l3 agent starts" 2017-06-13 12:47:20 +00:00
Jenkins
0a8b8d4fdc Merge "neutron-rpc-server fails with no plugins loaded" 2017-06-13 11:45:22 +00:00
Jenkins
1048d31108 Merge "Revert "Use vif_type='tap' for LinuxBridge for consistency"" 2017-06-13 11:45:09 +00:00
Jenkins
80cddec09e Merge "Mask password when logging request body" 2017-06-13 09:23:06 +00:00
Kevin Benton
57a37c4a87 Switch to start_all_workers in RPC server
This does the same as the logic present but it emits
the registry callback event for resources.PROCESS AFTER_SPAWN
that some plugins may be expecting.

Change-Id: I6f9aeca753a5d3c0052f553a2ac46786ca113e1e
Related-Bug: #1687896
2017-06-13 02:20:35 -07:00
Kevin Benton
79d7f76964 Don't log about no notification on GET requests
The pecan notifier hook was logging on every GET request
that it wasn't doing anything, which led to excessive logging.
This just eliminates it.

TrivialFix

Change-Id: Ie1262b54595f40f69c6859a09850845826ee8f14
2017-06-12 20:19:40 -07:00
Jenkins
31d24b4e1a Merge "Fix html_last_updated_fmt for Python3" 2017-06-12 19:25:36 +00:00
Jenkins
016a809e4f Merge "Use e.exc_type instead of calling str on exception" 2017-06-12 19:24:06 +00:00
Roey Chen
f5f8a75963 Mask password when logging request body
Change-Id: I825ab268c140b991e39583cd2c2d557a202b7d97
Closes-Bug: #1697408
2017-06-12 05:36:23 -07:00
Luong Anh Tuan
d5da2b5677 Remove unused class 'QoSPolicyDefaultNotFound'
This patch removes the dead code from neutron.

Change-Id: If5c7b0c81280218fe46f6c06076e9b268fd83d5f
2017-06-12 18:00:04 +07:00
Jenkins
3984c3fd1e Merge "Remove redundant code in QosServiceDriverManager" 2017-06-12 10:28:49 +00:00
Kevin Benton
cf4e857dd2 Use e.exc_type instead of calling str on exception
This fixes the usage of the oslo RemoteError exception checking
in the Linux Bridge trunk driver to stop calling 'str' on the
exception and just check the 'exc_type' attribute like we do
in the other agent code so it's safe to use with unicode.

Change-Id: I352ed422550343118319f8e83c4979f290f161f0
Closes-Bug: #1697383
2017-06-12 01:36:59 -07:00
Nguyen Phuong An
3ea08fe54b Remove redundant code in QosServiceDriverManager
I don't see notification_api [1] is used anywhere and it
duplicate with push_api[2]. So this patch-set removed it.

[1]https://github.com/openstack/neutron/blob/master/neutron/services/qos/drivers/manager.py#L41
[2]https://github.com/openstack/neutron/blob/master/neutron/services/qos/drivers/manager.py#L50

TrivialFix
Change-Id: Ib31c320f7486738190d27cf41e16a5f93e524039
2017-06-12 01:18:50 +00:00
Jenkins
01cc2696b7 Merge "Change allowed directions for QoS min-bw rule in SR-IOV" 2017-06-11 18:15:28 +00:00
Harald Jensas
33e48cf84d Do not defer allocation if fixed-ips is in the port create request.
Fix a usage regression, use case #2 in Nova Neutron Routed Networks spec
https://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/neutron-routed-networks.html

Currently ip allocation is always deferred if binding:host_id is not
specified when routed networks are used. This causes initial fixed-ips
data provided by the user to be _lost_ unless the user also specify the
host.

Since the user specified the IP or Subnet to allocate in, there is no
reason to defer the allocation.

a) It is a common pattern, especially in Heat templates to:
 1. Create a port with fixed-ips specifying a subnet.
 2. Create a server and associate the existing port.
b) It is also common to use Neutron IPAM as a source to get VIP
   addresses for clusters on provider networks.

This change enables these use cases with routed networks.

DocImpact: "The Networking service defers assignment of IP addresses to
the port until the particular compute node becomes apparent." This is no
longer true if fixed-ips is used in the port create request.

Change-Id: I86d4aafa1f8cd425cb1eeecfeaf95226d6d248b4
Closes-Bug: #1695740
2017-06-11 13:10:44 +00:00
Jenkins
2adde81696 Merge "remove unused reraise_as_retryrequest" 2017-06-11 08:41:11 +00:00
venkata anil
d730b10102 Set HA network port to DOWN when l3 agent starts
When l3 agent node is rebooted, if HA network port status is already
ACTIVE in DB, agent will get this status from server and then spawn
the keepalived (though l2 agent might not have wired the port),
resulting in multiple HA masters active at the same time.

To fix this, when the L3 agent starts up we can have it explicitly
set the port status to DOWN for all of the HA ports on that node.
Then we are guaranteed that when they go to ACTIVE it will be because
the L2 agent has wired the ports.

Closes-bug: #1597461
Change-Id: Ib0c8a71b6ff97e43a414f3db4882914b12170d53
2017-06-11 06:11:03 +00:00
Jenkins
e6b7ddd5fe Merge "Warn the admin of a potential OVS firewall_driver misconfiguration" 2017-06-10 11:03:38 +00:00
Jenkins
c1e65373b2 Merge "Checks if net_dns is None and returns so that we don't attempt to load None objects" 2017-06-10 06:15:50 +00:00
Jenkins
b1c2cfdc8b Merge "Update pylint disable list to pass pylint 1.7.1 checks" 2017-06-10 02:41:15 +00:00
Jenkins
63b2cd69c2 Merge "Provide fallback for disabled port security extension" 2017-06-10 01:19:07 +00:00
Jenkins
38d9350e8a Merge "Add missing unit test for segment db" 2017-06-10 01:04:49 +00:00
Jenkins
136bf83c07 Merge "Integration of IPAllocationPool" 2017-06-10 01:04:33 +00:00
Jenkins
08e22c6ff5 Merge "Don't iterate updated_rule_sg_ids or updated_sg_members" 2017-06-10 00:12:55 +00:00
Armando Migliaccio
48dbb65e8b Warn the admin of a potential OVS firewall_driver misconfiguration
OVS trunks work only with OVS firewall to implement security
groups. If a trunk request is indeed processed by an OVS agent
whose firewall_driver = iptables_hybrid, we should at least
log a warning to alert the admin.

Closes-bug: #1669074

Change-Id: I60e77e60e5e6d46ceff4bff61cbc07b6534ef152
2017-06-09 22:38:30 +00:00
Victor Morales
daf540781e Integration of IPAllocationPool
This patch integrates the Oslo-Versioned Object created for
IPAllocationPool model class.

Change-Id: Ifca5be29d322f1e85c45ca77371df37c9bf5b27f
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
2017-06-09 18:13:28 +00:00
Jenkins
0297bde80f Merge "objects: exclude revision_number from updatable fields" 2017-06-09 08:32:17 +00:00
Jenkins
aa96ee2311 Merge "Fix incorrect comments in ip availability test" 2017-06-09 03:12:39 +00:00
Daniel Russell
ed27436c06 Checks if net_dns is None and returns so that we don't attempt to load
None objects

Change-Id: I2542fa2a77fc7d0689018564b9e83174b968e5fc
Closes-Bug: #1696889
2017-06-09 11:50:15 +10:00
Kevin Benton
e51ae07aec Don't iterate updated_rule_sg_ids or updated_sg_members
updated_rule_sg_ids and updated_sg_members can be updated
concurrently by an RPC security_group_updated cast from the
server which will result in a RuntimeError due to set
size changing during iteration.

This adjusts the logic to just iterate over a copy of the set.

Change-Id: I0a7cf13157de256403cfd6196f64fafdfa65f180
Closes-Bug: #1696874
2017-06-08 16:16:58 -07:00
Ihar Hrachyshka
96a821c48b tests: use devstack-gate to deploy dstat for functional/fullstack
This should help with a gate failure where IPV4_ADDRS_SAFE_TO_USE would
not be honoured by devstack, rendering a job failed on a particular
cloud (like citycloud), like:

'Could not determine host ip address. See local.conf for suggestions on
setting HOST_IP.'

Closes-Bug: #1693689
Change-Id: Iee7cc4c129e6e9eab91107fda92f66c5379d6f95
2017-06-08 18:42:53 +00:00
Ihar Hrachyshka
a99897ffb3 Use rootwrap for fullstack test runner
We plan to switch to devstack-gate for fullstack job, and it revokes
direct sudo calls before executing tests, so we can't rely on sudo
working anymore.

This also moves functional-testing.filters to a more generic filename
(testing.filters) because the filters are now deployed and used by
fullstack target too.

Related-Bug: #1557168
Related-Bug: #1693689

Change-Id: I1718ea51836adbb8ef8dea79822a722dcf111127
2017-06-08 18:42:47 +00:00
Ihar Hrachyshka
9b809fcc60 objects: exclude revision_number from updatable fields
Revision service plugin is the entity that updates the database model
attribute, and we don't allow to modify the attribute on API layer. We
should not allow to explicitly update it on OVO layer either.

This can help with spurious unit test failures that sometimes try to
update revision number and then reuse the same number to fetch the
object. If revision service plugin decides to bump the number during the
test case execution once more, using the old number may yield no
results.

Change-Id: I4666c672223ac38508738b739207f754847c62bc
Closes-Bug: #1694753
2017-06-08 18:42:10 +00:00
Jenkins
b6bd475629 Merge "api-tests: Common way to define required extensions" 2017-06-08 18:31:59 +00:00
Ihar Hrachyshka
6ad51779f3 Revert "Use vif_type='tap' for LinuxBridge for consistency"
This reverts commit 1b987be2b55558dcc276fcfc8af6e39f8b6bac16.

This probably triggered a race between nova and l2 agent when
hot-detaching VIFs.

Change-Id: I2fc20666d43942446878da358ccf4472e04ad94c
Related-Bug: #1696125
2017-06-08 11:27:59 -07:00
Rodolfo Alonso Hernandez
48398e5347 Change allowed directions for QoS min-bw rule in SR-IOV
Changed allowed directions for QoS minimum bandwidth rule in
SR-IOV driver to only "egress". Currently this is the only
supported direction for this rule in this backend.

Closes-Bug: #1696679
Change-Id: Ia56146143e902663e9a47231773956ab2f035c8e
2017-06-08 14:36:36 +01:00
Akihiro Motoki
17ed89cbc1 Update pylint disable list to pass pylint 1.7.1 checks
Recenly pylint version was bumped to 1.7.1 in global-requirements.txt.
Pylint 1.7.1 adds more checks and breaks the neutron pep8 job.

This commit adds new checks to the disabled list to avoid the gate
breakage. Individual disabled tests can be fixed later.

The new disabled list is compatible with pylint 1.4.5,
so we can merge this regardless of pylint bump is reverted or not.

Closes-Bug: #1696403
Change-Id: If6228d0626413049b82f9d75bcdf3bea7ddacde5
2017-06-08 09:49:46 +00:00
OpenStack Proposal Bot
8d9fcb2d30 Updated from global requirements
Change-Id: Ie8979725f50c7d6fd8d1101bc344c7b46bfe029b
2017-06-08 06:03:54 +00:00
Dongcan Ye
5540f2547d Fix incorrect comments in ip availability test
TrivialFix

Change-Id: I88b3862572c09e63242b3751d5d0263ead15715c
2017-06-08 09:16:22 +08:00
Sean McCully
0ef8e2c168 neutron-rpc-server fails with no plugins loaded
Neutron RPC Server fails with exception
"object has no attribute 'rpc_workers_supported'".

Change-Id: I0997789bb61635ed36e4b95f03fc7d396511e19f
Closes-Bug: #1687896
2017-06-06 20:31:42 -04:00
Matt Riedemann
1e98b0a83e Add libssl packages to bindep
The pep8 images in infra no longer have ssl installed by
default so we have to specify them in bindep.

Change-Id: Icbdb5d442935438f01031f745157a8b39cd672a4
2017-06-06 19:19:38 -04:00
Jenkins
864ca822fe Merge "Extend QoS L2 drivers interface to handle ingress rule types" 2017-06-06 22:11:18 +00:00
Boden R
4ec751a800 remove unused reraise_as_retryrequest
The reraise_as_retryrequest decorator is already defined in
neutron_lib.db.utils and is no longer used in neutron [1].
This patch removes the dead code from neutron.

[1] http://codesearch.openstack.org/?q=reraise_as_retryrequest

Change-Id: Ie453dea132bc8b7f195b68c22a7ec150765102b2
2017-06-06 14:03:51 -06:00
Vu Cong Tuan
30b6a6378c Fix html_last_updated_fmt for Python3
html_last_updated_fmt option is interpreted as a
byte string in python3, causing Sphinx build to break.
This patch makes it utf-8 string.

Changing Popen to .check_output because of 3 reasons:
1. check_output() will raise CalledProcessError if
the called process returns a non-zero return code.
2. For consistency with keystone [1] and cinder [2]
3. It makes the code look much better.

[1] https://review.openstack.org/#/c/457142/
[2] https://review.openstack.org/#/c/433081

Change-Id: Ifeff184b71a83b78de751dfd0c2f43a33cd409ee
2017-06-06 09:53:12 +07:00
Boden R
fde6710515 use MechanismDriver from neutron-lib + shim
The ml2 MechanismDriver is now in neutron-lib along with its associated
constants. This patch switches over to the lib versions of those, but
leaves a shim of the MechanismDriver that just ref's the driver from
lib. This shim allows our broad consumer base of the driver to switch
over at their leisure.

NeutronLibImpact

Change-Id: I99e3de6d933a1bb341394f85415fb07306a82a01
2017-06-05 14:09:07 -06:00