]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agoRefactoring devstack script
Hirofumi Ichihara [Thu, 10 Sep 2015 07:54:31 +0000 (16:54 +0900)]
Refactoring devstack script

Change-Id: Iabb7313b667ef6921acbb65b1eb583603b4d0b11

9 years agoMerge "Fix dvr update for subnet attach multi subnets"
Jenkins [Wed, 9 Sep 2015 23:50:16 +0000 (23:50 +0000)]
Merge "Fix dvr update for subnet attach multi subnets"

9 years agoMerge "Make ip rule comparison more robust"
Jenkins [Wed, 9 Sep 2015 20:48:19 +0000 (20:48 +0000)]
Merge "Make ip rule comparison more robust"

9 years agoFix dvr update for subnet attach multi subnets
lzklibj [Mon, 2 Mar 2015 10:13:41 +0000 (02:13 -0800)]
Fix dvr update for subnet attach multi subnets

Fix method dvr_update_router_addvm to notify every
router attached to subnet where the vm will boot
on.

In dvr case, when a subnet only attaches to one router,
the subnet will only have one distributed router interface,
which device_owner is "network:router_interface_distributed".
So in this case, get_ports in this method will only get
one port, and it should be unnecessary to break in for loop.

But when a subnet attaches multiple routers, get_ports in
this method will return all distributed router interfaces
and the routers hold those interfaces should be notified
when an instance booted on the subnet. So it should also
be unnecessary to break in for loop.

Change-Id: I3a5808e5b6e8b78abd1a5b924395844507da0764
Closes-Bug: #1427122
Co-Authored-By: Ryan Moats <rmoats@us.ibm.com>
9 years agoMerge "SR-IOV: devstack support for SR-IOV agent"
Jenkins [Wed, 9 Sep 2015 18:44:50 +0000 (18:44 +0000)]
Merge "SR-IOV: devstack support for SR-IOV agent"

9 years agoMerge "Remove ebtables_driver/manager dead code"
Jenkins [Wed, 9 Sep 2015 18:30:25 +0000 (18:30 +0000)]
Merge "Remove ebtables_driver/manager dead code"

9 years agoMerge "Delete FIP agent gateway port with external gw port"
Jenkins [Wed, 9 Sep 2015 18:27:18 +0000 (18:27 +0000)]
Merge "Delete FIP agent gateway port with external gw port"

9 years agoMerge "sriov: update port state even if ip link fails"
Jenkins [Wed, 9 Sep 2015 18:16:31 +0000 (18:16 +0000)]
Merge "sriov: update port state even if ip link fails"

9 years agoMerge "Fix test_external_tables_not_changed"
Jenkins [Wed, 9 Sep 2015 16:51:54 +0000 (16:51 +0000)]
Merge "Fix test_external_tables_not_changed"

9 years agoMake ip rule comparison more robust
Carl Baldwin [Fri, 28 Aug 2015 21:19:40 +0000 (21:19 +0000)]
Make ip rule comparison more robust

I found that ip rules would be added multiple times in new address
scopes code because the _exists method was unable to reliably
determine if the rule already existed.  This commit improves this by
more robustly canonicalizing what it reads from the ip rule command so
that like rules always compare the same.

Change-Id: I6d0c208f0ed8e65cdb750789321a7ad6ca1b77c2
Partially-Implements: blueprint address-scopes

9 years agoMerge "Add non-model index names to autogen exclude filters"
Jenkins [Wed, 9 Sep 2015 12:38:56 +0000 (12:38 +0000)]
Merge "Add non-model index names to autogen exclude filters"

9 years agoMerge "Implement expand/contract autogenerate extension"
Jenkins [Wed, 9 Sep 2015 12:34:59 +0000 (12:34 +0000)]
Merge "Implement expand/contract autogenerate extension"

9 years agoSR-IOV: devstack support for SR-IOV agent
Moshe Levi [Tue, 25 Aug 2015 12:50:09 +0000 (15:50 +0300)]
SR-IOV: devstack support for SR-IOV agent

Change-Id: Ia0649962bd0c68d9c99fd54cc84ce8dd67d792e8

9 years agoFix test_external_tables_not_changed
Ann Kamyshnikova [Tue, 1 Sep 2015 12:15:53 +0000 (15:15 +0300)]
Fix test_external_tables_not_changed

test_external_tables_not_changed was not
executed properly as new engine was created in env.py.

Related-bug: #1466704

Change-Id: If02415d7abd17024946f7aee8fb6abc374a7aefe

