]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agoMerge "Removed spurious check for ip version"
Jenkins [Tue, 6 Jan 2015 13:52:49 +0000 (13:52 +0000)]
Merge "Removed spurious check for ip version"

9 years agoMerge "Enable the "not-callable" pylint check"
Jenkins [Tue, 6 Jan 2015 13:20:15 +0000 (13:20 +0000)]
Merge "Enable the "not-callable" pylint check"

9 years agoMerge "Add help text for 'host' parameter in neutron.conf file"
Jenkins [Tue, 6 Jan 2015 11:38:41 +0000 (11:38 +0000)]
Merge "Add help text for 'host' parameter in neutron.conf file"

9 years agoMerge "Tweak gate hooks scripts to handle both functional and api jobs"
Jenkins [Tue, 6 Jan 2015 07:48:49 +0000 (07:48 +0000)]
Merge "Tweak gate hooks scripts to handle both functional and api jobs"

9 years agoMerge "Stale VXLAN & GRE tunnel endpoint deletion from DB"
Jenkins [Tue, 6 Jan 2015 05:43:57 +0000 (05:43 +0000)]
Merge "Stale VXLAN & GRE tunnel endpoint deletion from DB"

9 years agoTweak gate hooks scripts to handle both functional and api jobs
armando-migliaccio [Wed, 17 Dec 2014 22:33:42 +0000 (14:33 -0800)]
Tweak gate hooks scripts to handle both functional and api jobs

With this change both the API and Functional job will benefit
from the use of gate hooks. This is especially useful to make
the API job emit the test results the same way other jobs do.

NOTE: Changes are applied to both contrib directories under
neutron/tests and neutron/tests/functional; these two directories
are supposed to be in sync until change [1] merges, after which
we can drop neutron/tests/functional/contrib, in favor of
neutron/tests/contrib. This was done because of the symlink issue
caused by [2].

[1] https://review.openstack.org/#/c/142603/
[2] https://review.openstack.org/#/c/143152/

Change-Id: I0b823b17d6317e9409fd9b5872c5f4674c1b6824

9 years agoMerge "Do not run neutron-ns-metadata-proxy as root on L3 agent"
Jenkins [Mon, 5 Jan 2015 21:27:53 +0000 (21:27 +0000)]
Merge "Do not run neutron-ns-metadata-proxy as root on L3 agent"

9 years agoAdd help text for 'host' parameter in neutron.conf file
Numan Siddique [Sun, 28 Dec 2014 12:03:57 +0000 (17:33 +0530)]
Add help text for 'host' parameter in neutron.conf file

This patch adds the help text for 'host' parameter in
neutron.conf which is presently missing and updates
the neutron/common/config.py accordingly

Change-Id: Iddfc9c44b3fae95cbae1cfe1142c3d3a92749799
Closes-bug: #1406052

9 years agoRemoved spurious check for ip version
Ihar Hrachyshka [Tue, 16 Dec 2014 15:23:40 +0000 (16:23 +0100)]
Removed spurious check for ip version

We may assume that _add_ingress_ra_rule() receives only RA (=IPv6)
ports, so no need to check IP version one more time.

The corresponding IP version filter is already applied in
_select_ra_ips_for_network_ids().

Change-Id: Ibde56a2eb32eed468defdd02a44cc3360ce82e53

9 years agoEnsure test_metaplugin handles random hashseeds
Sam Betts [Mon, 20 Oct 2014 12:26:33 +0000 (13:26 +0100)]
Ensure test_metaplugin handles random hashseeds

2 tests fail in test_metaplugin when using hashseed 2701526934 this is
down to the nature of using dictionaries and sets in Python having
unpredictable ordering when retrieving data stored in them. This patch
ensures that no matter the order fake1 and fake2 get placed into
self.plugins that the test can assert both possible scenarios.

Change-Id: I65fa6979cc0d6e3531e50f249c53db6be83a6cfe
Partial-Bug: 1348818

9 years agoIgnore non-existent ports during OVS intf list
Kevin Benton [Sun, 4 Jan 2015 09:47:01 +0000 (01:47 -0800)]
Ignore non-existent ports during OVS intf list

A recent commit[1] to pass the list of port names directly to
ovs-vsctl during a list operation introduced a new possible
failure condition where one of the names might refer to a port
which no longer exists. By default this causes ovs-vsctl to quit
in a fit of rage[2].

Previously, all interfaces were retrieved and the ones that were a
subset of the name list were processed. The name list could contain
extra non-existent names (e.g. recently deleted interfaces).

This patch just passes the '--if-exists' flag to the 'list Interface'
command to match the same previous behavior.

1. 3f0bf6cfac2e151d5a4a7f076062b3365bdbf457
2. Example: Stderr: 'ovs-vsctl: no row "tap80664420-ea" in table Interface\n'

Closes-Bug: #1407190
Change-Id: I8f359981386d13fb455281a72b8bb245395c0909

9 years agoMerge "Add a constant for router interface device owners"
Jenkins [Wed, 31 Dec 2014 16:23:18 +0000 (16:23 +0000)]
Merge "Add a constant for router interface device owners"

9 years agoMerge "ovs_dvr: Use lazy logging interpolation"
Jenkins [Wed, 31 Dec 2014 05:39:23 +0000 (05:39 +0000)]
Merge "ovs_dvr: Use lazy logging interpolation"

9 years agoMerge "Cisco: logging incorrectly called with (fmt, arg) tuple"
Jenkins [Wed, 31 Dec 2014 05:23:48 +0000 (05:23 +0000)]
Merge "Cisco: logging incorrectly called with (fmt, arg) tuple"

9 years agoMerge "csr1kv_hd_driver: Improve exception handling"
Jenkins [Wed, 31 Dec 2014 04:37:12 +0000 (04:37 +0000)]
Merge "csr1kv_hd_driver: Improve exception handling"

9 years agoEnable the "not-callable" pylint check
Angus Lees [Tue, 23 Dec 2014 00:13:27 +0000 (11:13 +1100)]
Enable the "not-callable" pylint check

This check catches attempts to call variables that pylint believes are
not functions.  A trivial example would be:

    # Trivial example caught by this check:
    foo = dict()
    print foo('bar')  # <- oops, meant foo['bar']

This change enables the "not-callable" pylint check, after disabling a
few cases where the alert triggers but the usage was intended (defining
decorators).

Change-Id: I09ad929902509018fe7183a15b784601c36b6196
Related-Bug: #1356224

9 years agoovs_dvr: Use lazy logging interpolation
Angus Lees [Mon, 22 Dec 2014 04:41:28 +0000 (15:41 +1100)]
ovs_dvr: Use lazy logging interpolation

There are a small number of examples of "eager" interpolation in
neutron:
  logging.debug("foo %s" % arg)

These should be converted to perform the interpolation lazily within
the logging function, since if the severity is below the logging level
then the interpolation can be skipped entirely.

This change addresses all such examples found in ovs agent via a pylint
test.  Other occurrences are addressed elsewhere.

Change-Id: Ie215f33818cc5c16e570ace4c750df5371d27e09
Partial-Bug: #1404788

9 years agoAdd a constant for router interface device owners
Maru Newby [Tue, 28 Oct 2014 19:50:31 +0000 (19:50 +0000)]
Add a constant for router interface device owners

In the absense of a port object that includes a check for whether a
given port is implementing a router interface, this change adds the
ROUTER_INTERFACE_OWNERS tuple containing the relevant DEVICE_OWNER_*
constants.

This change was suggested by https://review.openstack.org/#/c/129865/

Change-Id: I1c45c29617d692cc05b44f7f2c4ec1e5252be303

9 years agoMerge "Do not count dvr agents while creating HA ports"
Jenkins [Wed, 31 Dec 2014 00:44:43 +0000 (00:44 +0000)]
Merge "Do not count dvr agents while creating HA ports"

9 years agoMerge "Add support for flat networks in SRIOV Mechanism Driver"
Jenkins [Wed, 31 Dec 2014 00:44:29 +0000 (00:44 +0000)]
Merge "Add support for flat networks in SRIOV Mechanism Driver"

9 years agoMerge "Retry on unassigned ofport instead of treating it as a failure"
Jenkins [Tue, 30 Dec 2014 23:45:50 +0000 (23:45 +0000)]
Merge "Retry on unassigned ofport instead of treating it as a failure"

9 years agoStale VXLAN & GRE tunnel endpoint deletion from DB
Romil Gupta [Fri, 12 Sep 2014 06:26:57 +0000 (23:26 -0700)]
Stale VXLAN & GRE tunnel endpoint deletion from DB

Description:
Stale GRE and VXLAN tunnel endpoints persists in neutron db this should be
deleted from the database. Also, if local_ip of L2 agent changes the
stale tunnel ports and flows persists on br-tun on other Compute Nodes and
Network Nodes for that remote ip this should also be removed.

Implementation

Plugin changes:
Added host column in 'ml2_vxlan_endpoints' and 'ml2_gre_endpoints' table.
Added delete_endpoint method for deleting the stale endpoints from db.
Modified tunnel_sync() method to accommodate these changes.
Modified testcases in test_type_vxlan.py
Modified testcases in test_type_gre.py

Agent changes:
Added tunnel_delete rpc for removing stale ports and flows from br-tun.
tunnel_sync rpc signature upgrade to obtain 'host'.
Added testcases for TunnelRpcCallbackMixin().

This patch-set only deals with plugin side changes.

Partial-Bug: #1179223

Change-Id: I75c6581fcc9f47a68bde29cbefcaa1a2a082344e

9 years agoMerge "Eventlet green threads not released back to pool"
Jenkins [Tue, 30 Dec 2014 08:28:47 +0000 (08:28 +0000)]
Merge "Eventlet green threads not released back to pool"

9 years agoAdd support for flat networks in SRIOV Mechanism Driver
Irena Berezovsky [Thu, 18 Dec 2014 04:34:59 +0000 (06:34 +0200)]
Add support for flat networks in SRIOV Mechanism Driver

Allow flat network segment to be bound by SRIOV Mechanism Driver.
Populate vif_details with vlan_id = 0 to support flat networking
(according to man page of ip command).

Change-Id: Ibbe2db51ed370f416e81d90d203049e7c39eff5b
Closes-Bug: 1403626

9 years agoMerge "Option for root_helper when checking namespace"
Jenkins [Tue, 30 Dec 2014 05:41:20 +0000 (05:41 +0000)]
Merge "Option for root_helper when checking namespace"

9 years agoMerge "Set type=internal as part of port creation"
Jenkins [Tue, 30 Dec 2014 03:52:15 +0000 (03:52 +0000)]
Merge "Set type=internal as part of port creation"