9 years agoMerge "Updated from global requirements"
Jenkins [Wed, 9 Sep 2015 01:01:23 +0000 (01:01 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "ovs agent resync may miss port remove event"
Jenkins [Wed, 9 Sep 2015 00:32:54 +0000 (00:32 +0000)]
Merge "ovs agent resync may miss port remove event"

9 years agoMerge "Delete the useless variable agent_host"
Jenkins [Tue, 8 Sep 2015 22:58:45 +0000 (22:58 +0000)]
Merge "Delete the useless variable agent_host"

9 years agoMerge "Fixed filters for functional tests"
Jenkins [Tue, 8 Sep 2015 22:40:52 +0000 (22:40 +0000)]
Merge "Fixed filters for functional tests"

9 years agoMerge "Stop device_owner from being set to 'network:*'"
Jenkins [Tue, 8 Sep 2015 22:40:26 +0000 (22:40 +0000)]
Merge "Stop device_owner from being set to 'network:*'"

9 years agoMerge "Add ability to use custom config in DHCP-agent"
Jenkins [Tue, 8 Sep 2015 22:08:44 +0000 (22:08 +0000)]
Merge "Add ability to use custom config in DHCP-agent"

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Tue, 8 Sep 2015 22:03:54 +0000 (22:03 +0000)]
Updated from global requirements

Change-Id: Ib9d2e669f3d6e68cced7cd6674ff23ff7642f997

9 years agoAdd non-model index names to autogen exclude filters
Mike Bayer [Fri, 14 Aug 2015 18:44:28 +0000 (14:44 -0400)]
Add non-model index names to autogen exclude filters

The SQLAlchemy MySQL dialect generates implicit indexes
in the less-common case of an integer column within a composite
primary key where autoincrement is not set to False.
Add a rule to ignore these indexes when performing
autogenerate against a target database.

Change-Id: I49abb3f7ad9731cde046fa2862cdb9ec16c3aeb3
Partially-Implements: blueprint online-schema-migrations

9 years agoImplement expand/contract autogenerate extension
Mike Bayer [Mon, 20 Jul 2015 22:34:15 +0000 (18:34 -0400)]
Implement expand/contract autogenerate extension

Makes use of new Alembic 0.8 features to allow
altering of the "alembic revision" stream such
that operations for expand and contract are
directed into separate branches.

Change-Id: Ifa743e2f5b90e59a8de8f4e7a67c4bbe46686804
Partially-Implements: blueprint online-schema-migrations

9 years agoMerge "Add oslo rootwrap daemon logging during functional tests"
Jenkins [Tue, 8 Sep 2015 19:21:50 +0000 (19:21 +0000)]
Merge "Add oslo rootwrap daemon logging during functional tests"

9 years agoMerge "Resolve issue where router can't be removed from L3-agent in dvr mode"
Jenkins [Tue, 8 Sep 2015 19:15:47 +0000 (19:15 +0000)]
Merge "Resolve issue where router can't be removed from L3-agent in dvr mode"

9 years agoDelete FIP agent gateway port with external gw port
Swaminathan Vasudevan [Mon, 22 Jun 2015 23:33:32 +0000 (16:33 -0700)]
Delete FIP agent gateway port with external gw port

FIP agent gateway ports are associated with external
networks and specific host.

Today FIP agent gateway ports are deleted for
every floatingip associate and disassociate. This
introduces race conditions in the port delete and also
un-necessary access to the db.

This patch will delete the FIP agent gateway port when
the last gateway port of the external network is deleted.

The child patch linked to this parent patch will clean
up the FIP agent gateway port delete when associate,
disassociate and delete of floatingip happens.

This should also cover the case when an agent for some
reason was unable to request agent gw port delete.
(agent died).

Related-Bug: #1408855
Related-Bug: #1468007
Related-Bug: #1450982

Change-Id: I6637a771e6a6ce74e848cb74b779043e16a54a84

9 years agoRemove ebtables_driver/manager dead code
Cedric Brandily [Tue, 8 Sep 2015 15:23:49 +0000 (15:23 +0000)]
Remove ebtables_driver/manager dead code

Previous changes[1] have been merged as enablers[2] to fix the bug
1274034 but an alternative solution has been choosen and now we can
consider the introduced code as dead code.

This changes removes [2], associated tests and rootwrap filters.

[1] I9ef57a86b1a1c1fa4ba1a034c920f23cb40072c0
    I3c66e92cbe8883dcad843ad243388def3a96dbe5
[2] neutron.agent.linux.ebtables_driver
    neutron.agent.linux.ebtables_manager

Closes-Bug: #1493422
Related-Bug: #1274034
Change-Id: I61e38fc0d8cf8e79252aabc19a70240be57e4a32

9 years agoStop device_owner from being set to 'network:*'
Kevin Benton [Wed, 26 Aug 2015 05:03:27 +0000 (22:03 -0700)]
Stop device_owner from being set to 'network:*'

This patch adjusts the FieldCheck class in the policy engine to
allow a regex rule. It then leverages that to prevent users from
setting the device_owner field to anything that starts with
'network:' on networks which they do not own.

This policy adjustment is necessary because any ports with a
device_owner that starts with 'network:' will not have any security
group rules applied because it is assumed they are trusted network
devices (e.g. router ports, DHCP ports, etc). These security rules
include the anti-spoofing protection for DHCP, IPv6 ICMP messages,
and IP headers.

Without this policy adjustment, tenants can abuse this trust when
connected to a shared network with other tenants by setting their
VM port's device_owner field to 'network:<anything>' and hijack other
tenants' traffic via DHCP spoofing or MAC/IP spoofing.

Closes-Bug: #1489111
Change-Id: Ia64cf16142e0e4be44b5b0ed72c8e00792d770f9

9 years agoAdd oslo rootwrap daemon logging during functional tests
Assaf Muller [Tue, 8 Sep 2015 14:48:11 +0000 (10:48 -0400)]
Add oslo rootwrap daemon logging during functional tests

Change-Id: Ie688a1df6e256c0195b8f3937228f65c0463e9c3
Closes-Bug: #1493396

9 years agoMerge "Improve DB operations for quota reservation"
Jenkins [Tue, 8 Sep 2015 14:42:27 +0000 (14:42 +0000)]
Merge "Improve DB operations for quota reservation"

9 years agoMerge "tests: disable process monitor before managers"
Jenkins [Tue, 8 Sep 2015 13:29:59 +0000 (13:29 +0000)]
Merge "tests: disable process monitor before managers"

9 years agoMerge "Add a functional test to validate dvr snat namespace"
Jenkins [Tue, 8 Sep 2015 13:24:53 +0000 (13:24 +0000)]
Merge "Add a functional test to validate dvr snat namespace"

9 years agoovs agent resync may miss port remove event
Aman Kumar [Tue, 17 Mar 2015 10:41:54 +0000 (03:41 -0700)]
ovs agent resync may miss port remove event

In OVS Agent rpc_loop() resync mechanism clears the registered ports and
rescans them again, and it might result in missing some "port removed"
event and treat_devices_removed will not be called.

This fix rescans the newly updated ports when resync mechanism called,
without clearing the current registered ports.

The registered ports will be cleared only if there are too many
consecutive resyncs to avoid resycing forever because of the same
faulty port.

Closes-Bug: #1329223

Co-Authored-By: Andrey Epifanov <aepifanov@mirantis.com>
Co-Authored-By: Gandharva S <gandharva.s@hp.com>
Co-Authored-By: Romil Gupta <romilg@hp.com>
Co-Authored-By: Rossella Sblendido <rsblendido@gmail.com>
Change-Id: Ib0db9dcf889d9fd90b623857782c9a6b091e18f5

9 years agotests: disable process monitor before managers
Ihar Hrachyshka [Tue, 8 Sep 2015 09:20:10 +0000 (11:20 +0200)]
tests: disable process monitor before managers

Otherwise the monitor may respawn managers later, leaving them running.

Issue spotted in:
http://logs.openstack.org/02/216902/4/check/gate-neutron-dsvm-functional/a97df90

Change-Id: I0e68b06c87b5770756fdf7b9201e1986cc67e07b
Related-Bug: #1490051

9 years agoMerge "Qos SR-IOV: Refactor extension delete to get mac and pci slot"
Jenkins [Tue, 8 Sep 2015 06:19:17 +0000 (06:19 +0000)]
Merge "Qos SR-IOV: Refactor extension delete to get mac and pci slot"

9 years agoMerge "Retry metadata request on connection refused error"
Jenkins [Mon, 7 Sep 2015 16:52:30 +0000 (16:52 +0000)]
Merge "Retry metadata request on connection refused error"

9 years agoMerge "Handle process disappearing before we ask for its PPID"
Jenkins [Mon, 7 Sep 2015 16:17:58 +0000 (16:17 +0000)]
Merge "Handle process disappearing before we ask for its PPID"

9 years agoRetry metadata request on connection refused error
armando-migliaccio [Mon, 7 Sep 2015 11:53:50 +0000 (04:53 -0700)]
Retry metadata request on connection refused error

This testcase may fail intermittently on 'Connection refused' error.
This could be due to the fact that the metadata proxy setup is not exactly
complete at the time the request is issued; in fact there is no
synchronization between the router being up and the metadata request being
issued, and clearly this may be the reason of accidental but seldom failures.

In order to rule out this possibility and stabilize the test, let's retry
on connection refused only. If we continue to fail, then the next step would
be to dump the content of iptables to figure out why the error occurs.

Closes-bug: #1461172

Change-Id: I65a5bf4fbbcad6ba93a46d36cabe7844ff528d8d

9 years agoAdd ability to use custom config in DHCP-agent
Sergey Belous [Thu, 3 Sep 2015 13:53:21 +0000 (16:53 +0300)]
Add ability to use custom config in DHCP-agent

This patch doesn't changes behaviour of dhcp-agent
but adds the opportunity to use user-defined config,
that will make dhcp-agent more flexible
and allows to run functional tests correctly
(without changing global oslo.config CONF)

Closes-Bug: #1492283
Change-Id: Ice807e8fc872b56bb3960b7a3de4110c7675d9d6

9 years agoImprove DB operations for quota reservation
Salvatore Orlando [Tue, 25 Aug 2015 09:21:06 +0000 (02:21 -0700)]
Improve DB operations for quota reservation

This patch deals with the lock wait timeout and the deadlock errors
observed under high concurrency (api_workers >= 4) with the pymysql
driver. It includes the following changes:

- Stop setting dirty status for resource usage when creating
  reservation, as usage of reserved resources is not tracked anymore;
- Add a variable, increasing delay when retrying make_reservation
  upon a DBDeadlock error in order to reduce the chances of further
  collisions;
- Enable transaction retry upon DBDeadlock errors for set_quota_usage;
- Do not resync quota usage while making reservation. This puts a lot
  of stress on the database and is also wasteful since resource usage
  is very likely to change again once the transaction is committed;
- Use autonested_transaction to simplify logic around when the
  nested flag should be used.

Change-Id: I7a335f9ebea3c0d6fee6e6b757554e045a66075c
Closes-Bug: #1486134
Related-Blueprint: better-quotas

9 years agoQos SR-IOV: Refactor extension delete to get mac and pci slot
Moshe Levi [Tue, 18 Aug 2015 05:48:24 +0000 (08:48 +0300)]
Qos SR-IOV: Refactor extension delete to get mac and pci slot

When calling delete we need the pci slot details to reset the VF rate. The problem
is that when the VM is deleted libvirt return the VF to the hypervisor and eswitch
manager will mark the pci_slot as unassigned so can't know from the mac which pci slot (VF)
to reset. Also newer libvirt version reset the mac when deleteing VM, so than it is
not possible at all.
The solution is to keep pci slot details locally in the agent since upon removal event
you cannot get pci_slot from the neutron server as it is for create/update since port
is already removed from neutron.

This patch pairs the mac and pci_slot for a device (VF) so when calling the extension
port delete api we can have the pci_slot and reset the VF rate.

It is also add a mapping between mac to port_id so we can pass the port_id
when calling the extention port delete api.

Partially-Implements: blueprint ml2-sriov-qos-with-bwlimiting
Closes-Bug: #1492909
Change-Id: Icc3a9599c6d7a4de9c56b452dfab7909c8d0a576

9 years agoMerge "Adds support to provide the csum option for the OVS tunnels"
Jenkins [Sun, 6 Sep 2015 22:14:46 +0000 (22:14 +0000)]
Merge "Adds support to provide the csum option for the OVS tunnels"

9 years agoMerge "Final decomposition of Cisco plugin"
Jenkins [Sun, 6 Sep 2015 20:02:34 +0000 (20:02 +0000)]
Merge "Final decomposition of Cisco plugin"

9 years agoAdds support to provide the csum option for the OVS tunnels
root [Sat, 5 Sep 2015 17:47:41 +0000 (10:47 -0700)]
Adds support to provide the csum option for the OVS tunnels

The new option for the ovs agent will enable to set/unset the
csum option for the vxlan/gre tunnels. The default is maintained as False.

Change-Id: I18dcd8946b585e70f8890a5c222ea37059c4a0c5
Implements: bp ovs-tunnel-csum-option
Closes-bug: #1492111

9 years agoDelete the useless variable agent_host
huangpengtao [Sun, 6 Sep 2015 15:32:49 +0000 (23:32 +0800)]
Delete the useless variable agent_host

Change-Id: I7fb9da4b4b5316ddbc93a89317ee57718da178d3

9 years agoMerge "Improve python code for missing suggestion"
Jenkins [Sun, 6 Sep 2015 11:06:15 +0000 (11:06 +0000)]
Merge "Improve python code for missing suggestion"

9 years agoHandle process disappearing before we ask for its PPID
Neil Jerram [Sun, 6 Sep 2015 00:09:16 +0000 (01:09 +0100)]
Handle process disappearing before we ask for its PPID

Change-Id: I573aba8e11dca16f8a6565f7e9704be18e938566
Closes-Bug: #1478190

9 years agoMerge "Remove Cisco Meta and N1KV monolithic plugins"
Jenkins [Sat, 5 Sep 2015 18:50:51 +0000 (18:50 +0000)]
Merge "Remove Cisco Meta and N1KV monolithic plugins"

9 years agoMerge "Add snat ports cache to dvr router"
Jenkins [Sat, 5 Sep 2015 17:43:51 +0000 (17:43 +0000)]
Merge "Add snat ports cache to dvr router"

9 years agoMerge "Implement external physical bridge mapping in linuxbridge"
Jenkins [Sat, 5 Sep 2015 17:04:45 +0000 (17:04 +0000)]
Merge "Implement external physical bridge mapping in linuxbridge"

9 years agoMerge "Fix locale problem in execute()"
Jenkins [Sat, 5 Sep 2015 16:03:46 +0000 (16:03 +0000)]
Merge "Fix locale problem in execute()"

9 years agoMerge "Updated from global requirements"
Jenkins [Sat, 5 Sep 2015 09:57:14 +0000 (09:57 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "OVS agent: handle deleted ports on each rpc_loop iteration"
Jenkins [Sat, 5 Sep 2015 08:54:54 +0000 (08:54 +0000)]
Merge "OVS agent: handle deleted ports on each rpc_loop iteration"

9 years agoMerge "Workaround test stream corruption issue."
Jenkins [Sat, 5 Sep 2015 06:57:08 +0000 (06:57 +0000)]
Merge "Workaround test stream corruption issue."

9 years agoOVS agent: handle deleted ports on each rpc_loop iteration
Oleg Bondarev [Thu, 3 Sep 2015 13:31:33 +0000 (16:31 +0300)]
OVS agent: handle deleted ports on each rpc_loop iteration

Currently rpc loop processes ports only in case polling is required
(message from ovsdb monitor) or there are port_updated notifications from
server or security group notifications.
In case of just port_deleted notifications port processing is not
triggered during rpc loop.
This may lead to agent accumulating a big amount of deleted ports
and processing all of them at once during next iteration when polling is
required or any notification from server, which might be quite tough for
the agent. Tough means agent will be irresponsive while processing deleted
ports.
The patch makes port deletion processing more gradual.

Closes-Bug: #1491922
Change-Id: I0e1f6dfbf5b56fb18a978d6214e1768560d8ac98

9 years agoMerge "OVS agent: flush firewall rules for all deleted ports at once"
Jenkins [Sat, 5 Sep 2015 05:04:07 +0000 (05:04 +0000)]
Merge "OVS agent: flush firewall rules for all deleted ports at once"

9 years agoFinal decomposition of Cisco plugin
Shweta P [Thu, 27 Aug 2015 20:53:13 +0000 (16:53 -0400)]
Final decomposition of Cisco plugin

This patch follows the previous patch(listed as dependent) and moves
the remaining cisco db models from neutron to networking-cisco.
The patch deletes l3_model and cisco_router_plugin and their associated
config and helper files from neutron

Change-Id: I5b71e1dfb683e633e1cd11386dfb7c2ed7cc7d62
Partial-Bug: #1489609

9 years agoRemove Cisco Meta and N1KV monolithic plugins
Abhishek Raut [Tue, 11 Aug 2015 03:52:15 +0000 (20:52 -0700)]
Remove Cisco Meta and N1KV monolithic plugins

This patch removes the Cisco meta plugin and the Cisco
Nexus1000V monolithic plugin as they were deprecated in the
previous cycle.

Closes-bug: #1473217

Change-Id: Id170b9512b2f52a971264336d83b083d487359ee

9 years agoMerge "Remove implicit registration of *-aas service providers"
Jenkins [Sat, 5 Sep 2015 04:50:27 +0000 (04:50 +0000)]
Merge "Remove implicit registration of *-aas service providers"

9 years agoMerge "_bind_devices query only existing ports"
Jenkins [Sat, 5 Sep 2015 04:25:23 +0000 (04:25 +0000)]
Merge "_bind_devices query only existing ports"

9 years agoWorkaround test stream corruption issue.
Robert Collins [Sat, 5 Sep 2015 04:04:42 +0000 (16:04 +1200)]
Workaround test stream corruption issue.

Change-Id: I4c88f1891f53c6559bca71bf657aa30df2101280
Closes-Bug: #1492505

9 years agoMerge "test_migrations: Remove unnecessary midonetclient mocks"
Jenkins [Sat, 5 Sep 2015 04:04:51 +0000 (04:04 +0000)]
Merge "test_migrations: Remove unnecessary midonetclient mocks"

9 years agoMerge "Fixed functional test that validates graceful ovs agent restart"
Jenkins [Sat, 5 Sep 2015 02:32:54 +0000 (02:32 +0000)]
Merge "Fixed functional test that validates graceful ovs agent restart"

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Fri, 4 Sep 2015 23:06:43 +0000 (23:06 +0000)]
Updated from global requirements

Change-Id: I6f3dbf989cb6d9d110c2ee6a3a2e2b557bced28f

9 years agoMerge "Deprecate external_network_bridge option in L3 agent"
Jenkins [Fri, 4 Sep 2015 22:37:17 +0000 (22:37 +0000)]
Merge "Deprecate external_network_bridge option in L3 agent"

9 years agoMerge "Enable most unit tests for py34 job"
Jenkins [Fri, 4 Sep 2015 20:55:18 +0000 (20:55 +0000)]
Merge "Enable most unit tests for py34 job"

9 years agoFixed functional test that validates graceful ovs agent restart
Ihar Hrachyshka [Fri, 4 Sep 2015 20:21:41 +0000 (22:21 +0200)]
Fixed functional test that validates graceful ovs agent restart

The async_ping function returns a callable that returns True when all ping
futures are done. Since those futures are running for 10 secs, there was no
chance that the result of the callable was True.

The test was bailing out without calling bridge reset even a single time,
effectively leaving the feature untested in gate.

Another thing to note is that for some reason the patch fixed oslo rootwrap
errors in the test when executed locally. Since I still don't understand how
it's possible that it fixes the issue for me, I mark the bug as related only,
and will track logstash after it's merged to see whether it applies unknown
magic to gate jobs too.

Change-Id: Iaa977abddf1a0c6af7e964f1a5cd545ffb79585a
Related-Bug: #1490051

9 years agoMerge "Avoid DB errors when deleting network's ports and subnets"
Jenkins [Fri, 4 Sep 2015 19:24:11 +0000 (19:24 +0000)]
Merge "Avoid DB errors when deleting network's ports and subnets"

9 years ago_bind_devices query only existing ports
rossella [Wed, 26 Aug 2015 16:06:25 +0000 (16:06 +0000)]
_bind_devices query only existing ports

If a port is deleted right before _bind_devices is called,
get_ports_attributes will throw an exception since the row
corresponding to the port doesn't exist in the OVS DB.
Avoid that setting if_exists to True. The port will be
processed as deleted by the agent in the following iteration.

Change-Id: Ia6590d76f8683e6cba562cde3c39b051549f6c04
Closes-bug: #1489014

9 years agoOVS agent: flush firewall rules for all deleted ports at once
Oleg Bondarev [Thu, 3 Sep 2015 12:13:25 +0000 (15:13 +0300)]
OVS agent: flush firewall rules for all deleted ports at once

In some cases, under high load OVS agent has to delete a big amount of
ports during rpc_loop. remove_devices_filter() does iptables-save/restore
for IPv4 and IPv6 which is 4 system calls. It is very expensive and
inefficient to call it for each port individually.

Closes-Bug: #1491922
Change-Id: I4cfb2dfcef5088436c7aaae22c8f66e1ea052311

9 years agoMerge "Make sure service providers can be loaded correctly"
Jenkins [Fri, 4 Sep 2015 10:31:23 +0000 (10:31 +0000)]
Merge "Make sure service providers can be loaded correctly"

9 years agoMerge "Add constraint target to tox.ini"
Jenkins [Fri, 4 Sep 2015 09:33:18 +0000 (09:33 +0000)]
Merge "Add constraint target to tox.ini"

9 years agoMerge "Changed filter field to router_id"
Jenkins [Fri, 4 Sep 2015 09:31:27 +0000 (09:31 +0000)]
Merge "Changed filter field to router_id"

9 years agoMerge "Fix a wrong condition for the _purge_metering_info function"
Jenkins [Fri, 4 Sep 2015 09:30:49 +0000 (09:30 +0000)]
Merge "Fix a wrong condition for the _purge_metering_info function"

9 years agoMerge "Better message on allowed address pairs error"
Jenkins [Fri, 4 Sep 2015 09:28:04 +0000 (09:28 +0000)]
Merge "Better message on allowed address pairs error"

9 years agoEnable most unit tests for py34 job
Ihar Hrachyshka [Tue, 1 Sep 2015 19:45:55 +0000 (21:45 +0200)]
Enable most unit tests for py34 job

* Skip TestWSGIServerWithSSL[1] for Python 3 since it seems wsgi + ssl +
  eventlet setup does not behave correctly now,
* Skip test_json_with_utf8[2] until we solve unicode/utf8 encode/decode,
* Fix some more tests to pass for py3,
* Replace print by print() in docs/docstrings.

[1] neutron.tests.unit.test_wsgi (bug 1482633)
[2] neutron.tests.unit.test_wsgi.JSONDictSerializerTest (bug 1491824)

Related-Bug: #1482633
Related-Bug: #1491824
Blueprint: neutron-python3
Co-Authored-By: Cyril Roelandt <cyril@redhat.com>
Co-Authored-By: Cedric Brandily <zzelle@gmail.com>
Co-Authored-By: sonu.kumar <sonu.kumar@nectechnologies.in>
Change-Id: I26e513d4dcf473f4cd79728382fc94af3d901b5d

9 years agoMerge "OVS-agent: Introduce Ryu based OpenFlow implementation"
Jenkins [Fri, 4 Sep 2015 06:22:29 +0000 (06:22 +0000)]
Merge "OVS-agent: Introduce Ryu based OpenFlow implementation"

9 years agoMerge "Add support for PluginWorker and Process creation notification"
Jenkins [Fri, 4 Sep 2015 05:02:52 +0000 (05:02 +0000)]
Merge "Add support for PluginWorker and Process creation notification"

9 years agoMerge "OVS agent add functional tests of OVS status"
Jenkins [Fri, 4 Sep 2015 05:02:36 +0000 (05:02 +0000)]
Merge "OVS agent add functional tests of OVS status"

9 years agoMerge "check_changed_vlans doesn't need registered_ports as param"
Jenkins [Fri, 4 Sep 2015 05:02:15 +0000 (05:02 +0000)]
Merge "check_changed_vlans doesn't need registered_ports as param"

9 years agoChanged filter field to router_id
Tu Hong Jun [Thu, 20 Aug 2015 06:08:07 +0000 (14:08 +0800)]
Changed filter field to router_id

The get_sync_interfaces query will always return all router ports
from database even it is supposed to query specific ones that
belong to a certain router. In large L3 scale environment with
number of route ports in place, this would lag the response time
for adding router interface and router L3 agent binding.

Closes-Bug: #1489671
Change-Id: Ib78ca766f91783ad2ecca5b728c31602b4ed15d8

9 years agoFix a wrong condition for the _purge_metering_info function
Sergey Vilgelm [Mon, 31 Aug 2015 14:06:48 +0000 (17:06 +0300)]
Fix a wrong condition for the _purge_metering_info function

Fix a situation for the _purge_metering_info function
when the items will never be deleted from the metering_info.
Delete the metering_info dict and use the metering_infos instead.
Fix the problem with changing a dictionary during iteration.
Add the unit tests for the _purge_metering_info and
_add_metering_info functions.

Co-Authored-By: Yaroslav Isakov <yisakov@mirantis.com>
Change-Id: I9031a5f27ae6438ffd5c5a48b0cf5cdc6867eff3
Closes-Bug: #1490581

9 years agoMerge "Retain logs for functional test cases"
Jenkins [Fri, 4 Sep 2015 00:51:01 +0000 (00:51 +0000)]
Merge "Retain logs for functional test cases"

9 years agoMake sure service providers can be loaded correctly
armando-migliaccio [Thu, 3 Sep 2015 17:29:12 +0000 (10:29 -0700)]
Make sure service providers can be loaded correctly

This patch fixes a regression where, if neutron was loaded using
--config-dir, the service_providers option was no longer available.

We bring the logic back (removed by 61121c5f2af), alongside the ability
to load the option auto-magically. This is especially required for DevStack
deployments as of today, because neutron-server is only loaded by passing
--config-file (...)neutron.conf and --config-file (...)ml2_conf.ini

Change-Id: I9bfaed9e19a5506e27795a0b7ad47f4c31fefa40
Closes-bug: #1490990

9 years agosriov: update port state even if ip link fails
Roman Bogorodskiy [Wed, 24 Jun 2015 12:40:35 +0000 (14:40 +0200)]
sriov: update port state even if ip link fails

Some SRIOV drivers/devices don't support link state setting,
meaning that 'ip link' fails like this when trying to set state:

 # ip l set dev p2p1 vf 6 state disable
 RTNETLINK answers: Operation not supported

The sriov-nic-agent tries to do that in
SriovNicSwitchAgent.treat_device() and fails because of non-zero
exit status from 'ip link' and, therefore, doesn't reach the code
that updates the actual port status, so port could hang in a BUILD
state even if binding was successful.

This patch fixes problem of nova not being able to successfully bind
or cleanup such a port. It does not fix a case when user manually
updates admin_state_up for a port via API, it's subject to a separate
fix.

Also, replace LOG.exception with LOG.warning for set_device_state()
as the exception would be logged by PciDeviceIPWrapper.set_vf_state()
anyway.

Closes-bug: #1468332
Change-Id: Ifa7c128d369ced60b5986aa0ed92527868f7efab

9 years agoRetain logs for functional test cases
armando-migliaccio [Thu, 3 Sep 2015 00:23:56 +0000 (17:23 -0700)]
Retain logs for functional test cases

This helps greatly the debugging process in face of race conditions.

Change-Id: I74235307183cbb15a7179b18b417b38ffb1d2cc9

9 years agoMerge "Add info to debug test_keepalived_respawns gate failure"
Jenkins [Thu, 3 Sep 2015 10:42:39 +0000 (10:42 +0000)]
Merge "Add info to debug test_keepalived_respawns gate failure"

9 years agoMerge "Deprecate --service option for neutron-db-manage"
Jenkins [Thu, 3 Sep 2015 08:12:34 +0000 (08:12 +0000)]
Merge "Deprecate --service option for neutron-db-manage"

9 years agoMerge "Make Neutron service flavor save service_type"
Jenkins [Thu, 3 Sep 2015 08:11:59 +0000 (08:11 +0000)]
Merge "Make Neutron service flavor save service_type"

9 years agoMerge "Enable to update external network subnet's gateway-ip"
Jenkins [Thu, 3 Sep 2015 08:11:40 +0000 (08:11 +0000)]
Merge "Enable to update external network subnet's gateway-ip"

9 years agoMerge "Add tenant_id to flavor service profiles attributes"
Jenkins [Thu, 3 Sep 2015 07:59:59 +0000 (07:59 +0000)]
Merge "Add tenant_id to flavor service profiles attributes"

9 years agoAdd support for PluginWorker and Process creation notification
Terry Wilson [Tue, 16 Jun 2015 03:52:28 +0000 (22:52 -0500)]
Add support for PluginWorker and Process creation notification

There are several cases where plugin initialization should be
handled after neutron-server forks API/RPC workers. For example,
starting a client connection to an SDN controller before forking
copies the fd of the socket to the child process, but then you have
multiple processes trying to read/write the same socket connection.

It is also useful for a plugin to be able to do something in only
one process, regardless of how many workers are forked. One example
would be handling syncing from an external system to the neutron
database.

This patch does 3 things:
1) Treats rpc_workers=0 as = 1. This simplifies the code for
   handling notification that forking has completed. In the
   existing code, calling the notification in the Worker object's
   start() method would happen twice in the case where both api
   and rpc workers were 0, despite there being only one process.
   An earlier patch already changed the default api_workers to be
   the number of processors.
2) Adds notification of forking via the callbacks mechanism.
   Plugins can subscribe to resources.PROCESS, event.AFTER_CREATE
   and do any post-fork initialization that needs to be done for
   every spawned process.