9 years agoMerge "Allow setting a tenant router's external IP"
Jenkins [Tue, 30 Dec 2014 00:07:14 +0000 (00:07 +0000)]
Merge "Allow setting a tenant router's external IP"

9 years agoMerge "brocade: Use lazy logging interpolation"
Jenkins [Mon, 29 Dec 2014 22:37:32 +0000 (22:37 +0000)]
Merge "brocade: Use lazy logging interpolation"

9 years agoMerge "linuxbridge: Use lazy logging interpolation"
Jenkins [Mon, 29 Dec 2014 22:37:19 +0000 (22:37 +0000)]
Merge "linuxbridge: Use lazy logging interpolation"

9 years agoRetry on unassigned ofport instead of treating it as a failure
Terry Wilson [Fri, 11 Jul 2014 23:55:30 +0000 (17:55 -0600)]
Retry on unassigned ofport instead of treating it as a failure

Open vSwitch will return '[]' when querying an interface's ofport
when the ofport has not yet been assigned. This doesn't signal a
failure, but the get_port_ofport code was treating it as such.
This patch uses a decorator from python-retrying which has been
added as a dependency of oslo_concurrency and therefore packaged
everywhere. The call to fetch the ofport is retried until the
vsctl_timeout is reached and, on failure, INVALID_OFPORT is
returned.

The add_port function will attempt to delete the port if
INVALID_OFPORT is returned from get_port_ofport. add_port is also
extended to take optional Interface options so that the
add_tunnel_port and add_patch_port functions can reuse it instead
of just duplicating its functionality.

Closes-Bug: #1341020
Change-Id: Ifc52d8589c7aafd360893cb9c1cdcbf43b04ee2c

9 years agoMerge "VMware: fix security group check on port create"
Jenkins [Mon, 29 Dec 2014 20:08:11 +0000 (20:08 +0000)]
Merge "VMware: fix security group check on port create"

9 years agoMerge "Allow to specify IP address of floating ip"
Jenkins [Mon, 29 Dec 2014 17:11:03 +0000 (17:11 +0000)]
Merge "Allow to specify IP address of floating ip"

9 years agoMerge "Enable pylint checks for "anomalous" string escapes"
Jenkins [Mon, 29 Dec 2014 16:52:17 +0000 (16:52 +0000)]
Merge "Enable pylint checks for "anomalous" string escapes"

9 years agoVMware: fix security group check on port create
Salvatore [Wed, 24 Dec 2014 00:17:17 +0000 (01:17 +0100)]
VMware: fix security group check on port create

The code did not consider an empty list among the cases
in which security groups are not supplied on port create.

Change-Id: I325cce2165d2ec683ecac3cabdbfb80a03b288c9
Closes-Bug: #1405311

9 years agoMerge "Don't unnecessarily loop through all ports/interfaces"
Jenkins [Mon, 29 Dec 2014 09:25:44 +0000 (09:25 +0000)]
Merge "Don't unnecessarily loop through all ports/interfaces"

9 years agoMerge "embrane: Use lazy logging interpolation"
Jenkins [Mon, 29 Dec 2014 04:13:50 +0000 (04:13 +0000)]
Merge "embrane: Use lazy logging interpolation"

9 years agoMerge "bigswitch: Use lazy logging interpolation"
Jenkins [Mon, 29 Dec 2014 03:15:22 +0000 (03:15 +0000)]
Merge "bigswitch: Use lazy logging interpolation"

9 years agoMerge "Tighten dnsmasq version regex"
Jenkins [Mon, 29 Dec 2014 03:14:55 +0000 (03:14 +0000)]
Merge "Tighten dnsmasq version regex"

9 years agoMerge "Correct invalid indentation in is_dvr_serviced"
Jenkins [Mon, 29 Dec 2014 01:58:42 +0000 (01:58 +0000)]
Merge "Correct invalid indentation in is_dvr_serviced"

9 years agoMerge "Remove unnecessary regex grouping"
Jenkins [Mon, 29 Dec 2014 01:48:37 +0000 (01:48 +0000)]
Merge "Remove unnecessary regex grouping"

9 years agoMerge "Combine author_tag and log_translation_hint regexes"
Jenkins [Sun, 28 Dec 2014 21:54:50 +0000 (21:54 +0000)]
Merge "Combine author_tag and log_translation_hint regexes"

9 years agoEventlet green threads not released back to pool
abhishekkekane [Tue, 21 Oct 2014 11:15:15 +0000 (04:15 -0700)]
Eventlet green threads not released back to pool

Presently, the wsgi server allows persist connections. Hence even after
the response is sent to the client, it doesn't close the client socket
connection. Because of this problem, the green thread is not released
back to the pool.

In order to close the client socket connection explicitly after the
response is sent and read successfully by the client, you simply have to
set keepalive to False when you create a wsgi server.

Added a parameter to take advantage of the new(ish) eventlet socket timeout
behaviour. Allows closing idle client connections after a period of time, eg:

$ time nc localhost 8776
real    1m0.063s

Setting 'client_socket_timeout = 0' means do not timeout.

DocImpact:
Added wsgi_keep_alive option (default=True).
Added client_socket_timeout option (default=900).

SecurityImpact

Closes-Bug: #1361360
Change-Id: I3a361d6590d1800b85791f23ac1cdfd79815341b

9 years agoDon't unnecessarily loop through all ports/interfaces
Terry Wilson [Sat, 20 Dec 2014 02:01:36 +0000 (19:01 -0700)]
Don't unnecessarily loop through all ports/interfaces

The ovs-vsctl 'list' command can take a list of records as an
argument, so there is no need to manually loop through all records
discarding the ones with names that don't match the bridge's
port name list.

Also, since the data is returned as json, the ofport returned isn't
a string, so we don't have to convert it to int for testing.

Closes-Bug: #1404935
Change-Id: Ica20f8f8315196aa5a04657d28dde41a75f0368d

9 years agoMerge "Use lazy logging interpolation"
Jenkins [Fri, 26 Dec 2014 20:41:17 +0000 (20:41 +0000)]
Merge "Use lazy logging interpolation"

9 years agoSet type=internal as part of port creation
Terry Wilson [Fri, 26 Dec 2014 20:06:20 +0000 (13:06 -0700)]
Set type=internal as part of port creation

When creating an internal device with ovs-vsctl, the 'set'
operation must occur as part of the transaction that creates the
port, otherwise the device creation will fail and an ofport will
not be assigned.

Change-Id: I30ecb920ee1c64d25b5e7eed69e92bd71caac435

9 years agoAllow to specify IP address of floating ip
fujioka yuuichi [Fri, 31 Jan 2014 01:54:34 +0000 (10:54 +0900)]
Allow to specify IP address of floating ip

IP address of floating ip will be automatically allocated.
There are cases where users need to specify a floating IP address.
This patch addresses the problem.

The feature is limited by "create_floatingip:floating_ip_address" in
"policy.json".
By default, it needs an admin role.

DocImpact
APIImpact

Implements: blueprint allow-specific-floating-ip-address

Change-Id: Iba64a0f0a38ca5eb39c605e121a12c956637b96c

9 years agoDo not count dvr agents while creating HA ports
Numan Siddique [Mon, 1 Dec 2014 13:19:30 +0000 (18:49 +0530)]
Do not count dvr agents while creating HA ports

Presently dvr agents are not excluded when a
ha router interface is created, because of which
an interface is created even in the dvr agent namespace.

This patch fixes the issue by supporting a filter - 'agent_modes'
in the function L3AgentSchedulerDbMixin.get_l3_agents.
If this filter is defined, only the l3 agents whose modes
defined in this filter are returned

Change-Id: I9383e2a30ddc4f2c3e04ff0821726b8dc3ec89a0
Closes-bug: #1397209

9 years agoMerge "Remove useless parameter from l3_dvr_db.py"
Jenkins [Thu, 25 Dec 2014 03:47:08 +0000 (03:47 +0000)]
Merge "Remove useless parameter from l3_dvr_db.py"

9 years agocsr1kv_hd_driver: Improve exception handling
AKamyshnikova [Fri, 19 Dec 2014 10:24:11 +0000 (13:24 +0300)]
csr1kv_hd_driver: Improve exception handling

When logging exceptions the exception handling should make use
of save_and_reraise.

Partial-bug: #1305032

Change-Id: I316417f3c9cbb28ea0cf2cd24a1f5b2b803b5a95

9 years agoMerge "Clean-up sanity checks done via shell scripts"
Jenkins [Wed, 24 Dec 2014 08:01:36 +0000 (08:01 +0000)]
Merge "Clean-up sanity checks done via shell scripts"

9 years agoRemove useless parameter from l3_dvr_db.py
yangxurong [Fri, 19 Dec 2014 08:33:42 +0000 (16:33 +0800)]
Remove useless parameter from l3_dvr_db.py

clear_unused_fip_agent_gw_port and check_fips_availability_on_host
functions in l3_dvr_db.py contain a useless parameter fip_id which
can be removed.

Change-Id: Ibc14f9d9cd4b35a5f3b8d1a733d2ef40743e8077

9 years agoMerge "Add validation for the dvr router l3agent binding"
Jenkins [Wed, 24 Dec 2014 01:55:19 +0000 (01:55 +0000)]
Merge "Add validation for the dvr router l3agent binding"

9 years agoClean-up sanity checks done via shell scripts
armando-migliaccio [Mon, 22 Dec 2014 21:02:14 +0000 (13:02 -0800)]
Clean-up sanity checks done via shell scripts

Move the various checks done via shell into a single file;
this is cleaner and we'll have a lot more space to explain
what is going on.

Related-bug: #1404605

Change-Id: Ibb451c6a25217f37b73983c30891f55b35f143cd

9 years agoDo not run neutron-ns-metadata-proxy as root on L3 agent
Cedric Brandily [Mon, 24 Nov 2014 15:53:04 +0000 (15:53 +0000)]
Do not run neutron-ns-metadata-proxy as root on L3 agent

Currently neutron-ns-metadata-proxy runs with root permissions when
namespaces are enabled on the l3 agent because root permissions are
required to "enter" in the namespace. But neutron-ns-metadata-proxy
permissions should be reduced as much as possible because it is
reachable from vms.

This change allows to change neutron-ns-metadata-proxy permissions
after its startup through the 2 new options metadata_proxy_user and
metadata_proxy_group which allow to define user/group running metadata
proxy after its initialization. Their default values are
neutron-l3-agent effective user and group.

Permissions drop is done after metadata proxy daemon writes its
pid in its pidfile (it could be disallowed after permissions drop).

Using nobody as metadata_proxy_user/group (more secure) is currently
not supported because:

* nobody has not the permission to connect the metadata socket,
* nobody has not the permission to log to file because neutron uses
  WatchedFileHandler (which requires read/write permissions after
  permissions drop).