3) Adds core/service plugin calls to get_workers() which defaults
   to returning (). Plugins that need additional processes to spawn
   should just return an iterable of NeutronWorkers that will be
   spawned in their own process.

DocImpact

Closes-Bug: #1463129
Change-Id: Ib99954678c2b4f32f486b537979d446aafbea07b

9 years agoImplement external physical bridge mapping in linuxbridge
Nick [Sun, 19 Jul 2015 14:41:27 +0000 (22:41 +0800)]
Implement external physical bridge mapping in linuxbridge

In some deployment scenario, it is not allowed to remove system
ethernet configuration from physical interface to newly-created
physical bridge by neutron due to some IT regulations.
End-users require to take advantage of the pre-existed(user-defined)
physical bridge to connect tap devices for neutron.

Closes-Bug: #1105488
Implements: blueprint phy-net-bridge-mapping
DocImpact

Change-Id: Ia0eaa6233d8da93da32e86404b15184b77937d0a

9 years agoAvoid DB errors when deleting network's ports and subnets
Oleg Bondarev [Wed, 12 Aug 2015 17:02:01 +0000 (20:02 +0300)]
Avoid DB errors when deleting network's ports and subnets

DB errors may occur when accessing query results
after the transaction was closed (like ObjectDeletedError).
Hence it's better to avoid DB object access especially
when it's not needed.
This patch changes _delete_ports() and _delete_subnets() to accept
only ids. Indeed, there is no need to pass db objects to these methods.