This limitation will be addressed in a daughter change.

DocImpact
Partial-Bug: #1187107
Change-Id: I55c8c3fb14ed91ae8570f98f19c2cdbaf89d42fc

9 years agoCorrect invalid indentation in is_dvr_serviced
Cedric Brandily [Tue, 23 Dec 2014 22:31:12 +0000 (23:31 +0100)]
Correct invalid indentation in is_dvr_serviced

This change corrects indentation in is_dvr_serviced defined in
neutron.common.utils modul.

Change-Id: Ie0e7885ccf6e9101c6ad638b410bf17e359c5a0a

9 years agoMerge "Fixes spelling error"
Jenkins [Tue, 23 Dec 2014 21:46:52 +0000 (21:46 +0000)]
Merge "Fixes spelling error"

9 years agoMerge "get_binary_name should returns strings without spaces"
Jenkins [Tue, 23 Dec 2014 21:43:30 +0000 (21:43 +0000)]
Merge "get_binary_name should returns strings without spaces"

9 years agoAdd validation for the dvr router l3agent binding
Swaminathan Vasudevan [Tue, 2 Sep 2014 16:48:54 +0000 (09:48 -0700)]
Add validation for the dvr router l3agent binding

Validates dvr router add/remove cases to the
l3agents running in different dvr modes such
as "dvr_snat" and "dvr" mode.

In the case of distributed virtual routers it
does not make sense to move distributed routers
from one "dvr" node to another "dvr" node.

Also added some unit tests that addresses the
validation of legacy routers to dvr agent and
dvr routers to legacy agent.

Partial-Bug: #1369721

Change-Id: I008dda6abaf25094b11f3730b951e096dd3b7025

9 years agoFixes spelling error
Mike King [Fri, 19 Dec 2014 18:03:06 +0000 (11:03 -0700)]
Fixes spelling error

Closes-Bug: #1404341

Change-Id: I1e0209ab293494942efab12baabd4858df40e3aa

9 years agoMerge "validate L3 HA min/max _l3_agents_per_router"
Jenkins [Tue, 23 Dec 2014 19:18:27 +0000 (19:18 +0000)]
Merge "validate L3 HA min/max _l3_agents_per_router"

9 years agoget_binary_name should returns strings without spaces
Cedric Brandily [Fri, 19 Dec 2014 14:05:53 +0000 (15:05 +0100)]
get_binary_name should returns strings without spaces

Iptables does not support chain names with spaces. It implies
get_binary_name should return strings without spaces (they are used as
chain name prefix). But currently 'python -m unittest $module' implies
spaces in get_binary_name() result, it disallows to use it when $module
is a functional test module. This change replaces spaces with
underscores in get_binary_name results.

Change-Id: Ie7c8518b92be46a4eea4e9345713fdeba844126d
Closes-Bug: #1404250

9 years agoMerge "ML2 UT: Fix incorrect mock return value"
Jenkins [Tue, 23 Dec 2014 17:44:10 +0000 (17:44 +0000)]
Merge "ML2 UT: Fix incorrect mock return value"

9 years agovalidate L3 HA min/max _l3_agents_per_router
venkata anil [Tue, 9 Dec 2014 14:11:49 +0000 (14:11 +0000)]
validate L3 HA min/max _l3_agents_per_router

The below missing validation is added for L3 HA
max_l3_agents_per_router >= min_l3_agents_per_router

Closes-bug: #1400311
Change-Id: I1d548b9a0a04c8855ada42206c2a333597c2c85b

9 years agoMerge "ml2: remove superfluous %s in LOG.debug() format"
Jenkins [Tue, 23 Dec 2014 10:53:55 +0000 (10:53 +0000)]
Merge "ml2: remove superfluous %s in LOG.debug() format"

9 years agoMerge "Prevent symlinks to be added to the tree"
Jenkins [Tue, 23 Dec 2014 06:08:08 +0000 (06:08 +0000)]
Merge "Prevent symlinks to be added to the tree"

9 years agoEnable pylint checks for "anomalous" string escapes
Angus Lees [Wed, 22 Oct 2014 10:20:23 +0000 (21:20 +1100)]
Enable pylint checks for "anomalous" string escapes

Escapes in python string literals are well defined, but can be
confusing.  These pylint checks look for backslash escapes in strings
that might be mistakes.  Two code refactors were required to satisfy
these tests:

1. midonet_lib.py used \**kwargs in docstrings.

There doesn't seem to be a sphinx standard for kwargs, so this change
simply replaces them with "kwargs".

2. Regex literals containing escapes replaced with r''.

The assumption with this change (and the underlying pylint
check) is that r'' literals are more straightforward for regular
expressions, where every backslash is important.

While looking at these regexes, this change also removes a few
unnecessary "\-" escapes.

Change-Id: I01528b2482f78b9e851685ebbf6fded4e58355f1

9 years agoTighten dnsmasq version regex
Angus Lees [Fri, 28 Nov 2014 01:23:47 +0000 (12:23 +1100)]
Tighten dnsmasq version regex

The previous regex forgot to escape the '.', resulting a more liberal
match than intended.  Luckily it continued to work, since the dnsmasq
version is the first number that appears in the --version output.

This change improves the regex to correctly escape the '.' (as
presumably originally intended) and to look for the prefix "version ".

Change-Id: I12548a7b2c21262aa54c84be4e31bda15eab8d52

9 years agoRemove unnecessary regex grouping
Angus Lees [Fri, 28 Nov 2014 01:18:49 +0000 (12:18 +1100)]
Remove unnecessary regex grouping

Several regexes in this class used had unnecessary (\s+) grouping.  This
change makes the regexes slightly cheaper by removing the need for the
regex engine to remember the whitespace that was matched.

Change-Id: I9381c213efe093dc472b0c7e9d7b303a0c7cb13b

9 years agoCombine author_tag and log_translation_hint regexes
Angus Lees [Fri, 28 Nov 2014 01:15:15 +0000 (12:15 +1100)]
Combine author_tag and log_translation_hint regexes

author_tag_re and log_translation_hints were lists of regexes, where
each member was then separately matched against each input line.

This change combines each of these lists into an a|b regex and removes
the unnecessary loop.

Change-Id: I8db76862d3f7ef030e31e2e1e6f2fcd8dbd00888

9 years agoMerge "PLUMgrid plugin: Fix for delete subnet with admin context"
Jenkins [Mon, 22 Dec 2014 16:57:00 +0000 (16:57 +0000)]
Merge "PLUMgrid plugin: Fix for delete subnet with admin context"

9 years agoML2 UT: Fix incorrect mock return value
Robert Pothier [Mon, 22 Dec 2014 16:42:35 +0000 (11:42 -0500)]
ML2 UT: Fix incorrect mock return value

In the UT for ML2 Cisco Nexus MD,
in the function test_ncclient_version_detect()
The value being passed into the mock is incorrect
to mock the ncclient connect object.

Change-Id: Ife1fc2a8f8fe284605ad77cee4ffa307e6d5360c
Closes-Bug: #1404927

9 years agoMerge "ipv6: set OtherConfig flag for DHCPv6 stateless subnets"
Jenkins [Mon, 22 Dec 2014 14:48:37 +0000 (14:48 +0000)]
Merge "ipv6: set OtherConfig flag for DHCPv6 stateless subnets"

9 years agoMerge "Update L3 agent drivers singletons to look at new agent"
Jenkins [Mon, 22 Dec 2014 10:57:31 +0000 (10:57 +0000)]
Merge "Update L3 agent drivers singletons to look at new agent"

9 years agoipv6: set OtherConfig flag for DHCPv6 stateless subnets
Ihar Hrachyshka [Thu, 27 Nov 2014 14:43:48 +0000 (15:43 +0100)]
ipv6: set OtherConfig flag for DHCPv6 stateless subnets

In case of DHCPv6 stateless subnets, we should inform DHCP clients about
other configuration values available from DHCP server. This is done by
setting O (other) flag in RAs, which is controlled by AdvOtherConfigFlag
setting in radvd case.

Since radvd configuration file becomes quite complex, migrated its
generation to Jinja2.

Added a basic unit test that checks that flag is set for stateless mode
and not SLAAC. For stateful, it doesn't really matter whether other flag
is set, so no need to expect any value of it.

No more unit tests seem to be needed: conditional prefix generation is
already covered in test_l3_agent, and other statements are common for
all ipv6_ra_modes.

Change-Id: I1ddad3e1f5efce2b6da4ec00b9294e08fe1e85dd
Closes-Bug: #1397022

9 years agoMerge "Fix typo'd format parameter in midonet_lib.py"
Jenkins [Mon, 22 Dec 2014 09:59:37 +0000 (09:59 +0000)]
Merge "Fix typo'd format parameter in midonet_lib.py"

9 years agoPLUMgrid plugin: Fix for delete subnet with admin context
Fawad Khaliq [Sun, 21 Dec 2014 20:57:27 +0000 (12:57 -0800)]
PLUMgrid plugin: Fix for delete subnet with admin context

When delete call using admin for a subnet created from a
non-admin project is made, the tenant_id passed to backend
happened to be of admin project. This commit fixes the issues
by getting the correct tenant_id.

Closes-Bug: 1404688
Change-Id: Id21c38610ed73defb937d971a7aade57713541c0

9 years agobrocade: Use lazy logging interpolation
Angus Lees [Mon, 22 Dec 2014 04:41:01 +0000 (15:41 +1100)]
brocade: Use lazy logging interpolation

There are a small number of examples of "eager" interpolation in
neutron:
  logging.debug("foo %s" % arg)

These should be converted to perform the interpolation lazily within
the logging function, since if the severity is below the logging level
then the interpolation can be skipped entirely.

This change addresses all such examples found in brocade
l3_router_plugin via a pylint test.  Other occurrences are addressed
elsewhere.

Change-Id: Ia2d51e8ecbc7af81390577ec69c5ce18523b65f3
Partial-Bug: #1404788

9 years agolinuxbridge: Use lazy logging interpolation
Angus Lees [Mon, 22 Dec 2014 04:40:32 +0000 (15:40 +1100)]
linuxbridge: Use lazy logging interpolation

There are a small number of examples of "eager" interpolation in
neutron:
  logging.debug("foo %s" % arg)

These should be converted to perform the interpolation lazily within
the logging function, since if the severity is below the logging level
then the interpolation can be skipped entirely.

This change addresses all such examples found in linuxbridge agent via a
pylint test.  Other occurrences are addressed elsewhere.

Change-Id: I5cb3bbb401f5049760dfe5263a52bd43f23dcfd4
Partial-Bug: #1404788

9 years agoembrane: Use lazy logging interpolation
Angus Lees [Mon, 22 Dec 2014 04:40:03 +0000 (15:40 +1100)]
embrane: Use lazy logging interpolation