Closes-Bug: #1484135
Related-Bug: #1454408
Change-Id: I7507cb1c85defb2e6d5144e5832aea713d6251ae

9 years agoMerge "DHCP agent: allow using gateway IPs instead of uniquely allocated"
Jenkins [Thu, 3 Sep 2015 04:05:07 +0000 (04:05 +0000)]
Merge "DHCP agent: allow using gateway IPs instead of uniquely allocated"

9 years agoBetter message on allowed address pairs error
Kevin Benton [Fri, 28 Aug 2015 05:12:48 +0000 (22:12 -0700)]
Better message on allowed address pairs error

Neutron was throwing a 500 error when a non-iterable was passed
into allowed address pairs. This patch just catches that and
converts it into a regular badrequest message.

Closes-Bug: #1477829
Change-Id: I3c6f55df4912c7a9480fa097988f910b254572fd
Signed-off-by: Kevin Benton <blak111@gmail.com>
9 years agoMerge "Do not track active reservations"
Jenkins [Wed, 2 Sep 2015 22:12:53 +0000 (22:12 +0000)]
Merge "Do not track active reservations"

9 years agoAdd info to debug test_keepalived_respawns gate failure
Assaf Muller [Sat, 29 Aug 2015 15:32:19 +0000 (11:32 -0400)]
Add info to debug test_keepalived_respawns gate failure

Current theory is that there's a bug in external_process.active,
it returns True when it shouldn't, then kill -15 on the process
pid fails because the process isn't up. Added ps -p output to
see if the process is up or not.

Change-Id: Ic062be829d5f05a1294f6b2fa54820422871ffcb
Related-Bug: #1490043

9 years agoMerge "Catch errors on 'port not found' while deleting subnet"
Jenkins [Wed, 2 Sep 2015 19:55:00 +0000 (19:55 +0000)]
Merge "Catch errors on 'port not found' while deleting subnet"

9 years agoEnable to update external network subnet's gateway-ip
Hirofumi Ichihara [Tue, 25 Aug 2015 00:10:00 +0000 (09:10 +0900)]
Enable to update external network subnet's gateway-ip

This patch enables users to update gateway_ip of a subnet even if
the subnet is in use for an external network of a router.

Change-Id: I78d2b024c99b1af0001bd454465d2fc02692cbf2
Closes-Bug: #1317363