There are a small number of examples of "eager" interpolation in
neutron:
  logging.debug("foo %s" % arg)

These should be converted to perform the interpolation lazily within
the logging function, since if the severity is below the logging level
then the interpolation can be skipped entirely.

This change addresses all such examples found in embrane via a pylint
test.  Other occurrences are addressed elsewhere.

Change-Id: Iabceb8c7d32111ae97d1200fbd25681e317f7bb7
Partial-Bug: #1404788

9 years agobigswitch: Use lazy logging interpolation
Angus Lees [Mon, 22 Dec 2014 04:38:40 +0000 (15:38 +1100)]
bigswitch: Use lazy logging interpolation

There are a small number of examples of "eager" interpolation in
neutron:
  logging.debug("foo %s" % arg)

These should be converted to perform the interpolation lazily within
the logging function, since if the severity is below the logging level
then the interpolation can be skipped entirely.

This change addresses all such examples found in bigswitch via a pylint
test.  Other occurrences are addressed elsewhere.

Change-Id: I23fd4e7d0e4173e753a124d62a1563ce6ac674ca
Partial-Bug: #1404788

9 years agoUse lazy logging interpolation
Angus Lees [Mon, 22 Dec 2014 04:35:32 +0000 (15:35 +1100)]
Use lazy logging interpolation

There are a small number of examples of "eager" interpolation in
neutron:
  logging.debug("foo %s" % arg)

These should be converted to perform the interpolation lazily within
the logging function, since if the severity is below the logging level
then the interpolation can be skipped entirely.

This change addresses all such current examples found in neutron core
via a pylint test.  Vendor plugins and services are fixed elsewhere.

Change-Id: I823d8453cd76e4985cabd31ca6b939f43a80b36c
Partial-Bug: #1404788

9 years agoCisco: logging incorrectly called with (fmt, arg) tuple
Angus Lees [Mon, 22 Dec 2014 04:11:07 +0000 (15:11 +1100)]
Cisco: logging incorrectly called with (fmt, arg) tuple

cisco.db.n1kv_db_v2._validate_segment_range_uniqueness() includes these
lines:

   msg = (_("NetworkProfile name %s already exists"),
          net_p["name"])
   LOG.error(msg)
   raise n_exc.InvalidInput(error_message=msg)

As written, msg is a tuple, and the various logging lines below print
the tuple members without properly expanding the format string as
intended.

The format in msg should have been expanded using % - as was presumably
the intention.  This change fixes this and a similar example elsewhere
in this file.

Change-Id: I993245a18ff3db5d5700fb1298ffc958d5827736
Closes-Bug: #1404785

9 years agoml2: remove superfluous %s in LOG.debug() format
Angus Lees [Mon, 22 Dec 2014 03:52:42 +0000 (14:52 +1100)]
ml2: remove superfluous %s in LOG.debug() format

ml2.db.get_dynamic_segment() includes this line:

   LOG.debug("No dynamic segment %s found for "
     "Network:%(network_id)s, "
     "Physical network:%(physnet)s, "
     "segmentation_id:%(segmentation_id)s",
     {'network_id': network_id,
      'physnet': physical_network,
      'segmentation_id': segmentation_id})

Note the superfluous %s in the format string.  At run-time, %s prints
the args hash again and doesn't cause an error, but this is clearly
unintended.

Since there doesn't seem to be any value that was meant to be used
instead, this change simply removes the %s.

Change-Id: I414c7b4497f59927d8b6ec5f057dca19aa4ef122
Closes-Bug: #1404782

9 years agoFix typo'd format parameter in midonet_lib.py
Angus Lees [Sun, 21 Dec 2014 23:25:58 +0000 (10:25 +1100)]
Fix typo'd format parameter in midonet_lib.py

In add_static_nat(...):

        LOG.debug("MidoClient.add_static_nat called: "
                  "tenant_id=%(tenant_id)s, chain_name=%(chain_name)s, "
                  "from_ip=%(from_ip)s, to_ip=%(to_ip)s, "
                  "port_id=%(port_id)s, nat_type=%(nat_type)s",
                  {'tenant_id': tenant_id, 'chain_name': chain_name,
                   'from_ip': from_ip, 'to_ip': to_ip,
                   'portid': port_id, 'nat_type': nat_type})

Note port_id vs portid.  This line of code raises a KeyError if debug
logging is enabled.

(Found via pylint)

Change-Id: I4d76255a559489f2f0e074b4489cfa5f33f1dddf
Closes-Bug: #1404755

9 years agoUpdate L3 agent drivers singletons to look at new agent
Assaf Muller [Sun, 21 Dec 2014 14:15:12 +0000 (16:15 +0200)]
Update L3 agent drivers singletons to look at new agent

L3 agent drivers are singletons. They're created once, and hold
self.l3_agent. During testing, the agent is tossed away and
re-built, but the drivers singletons are pointing at the old
agent, and its old configuration.

Change-Id: Ie8a15318e71ea47cccad3b788751d914d51cbf18
Closes-Bug: #1404662

9 years agoMerge "Minor lbaasv2 things from the feature branch, needed in neutron"
Jenkins [Sun, 21 Dec 2014 05:27:17 +0000 (05:27 +0000)]
Merge "Minor lbaasv2 things from the feature branch, needed in neutron"

9 years agoPrevent symlinks to be added to the tree
armando-migliaccio [Sun, 21 Dec 2014 04:55:35 +0000 (20:55 -0800)]
Prevent symlinks to be added to the tree

Symlinks cannot be allowed because they are not supported by distutils.
Adding them results into package build failures.

This patch add a check that verifies that no symlinks can slip in.

Closes-bug: #1404605

Change-Id: I0d308127081bb2fa4ff7d7e0ed2f1b6e915163c9

9 years agoMerge "Scope dhcp rpc api using a messaging namespace"
Jenkins [Sat, 20 Dec 2014 23:07:27 +0000 (23:07 +0000)]
Merge "Scope dhcp rpc api using a messaging namespace"

9 years agoCopy the contrib directory instead of moving it
armando-migliaccio [Sat, 20 Dec 2014 17:39:55 +0000 (09:39 -0800)]
Copy the contrib directory instead of moving it

This is necessary because pbr is stupid enough not to be
able to handle symlinks. The initial symlink was necessary to
avoid breaking the functional job. Once change [1] merges we
can drop the old contrib directory.

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

Change-Id: I683009b1c5b3520e5f9f2c17a9a0dabefdeebe45

9 years agoMerge "Revert "Add metadata proxy L3 agent driver""
Jenkins [Sat, 20 Dec 2014 07:10:01 +0000 (07:10 +0000)]
Merge "Revert "Add metadata proxy L3 agent driver""

9 years agoRevert "Add metadata proxy L3 agent driver"
Henry Gessau [Sat, 20 Dec 2014 05:08:43 +0000 (05:08 +0000)]
Revert "Add metadata proxy L3 agent driver"

This reverts commit 6b38f29fdbd077434f1f7139466479e81bf4882d.

Because it broke the functional job.

Change-Id: Ibcc577ade490663820f0a4f599afc6127a6e52e6

9 years agoMerge "Remove NSX 'service' plugin"
Jenkins [Sat, 20 Dec 2014 02:43:20 +0000 (02:43 +0000)]
Merge "Remove NSX 'service' plugin"

9 years agoMerge "Add metadata proxy L3 agent driver"
Jenkins [Sat, 20 Dec 2014 02:37:59 +0000 (02:37 +0000)]
Merge "Add metadata proxy L3 agent driver"

9 years agoScope dhcp rpc api using a messaging namespace
Russell Bryant [Tue, 9 Dec 2014 17:30:53 +0000 (17:30 +0000)]
Scope dhcp rpc api using a messaging namespace

This patch updates the rpc API used by the DHCP agent to make calls
back into the neutron plugin to use the 'dhcp' namespace instead of
the default namespace.  The reason is that this API is exposed over
the 'q-plugin' topic along with several other interfaces.  Without the
use of namespaces, all of the interfaces are effectively treated as
one by oslo.messaging.  When a namespace is used, the interface can be
versioned independently and when a method is called, the only class
considered for fulfilling the request is the one that claims to
implement the 'dhcp' namespace.

While we're here, add documentation to both the client and server side
of this interface that indicates where the other side is located.

Part of blueprint rpc-docs-and-namespaces.

Change-Id: I9e56aa34fc560ae3fc749c51788436e32179d0a1

9 years agoMerge "IpsetManager refactoring"
Jenkins [Fri, 19 Dec 2014 11:04:37 +0000 (11:04 +0000)]
Merge "IpsetManager refactoring"

9 years agoAllow setting a tenant router's external IP
Kevin Benton [Wed, 18 Jun 2014 19:03:01 +0000 (12:03 -0700)]
Allow setting a tenant router's external IP

Adds an external_ip option to the router creation
and update operations to set the IP address the router
will try to use as its fixed IP on the external network
it's attached to. By default this is restricted to an
admin-only operation by policy.json.

DocImpact
ApiImpact

Implements: blueprint specify-router-ext-ip
Closes-Bug: #1188427
Change-Id: Iba7c606eea48181fc10e9d0d5dc667e6f48f37de

9 years agoRemove NSX 'service' plugin
Salvatore [Wed, 17 Dec 2014 22:09:24 +0000 (23:09 +0100)]
Remove NSX 'service' plugin

Following the spin-off for Neutron advanced services, this plugin
has become non-functional.
This patch removes the plugin, the service drivers, the database
models which kept tracking of resource associations, exceptions,
and obviously unit tests.

As there were some extensions which were leveraged only by this
plugin, they are being removed as well. In particular, one of
these extensions, 'routed-service-insertion' was in the
neutron.extensions package rather than neutron.plugins.vmware
package. This was for historical reasons. As no other plugin is
using this extension, it is being removed as well with this
patch.

By removing this plugin vmware the temporary skips applied to
neutron unit tests can be lifted. This patch does this.

Closes-Bug: #1403585

Change-Id: I0717f955b0f787c2951cb9db44ea5decc5d3dff0

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Fri, 19 Dec 2014 06:09:45 +0000 (06:09 +0000)]
Imported Translations from Transifex

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I1c8a871becb19341c55d515cb9ed604e2d7ea723

9 years agoMerge "Move DB TestModelsMigrations from unit to functional"
Jenkins [Fri, 19 Dec 2014 05:31:56 +0000 (05:31 +0000)]
Merge "Move DB TestModelsMigrations from unit to functional"

9 years agoMerge "tests: drop unit tests that only check default configuration values"
Jenkins [Fri, 19 Dec 2014 03:49:33 +0000 (03:49 +0000)]
Merge "tests: drop unit tests that only check default configuration values"