]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agoClarify stackforge/vmware-nsx is for VMware NSX suite
Salvatore Orlando [Fri, 1 May 2015 22:35:03 +0000 (15:35 -0700)]
Clarify stackforge/vmware-nsx is for VMware NSX suite

To avoid confusion with networking-vsphere

Change-Id: I5e787ba9d7aab75ff568baf5f5b9a6c37bf24d08

9 years agoMerge "Don't update port with host id of None"
Jenkins [Fri, 1 May 2015 22:26:03 +0000 (22:26 +0000)]
Merge "Don't update port with host id of None"

9 years agoMerge "l3 agent: fix grammar in router info not found warning"
Jenkins [Fri, 1 May 2015 21:22:28 +0000 (21:22 +0000)]
Merge "l3 agent: fix grammar in router info not found warning"

9 years agoMerge "Updated ovsvapp_agent.ini in neutron"
Jenkins [Fri, 1 May 2015 18:06:01 +0000 (18:06 +0000)]
Merge "Updated ovsvapp_agent.ini in neutron"

9 years agol3 agent: fix grammar in router info not found warning
Matt Riedemann [Fri, 1 May 2015 15:04:00 +0000 (08:04 -0700)]
l3 agent: fix grammar in router info not found warning

This offends my delicate sensibilities...

Change-Id: I4d00747093da6c39d5dc73272efd5acbcaa3684d

9 years agoMerge "Add notes about official sub-projects."
Jenkins [Fri, 1 May 2015 13:30:18 +0000 (13:30 +0000)]
Merge "Add notes about official sub-projects."

9 years agoMerge "Support multiple IPv6 prefixes on internal router ports for an HA Router"
Jenkins [Fri, 1 May 2015 13:30:06 +0000 (13:30 +0000)]
Merge "Support multiple IPv6 prefixes on internal router ports for an HA Router"

9 years agoMerge "Don't use iterator in search for tunnel type"
Jenkins [Fri, 1 May 2015 00:49:33 +0000 (00:49 +0000)]
Merge "Don't use iterator in search for tunnel type"

9 years agoMerge "Context: is_admin==True implies is_advsvc=True"
Jenkins [Fri, 1 May 2015 00:44:23 +0000 (00:44 +0000)]
Merge "Context: is_admin==True implies is_advsvc=True"

9 years agoMerge "Disembowel register_l3_agent code duplication in tests"
Jenkins [Thu, 30 Apr 2015 20:06:47 +0000 (20:06 +0000)]
Merge "Disembowel register_l3_agent code duplication in tests"

9 years agoContext: is_admin==True implies is_advsvc=True
Salvatore Orlando [Wed, 29 Apr 2015 23:07:27 +0000 (16:07 -0700)]
Context: is_admin==True implies is_advsvc=True

With this change is the is_admin parameter is set to True when
creating a context, the is_advsvc property is set to True as well,
without executing a pointless check with policy engine.

Closes-Bug: #1450244

Change-Id: I0a21a82692665599260d07c00c55df18fc926eb5

9 years agoAdd notes about official sub-projects.
Russell Bryant [Tue, 21 Apr 2015 15:53:08 +0000 (11:53 -0400)]
Add notes about official sub-projects.

There was recently a thread on openstack-dev titled "A big tent home
for Neutron backend code."

The thread began here:

    http://lists.openstack.org/pipermail/openstack-dev/2015-April/062310.html

and has roughly ended up here:

    http://lists.openstack.org/pipermail/openstack-dev/2015-April/062853.html

This patch is an attempt to reflect the end of that thread with
updates to docs.

Any further discussion should just continue on openstack-dev to avoid
forking the discussion between openstack-dev and gerrit.

Change-Id: I48dbe8ac69e60fbfd5e5082844004aaf9fdce539

9 years agoUpdated ovsvapp_agent.ini in neutron
Romil Gupta [Thu, 30 Apr 2015 08:37:34 +0000 (01:37 -0700)]
Updated ovsvapp_agent.ini in neutron

we have added the vxlan support for OVSvApp l2 Agent.

References:
https://review.openstack.org/#/c/168866/
https://review.openstack.org/#/c/175148/
https://review.openstack.org/#/c/177616/

Change-Id: I8061a1280b765e71aa682711c55c469f8425dac6

9 years agoDon't use iterator in search for tunnel type
Jakub Libosvar [Wed, 29 Apr 2015 10:04:03 +0000 (12:04 +0200)]
Don't use iterator in search for tunnel type

Changing dictionary size while using iterator causes RuntimeError. This
can happen in local vlan mapping under certain program flows. This patch
changes iteritems() to values() that returns list and thus preventing
from failure if local vlan mapping changes during creating tunnels.

Change-Id: I8a858d5c53e85f83a582f34205f9afa214cb4d58
Closes-Bug: 1449944

9 years agoMerge "Eliminate extra queries used to retrieve gw_ports"
Jenkins [Thu, 30 Apr 2015 06:44:21 +0000 (06:44 +0000)]
Merge "Eliminate extra queries used to retrieve gw_ports"

9 years agoMerge "Allow plugin to specify router_id"
Jenkins [Thu, 30 Apr 2015 01:41:14 +0000 (01:41 +0000)]
Merge "Allow plugin to specify router_id"

9 years agoMerge "Updated from global requirements"
Jenkins [Thu, 30 Apr 2015 00:40:07 +0000 (00:40 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "Correct inconsistent enable_snat management"
Jenkins [Thu, 30 Apr 2015 00:17:31 +0000 (00:17 +0000)]
Merge "Correct inconsistent enable_snat management"

9 years agoMerge "Make sure OVS restarts when Exception occurred"
Jenkins [Wed, 29 Apr 2015 23:12:10 +0000 (23:12 +0000)]
Merge "Make sure OVS restarts when Exception occurred"

9 years agoMerge "Ensure mocks for lla allocator _write in test_agent"
Jenkins [Wed, 29 Apr 2015 23:11:34 +0000 (23:11 +0000)]
Merge "Ensure mocks for lla allocator _write in test_agent"

9 years agoMerge "Replace unnecessary call to get_sync_routers"
Jenkins [Wed, 29 Apr 2015 22:49:35 +0000 (22:49 +0000)]
Merge "Replace unnecessary call to get_sync_routers"

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Wed, 29 Apr 2015 19:18:14 +0000 (19:18 +0000)]
Updated from global requirements

Change-Id: Icec7a7d00ebdd07673cfdb49a46faa4c73d3908a

9 years agoMerge "Fix _device_to_port_id for non-tap devices"
Jenkins [Wed, 29 Apr 2015 19:07:46 +0000 (19:07 +0000)]
Merge "Fix _device_to_port_id for non-tap devices"

9 years agoMerge "Imported Translations from Transifex"
Jenkins [Wed, 29 Apr 2015 19:07:00 +0000 (19:07 +0000)]
Merge "Imported Translations from Transifex"

9 years agoMerge "Rename delete_gateway method name"
Jenkins [Wed, 29 Apr 2015 18:40:15 +0000 (18:40 +0000)]
Merge "Rename delete_gateway method name"

9 years agoDisembowel register_l3_agent code duplication in tests
Assaf Muller [Tue, 28 Apr 2015 15:44:16 +0000 (11:44 -0400)]
Disembowel register_l3_agent code duplication in tests

Change-Id: I32fe50ce0904ff439c615d9860782d76e94c48c3

9 years agoEnsure mocks for lla allocator _write in test_agent
Sam Betts [Wed, 29 Apr 2015 15:15:35 +0000 (16:15 +0100)]
Ensure mocks for lla allocator _write in test_agent

The test test_create_dvr_fip_interfaces_for_restart_l3agent_case was
causing a file fip-linklocal-networks to be created when the tests are
run, this patch ensures that the correct part of the LinkLocalAllocator
is patched to prevent this in the test case.

Change-Id: Ifd0cae56324364b281a9279047b26a182b77905a
Closes-Bug: 1450090

9 years agoFix _device_to_port_id for non-tap devices
Kevin Benton [Mon, 30 Mar 2015 18:29:44 +0000 (11:29 -0700)]
Fix _device_to_port_id for non-tap devices

This adjusts the _device_to_port_id function in ML2
to recognize other interfaces that belong to Neutron
under different name prefixes.

Adds unit tests to achieve full converage of _device_to_port_id
method.

Closes-Bug: #1443710
Change-Id: I80284ee67e5876cf5689e49e1592ca1351ae5fa1

9 years agoMerge "Remove 'IP' from device exception message"
Jenkins [Wed, 29 Apr 2015 06:46:17 +0000 (06:46 +0000)]
Merge "Remove 'IP' from device exception message"

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Wed, 29 Apr 2015 06:14:13 +0000 (06:14 +0000)]
Imported Translations from Transifex

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

Change-Id: I35b81a59fe9d273742cdebf7ee3d47c23e2f5b9a

9 years agoRename delete_gateway method name
Gal Sagie [Wed, 29 Apr 2015 04:49:16 +0000 (07:49 +0300)]
Rename delete_gateway method name

Fix last comments from bug #1435012
Some comments were left out and the patch is already merged.
This patch address these comments.
Rename method and remove an unneeded comment

Change-Id: Ie087edf1fee7136eddf75ce01d4b640211445bfa

9 years agoMerge "Remove RecursivePermDirFixture useless cleanup"
Jenkins [Tue, 28 Apr 2015 23:43:09 +0000 (23:43 +0000)]
Merge "Remove RecursivePermDirFixture useless cleanup"

9 years agoMerge "Utilities for building/parsing netns names to facilitate testing"
Jenkins [Tue, 28 Apr 2015 21:30:07 +0000 (21:30 +0000)]
Merge "Utilities for building/parsing netns names to facilitate testing"

9 years agoMerge "Add icmpv6 to sg_supported_protocols"
Jenkins [Tue, 28 Apr 2015 21:29:54 +0000 (21:29 +0000)]
Merge "Add icmpv6 to sg_supported_protocols"

9 years agoRemove 'IP' from device exception message
Brian Haley [Tue, 28 Apr 2015 20:07:47 +0000 (16:07 -0400)]
Remove 'IP' from device exception message

Message should match others of this type elsewhere, and isn't
IP-specific.  Cleanup from https://review.openstack.org/#/c/168806/

Change-Id: I4cd3eb86e078f069b871b3cd08b66024682f92a6

9 years agoMerge "fix l3-agent restart with last runtime fip for dvr"
Jenkins [Tue, 28 Apr 2015 18:52:17 +0000 (18:52 +0000)]
Merge "fix l3-agent restart with last runtime fip for dvr"

9 years agoMerge "Suppress exception when trying to remove non existing device in SNAT redirect"
Jenkins [Tue, 28 Apr 2015 18:50:22 +0000 (18:50 +0000)]
Merge "Suppress exception when trying to remove non existing device in SNAT redirect"

9 years agoAdd icmpv6 to sg_supported_protocols
lijianlj [Thu, 29 Jan 2015 06:41:20 +0000 (14:41 +0800)]
Add icmpv6 to sg_supported_protocols

support using icmpv6 (protocol num 58) in the protocol option, when creating
a security group rule.At this time, port_range_min/port_range_max represent
icmpv6 type/code, and you can use only port_range_min to specify just one type.
eg:neutron security-group-rule-create --direction ingress \
   --ethertype ipv6 --protocol icmpv6 --port-range-min 134 SECURITY_GROUP

ApiImpact
DocImpact
Partial-Bug:#1427973
Change-Id: Ide4f7476cdb8a4f04f72983917ce7dbfc7be90a5

9 years agoMerge "Mock report_state during L3 agent functional tests"
Jenkins [Tue, 28 Apr 2015 10:59:05 +0000 (10:59 +0000)]
Merge "Mock report_state during L3 agent functional tests"

9 years agoMerge "Handle SIGHUP in dhcp and l3 agents"
Jenkins [Tue, 28 Apr 2015 10:55:24 +0000 (10:55 +0000)]
Merge "Handle SIGHUP in dhcp and l3 agents"

9 years agoMerge "Remove duplicated l3 router scheduler test cases"
Jenkins [Tue, 28 Apr 2015 08:54:15 +0000 (08:54 +0000)]
Merge "Remove duplicated l3 router scheduler test cases"

9 years agoMerge "Not creating HA router when not enough l3 agents"
Jenkins [Tue, 28 Apr 2015 07:30:22 +0000 (07:30 +0000)]
Merge "Not creating HA router when not enough l3 agents"

9 years agoMerge "OOP naming cleanup in l3_dvr_db"
Jenkins [Tue, 28 Apr 2015 07:18:23 +0000 (07:18 +0000)]
Merge "OOP naming cleanup in l3_dvr_db"

9 years agoMerge "Replace BaseLinuxTestCase by BaseSudoTestCase"
Jenkins [Tue, 28 Apr 2015 06:22:46 +0000 (06:22 +0000)]
Merge "Replace BaseLinuxTestCase by BaseSudoTestCase"

9 years agoMerge "Add weak reference test for callback manager"
Jenkins [Tue, 28 Apr 2015 06:22:23 +0000 (06:22 +0000)]
Merge "Add weak reference test for callback manager"

9 years agoMerge "Remove backward compatibility for check_is_admin"
Jenkins [Tue, 28 Apr 2015 06:05:46 +0000 (06:05 +0000)]
Merge "Remove backward compatibility for check_is_admin"

9 years agoSuppress exception when trying to remove non existing device in SNAT redirect
Gal Sagie [Mon, 30 Mar 2015 07:40:36 +0000 (10:40 +0300)]
Suppress exception when trying to remove non existing device in SNAT redirect

L3 service plugin first calls to remove_router_interface from the L2 OVS agent
which delete this port from OVS and then the service plugin calls
to remove the router interface from L3 agent.

Catch the exception thrown on the delete gateway, if its due to device doesn't exists
ignore the exception

Closes-Bug: #1435012
Change-Id: Ieeaa01e7c0393f5200d1a8d2bbbc16befe7699a2

9 years agoMerge "Add missing interface to populate subnets method"
Jenkins [Tue, 28 Apr 2015 02:19:01 +0000 (02:19 +0000)]
Merge "Add missing interface to populate subnets method"

9 years agoRun radvd as root
Henry Gessau [Mon, 27 Apr 2015 13:59:21 +0000 (09:59 -0400)]
Run radvd as root

During the refactoring of external process management radvd lost
its root privileges.

Closes-bug: 1448813

Change-Id: I84883fe81684afafac9b024282a03f447c8f825a

9 years agoSupport multiple IPv6 prefixes on internal router ports for an HA Router
sridhargaddam [Mon, 20 Apr 2015 10:29:54 +0000 (10:29 +0000)]
Support multiple IPv6 prefixes on internal router ports for an HA Router

As part of BP multiple IPv6 prefixes, we can have multiple IPv6 prefixes on
router internal ports. Patch, I7d4e8194815e626f1cfa267f77a3f2475fdfa3d1, adds
the necessary support for a legacy router.

For an HA router, instead of configuring the addresses on the router internal
ports we should be updating the keepalived config file and let keepalived
configure the addresses depending on the state of the router.

Following are the observations with the current code for an HA router.
1. IPv6 addresses are configured on the router internal ports (i.e., qr-xxx)
   irrespective of the state of the router. As the same IP is configured on multiple
   ports you will notice dadfailed status on the ports.
2. Keepalived configuration is not updated with the new IPv6 addresses.

This patch addresses the above issues for an HA Router.

Closes-Bug: #1446161
Partially-implements: blueprint multiple-ipv6-prefixes
Change-Id: Icb9a0e4e6e5deafbdc0135ce7e6b100b1725df66

9 years agoNot creating HA router when not enough l3 agents
Xu Han Peng [Thu, 9 Apr 2015 05:46:36 +0000 (01:46 -0400)]
Not creating HA router when not enough l3 agents

Currently a HA router can be successfully created even when
there is not enough active l3 agent. Current code only checks
existing l3 agents but does not check if the agent is already
down.

This patch fixes this problem by checking only active l3 agents
when getting the number of agents for scheduling HA router.

Closes-Bug: 1420117

Change-Id: I6c1d108db1a7c93b61c0dd0b1ffee319a411b17a

9 years agoEliminate extra queries used to retrieve gw_ports
Kevin Benton [Fri, 17 Apr 2015 11:54:41 +0000 (04:54 -0700)]
Eliminate extra queries used to retrieve gw_ports

The _get_sync_routers method was calling get_routers and
then getting the gateway ports from the db in a separate
get_ports call. This extra call is unnecessary since is
already an SQL relationship directly between the router
and it's gw_port.

This patch eliminates all of the additional gw_port retrieval
logic by replacing the get_routers call with a _get_collection
call to make use of the gw_port object already present on
each router object.

Change-Id: I478bfef8b0273b343aa72bcd6787a486eba4f006
Partial-Bug: #1445412

9 years agoDon't update port with host id of None
Kevin Benton [Fri, 17 Apr 2015 11:09:48 +0000 (04:09 -0700)]
Don't update port with host id of None

In the L3 RPC code if the host for a port is not
present, it ends up calling update_port with the
host_id set to None. This does not update the host
id at all because it's treated as an unset attribute
which leads to the same thing happening on the next
iteration. These pointless update calls are expensive
because they involve a semaphore and calls to mechanism
drivers.

This patch adjusts the logic to only send a port
update if it actually has a host to ensure is on
the port.

Change-Id: Ic55496dd2ba3abcef0a2de9fc8699c391b79fa51
Partial-Bug: #1445412

9 years agofix l3-agent restart with last runtime fip for dvr
lzklibj [Sat, 21 Mar 2015 16:58:15 +0000 (09:58 -0700)]
fix l3-agent restart with last runtime fip for dvr

In DVR enabled environment, after we associated a floating
IP to a VM, when we restart L3-agent on the same compute
node, the L3-agent will miss to create rtr_fip_subnet for
router_info. The previous floating IP can still work, but
new associated floating IPs to VMs related to the same router
on this L3-agent will fail to configure and not work. This
patch will fix this.

The method create_dvr_fip_interfaces in dvr_router.py will
invoke fip_ns.create_rtr_2_fip_link, and the later one will
create rtr_fip_subnet, consider VMs related to the same router
will share the same rtr_fip_subnet, so processing here should
run only once for those VMs, once rtr_fip_subnet is created.
Current code will check dist_fip_count then decide to invoke
fip_ns.create_rtr_2_fip_link or not.

dist_fip_count should be zero if a router related VMs never
have been associated with any floating IPs before. But if a
router has floating IPs associated to its related VMs, after
it is restared, dist_fip_count will be non-zero, and this is
the point this patch try to fix. And for case rtr_fip_subnet
has been created, both dist_fip_count and is_fisrt will be
false, and fip_ns.create_rtr_2_fip_link will be no more need
to be invoked.

Change-Id: I3786eab86755a403991728ccb72d03f159ff8b63
Closes-Bug: 1434824

9 years agoReplace unnecessary call to get_sync_routers
Kevin Benton [Fri, 17 Apr 2015 11:51:26 +0000 (04:51 -0700)]
Replace unnecessary call to get_sync_routers

Replaces a call to get_sync_routers with a single-column
router DB query in a method that doesn't use any of the
gateway information get_sync_routers spends extra
time populating.

Change-Id: I35eae975209316aad6b2c97c909dce385729864d
Partial-Bug: #1445412

9 years agoMerge "Spawn RADVD only in the master HA router"
Jenkins [Fri, 24 Apr 2015 21:24:04 +0000 (21:24 +0000)]
Merge "Spawn RADVD only in the master HA router"

9 years agoMerge "Imported Translations from Transifex"
Jenkins [Fri, 24 Apr 2015 21:12:43 +0000 (21:12 +0000)]
Merge "Imported Translations from Transifex"

9 years agoReplace BaseLinuxTestCase by BaseSudoTestCase
Cedric Brandily [Thu, 5 Mar 2015 21:43:09 +0000 (21:43 +0000)]
Replace BaseLinuxTestCase by BaseSudoTestCase

BaseLinuxTestCase provides 2 methods which are used once/three time(s),
this change inlines these methods and removes BaseLinuxTestCase and
replaces it by BaseSudoTestCase.

Change-Id: I2b60abf55193f535fc7d7637bcb2f15c6a372a87

9 years agoMerge "Fix MismatchError to nondeterministic order for list of controllers"
Jenkins [Fri, 24 Apr 2015 19:34:11 +0000 (19:34 +0000)]
Merge "Fix MismatchError to nondeterministic order for list of controllers"

9 years agoRemove RecursivePermDirFixture useless cleanup
Cedric Brandily [Fri, 24 Apr 2015 19:20:40 +0000 (21:20 +0200)]
Remove RecursivePermDirFixture useless cleanup

This change removes a useless cleanup in RecursivePermDirFixture:
previously RecursivePermDirFixture reverts permission changes on
directories, but the cleanup is useless as directories are provided
by TempDir.

Change-Id: I76c8dbefe3b42ec34a50fb164b9cbc25f4ac4245

9 years agoMerge "Don't resync on DHCP agent setup failure"
Jenkins [Fri, 24 Apr 2015 19:03:13 +0000 (19:03 +0000)]
Merge "Don't resync on DHCP agent setup failure"

9 years agoMerge "Replace BaseIPVethTestCase by FakeMachine"
Jenkins [Fri, 24 Apr 2015 17:25:49 +0000 (17:25 +0000)]
Merge "Replace BaseIPVethTestCase by FakeMachine"

9 years agoUtilities for building/parsing netns names to facilitate testing
Carl Baldwin [Mon, 20 Apr 2015 22:15:46 +0000 (22:15 +0000)]
Utilities for building/parsing netns names to facilitate testing

Creating these utilities allows functional tests to mock them out more
easily to in order to change the namespace identification and cleanup
behavior.

Change-Id: I76cb2dc43a0ca4a7ea27c2ea71b27068b92154ce
Related-Bug: #1446261

9 years agoFix MismatchError to nondeterministic order for list of controllers
armando-migliaccio [Fri, 24 Apr 2015 16:27:40 +0000 (09:27 -0700)]
Fix MismatchError to nondeterministic order for list of controllers

The list of controllers returned by the ovsdb server can be in any order,
therefore we can't assert likes for likes. Assert the sorted lists instead.

Change-Id: Ice3bb8cc0b3da70f8c9aae50d8cdae2b474ff49b
Closes-bug: #1448202

9 years agoMerge "Neutron to Drop Router Advts from VM ports"
Jenkins [Fri, 24 Apr 2015 16:05:44 +0000 (16:05 +0000)]
Merge "Neutron to Drop Router Advts from VM ports"

9 years agoMerge "Block subnet create with mismatched IP versions"
Jenkins [Fri, 24 Apr 2015 16:00:37 +0000 (16:00 +0000)]
Merge "Block subnet create with mismatched IP versions"

9 years agoMerge "OVS_LIB API addition - change bridge controller connection-mode"
Jenkins [Fri, 24 Apr 2015 15:06:49 +0000 (15:06 +0000)]
Merge "OVS_LIB API addition - change bridge controller connection-mode"

9 years agoAdd missing interface to populate subnets method
Kevin Benton [Fri, 24 Apr 2015 13:52:21 +0000 (06:52 -0700)]
Add missing interface to populate subnets method

Change Ib46f685d72eb61ecbaa2869e28fb173cd6d49552 introduced
and optimization to defer the lookup of interface subnet info
until all of the router interfaces were collected. However,
it didn't add the DVR SNAT interface to the list of interfaces
to populate subnet info so it broke DVR.

This patch corrects the behavior by adding the DVR SNAT interface
to the list of ports that need subnet info populated.

Change-Id: I32054ff00bf6992c5dedd21735b6d2afd15c5fb3

9 years agoMerge "Refactor socket ssl wrapping"
Jenkins [Fri, 24 Apr 2015 12:59:34 +0000 (12:59 +0000)]
Merge "Refactor socket ssl wrapping"

9 years agoRefactor socket ssl wrapping
Elena Ezhova [Tue, 7 Apr 2015 11:54:45 +0000 (14:54 +0300)]
Refactor socket ssl wrapping

Move socket wrapping into a separate method in order to separate
its logic from other action done in _get_socket. Now, ssl wrapping
is applied to the socket returned by _get_socket method.
Additionally checks for ssl config options are now performed during
init and not each time wrap_socket is called.

Added unit tests.

Related-Bug: #1276694
Change-Id: I706517ae351a7a681623ec91c9657a2f61cd2679

9 years agoDon't resync on DHCP agent setup failure
Kevin Benton [Fri, 24 Apr 2015 07:35:31 +0000 (00:35 -0700)]
Don't resync on DHCP agent setup failure

There are various cases where the DHCP agent will try to
create a DHCP port for a network and there will be a failure.
This has primarily been caused by a lack of available IP addresses
in the allocation pool. Trying to fix all availability corner cases
on the server side will be very difficult due to race conditions between
multiple ports being created, the dhcp_agents_per_network parameter, etc.

This patch just stops the resync attempt on the agent side if a failure
is caused by an IP address generation problem. Future updates to the subnet
will cause another attempt so if the tenant does fix the issue they will
get DHCP service.

Change-Id: I0896730126d6dca13fe9284b4d812cfb081b6218
Closes-Bug: #1447883

9 years agoReplace BaseIPVethTestCase by FakeMachine
Cedric Brandily [Sun, 1 Mar 2015 23:05:36 +0000 (23:05 +0000)]
Replace BaseIPVethTestCase by FakeMachine

This change removes BaseIPVethTestCase class and moves Pinger class to
allow its use from a fake machine.

Change-Id: I0636f11a327e9535828e7b52e60195e52831a0b2

9 years agoMerge "ovs_lib: Fix a race between get_port_tag_dict and port removal"
Jenkins [Fri, 24 Apr 2015 08:27:44 +0000 (08:27 +0000)]
Merge "ovs_lib: Fix a race between get_port_tag_dict and port removal"

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Fri, 24 Apr 2015 06:13:56 +0000 (06:13 +0000)]
Imported Translations from Transifex

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

Change-Id: Ib7e961af3fe219179b3c6847f8fec785ad040351

9 years agoMerge "ARP spoofing patch: Low level ebtables integration"
Jenkins [Fri, 24 Apr 2015 04:58:33 +0000 (04:58 +0000)]
Merge "ARP spoofing patch: Low level ebtables integration"

9 years agoMerge "Block allowed address pairs on other tenants' net"
Jenkins [Fri, 24 Apr 2015 04:58:19 +0000 (04:58 +0000)]
Merge "Block allowed address pairs on other tenants' net"

9 years agoAllow plugin to specify router_id
Aaron Rosen [Wed, 4 Mar 2015 21:34:26 +0000 (13:34 -0800)]
Allow plugin to specify router_id

It is useful to allow the backend to specify the uuid that we want neutron to
use. We currently do this same thing for networks. This patch enables the same
behavior for routers as well.

Change-Id: If675dfd2997217886976301270ef5f773ffa7a13

9 years agoMerge "Fix incorrect query for user ip allocations"
Jenkins [Fri, 24 Apr 2015 04:38:08 +0000 (04:38 +0000)]
Merge "Fix incorrect query for user ip allocations"

9 years agoNeutron to Drop Router Advts from VM ports
sridhargaddam [Mon, 8 Dec 2014 16:11:38 +0000 (16:11 +0000)]
Neutron to Drop Router Advts from VM ports

As part of Spoofing filter chain Neutron drops all the outbound
traffic where MAC/IP does not match the IP address assigned
to the VM ports (inc' allowed_address_pairs). Along with this,
we also drop traffic associated to dhcp[v6] server (i.e., do
not allow a VM to run dhcp[v6] server). Currently we do not
have any rules to drop Router Advts from VM ports. This can create
issues in the network as other devices in the network may not have
any protection for this kind of stuff.

Even if we allow RAs from the VM ports, because of the Anti-Spoofing
rules that are applied, a VM cannot act as a IPv6 router (i.e., it
cannot forward IPv6 traffic). So there is no point in allowing Router
Advts from VMs assuming that it would be useful in Service VM use-cases.
In order to properly implement IPv6 router as a Service VM, one needs
to use the port_security_extension [1] which allows us to disable
security group rules/anti-spoofing filters on the VM ports.

[1]https://review.openstack.org/#/c/99873/22/specs/kilo/ml2-ovs-portsecurity.rst

This patch disables Router Advts from VM ports.

Closes-Bug: #1372882
Change-Id: I8db5d6dbe60bf04f4e3754a886c6aa8a97a16bab

9 years agoMerge "Fix L3 agent functional tests random failures"
Jenkins [Fri, 24 Apr 2015 01:16:40 +0000 (01:16 +0000)]
Merge "Fix L3 agent functional tests random failures"

9 years agoMerge "Add block name to switch config options for MLX plug-ins."
Jenkins [Fri, 24 Apr 2015 01:09:06 +0000 (01:09 +0000)]
Merge "Add block name to switch config options for MLX plug-ins."

9 years agoFix L3 agent functional tests random failures
Assaf Muller [Thu, 23 Apr 2015 17:43:29 +0000 (13:43 -0400)]
Fix L3 agent functional tests random failures

The test_ha_router_failover tests were not being unmocked. This
is because the same object was being mocked twice, but unmocked
once. The mock.patch.stopall call in the tests base class was rewinding
the value of the object from the second mock to the first mock.

Follow up tests in the same worker were using namespace
names defined via the first mock in the failover test.

Closes-Bug: #1446261
Change-Id: I8f24b8bb3a6a501dbe210c2cc67c47fa4b76257c

9 years agoMerge "Refactor RESOURCE_ATTRIBUTE_MAP cleanup"
Jenkins [Thu, 23 Apr 2015 18:00:13 +0000 (18:00 +0000)]
Merge "Refactor RESOURCE_ATTRIBUTE_MAP cleanup"

9 years agoMerge "Log RPC initialization in L3 service plugin and ML2"
Jenkins [Thu, 23 Apr 2015 17:47:39 +0000 (17:47 +0000)]
Merge "Log RPC initialization in L3 service plugin and ML2"

9 years agoMerge "Change callbacks logging from INFO to DEBUG"
Jenkins [Thu, 23 Apr 2015 17:45:35 +0000 (17:45 +0000)]
Merge "Change callbacks logging from INFO to DEBUG"

9 years agoMerge "Fix DVR functional tests resources leak"
Jenkins [Thu, 23 Apr 2015 17:42:56 +0000 (17:42 +0000)]
Merge "Fix DVR functional tests resources leak"

9 years agoMerge "Simplify keepalived.virtual_routes"
Jenkins [Thu, 23 Apr 2015 17:39:27 +0000 (17:39 +0000)]
Merge "Simplify keepalived.virtual_routes"

9 years agoMock report_state during L3 agent functional tests
Assaf Muller [Wed, 22 Apr 2015 16:04:42 +0000 (12:04 -0400)]
Mock report_state during L3 agent functional tests

Less spam, yay!

Change-Id: I0a6162057f968511b200713359afdc54b107fc39

9 years agoRemove backward compatibility for check_is_admin
Salvatore Orlando [Fri, 17 Apr 2015 23:59:42 +0000 (16:59 -0700)]
Remove backward compatibility for check_is_admin

This routine in policy.py used to have a backward compatibility
check to ensure proper behaviour even when the policy.json file
did not have a specific 'context_is_admin' policy.
However, this backward compatibility check does not work. It
appears indeed that it has been broken for several release cycles;
it is also possible that actually it never worked.
When the 'context_is_admin' policy is not in the policy.json file
the enforcer simply ends up evaluating whatever is the default
policy configured there.

Therefore this patch:
- Removes the backward compatibility check, since it does not work
- Fails, for safety, check_is_admin if 'context_is_admin' policy is
  not specified
- Fixeds check_is_advsvc in the same way (the backward compatibility
  check never made any sense for this function)
- Fixes unit tests adding appropriate tests for check_is_admin and
  check_is_advsvc

Change-Id: Ia47e5781d86a3f21b9d837c9ac70a62ac435d20b
Closes-Bug: #1445690

9 years agoMerge "Add security groups events"
Jenkins [Thu, 23 Apr 2015 14:08:25 +0000 (14:08 +0000)]
Merge "Add security groups events"

9 years agoAdd weak reference test for callback manager
Kevin Benton [Tue, 21 Apr 2015 11:28:27 +0000 (04:28 -0700)]
Add weak reference test for callback manager

Adds a unit test to make sure the callback manager can
have weakly referenced functions as callbacks.

Change-Id: Ic811e8fe63bcde2d89cdb39f9a641cde1ebd9ddb

9 years agoSpawn RADVD only in the master HA router
sridhargaddam [Wed, 8 Apr 2015 10:57:19 +0000 (10:57 +0000)]
Spawn RADVD only in the master HA router

Currently radvd is spawned in all the HA routers irrespective of the
state of the router. This approach has the following issues.

1. While processing the internal router ports (i.e., qr-xxx), ha_router
   removes the LLA of the interface and adds it as a VIP to Keepalived conf.
   Radvd daemon is spawned after this operation in the router namespace
   (if the port is associated with any IPv6 subnets). Radvd notices that
   qr-xxx interface does not have the LLA, so does not transmit any Router
   Advts. In this state, VMs fail to acquire IPv6 addresses because of the
   missing RAs. Radvd does not recover even after keepalived configures the
   LLA of the interface. The only solution is to restart/reload radvd daemon.
   Currently keepalived-state-change monitor does not do any radvd related
   operations when a state transition happens. So we endup in this state
   forever.
2. For all the routers in Backup state, qr-xxx interface does not have LLA
   as it is managed by keepalived and configured only on the Master HA router.
   In such agents syslog is flooded with the messages [1] and this can cause
   loss of other useful info.
   [1] - resetting ipv6-allrouters membership on qr-2e373555-97

This patch implements the following.
1. If the router is already in the Master state, we configure the LLA as a VIP
   in keepalived conf but do not delete the LLA of the internal interface.
2. We spawn radvd only if the router is in the Master State.
3. Keepalived-state-change monitor takes care of enabling/disabling radvd upon
   state transitions.

Closes-Bug: #1440699
Change-Id: I351c71d058170265bbb8b56e1f7a3430bd8828d5

9 years agoMerge "L3 DB: Defer port DB subnet lookups"
Jenkins [Thu, 23 Apr 2015 09:52:30 +0000 (09:52 +0000)]
Merge "L3 DB: Defer port DB subnet lookups"

9 years agoMerge "Remove dependency on weak reference for registry callbacks"
Jenkins [Thu, 23 Apr 2015 08:01:44 +0000 (08:01 +0000)]
Merge "Remove dependency on weak reference for registry callbacks"

9 years agoMerge "Ensure metadata network works with DVR"
Jenkins [Thu, 23 Apr 2015 07:43:44 +0000 (07:43 +0000)]
Merge "Ensure metadata network works with DVR"

9 years agoMerge "Restrict subnet create/update to avoid DHCP resync"
Jenkins [Thu, 23 Apr 2015 05:18:19 +0000 (05:18 +0000)]
Merge "Restrict subnet create/update to avoid DHCP resync"

9 years agoMerge "Only update MTU in update code for MTU"
Jenkins [Thu, 23 Apr 2015 04:11:52 +0000 (04:11 +0000)]
Merge "Only update MTU in update code for MTU"

9 years agoMerge "tests: confirm that _output_hosts_file does not log too often"
Jenkins [Thu, 23 Apr 2015 03:52:05 +0000 (03:52 +0000)]
Merge "tests: confirm that _output_hosts_file does not log too often"

9 years agoRestrict subnet create/update to avoid DHCP resync
watanabe.isao [Wed, 15 Apr 2015 06:48:08 +0000 (15:48 +0900)]
Restrict subnet create/update to avoid DHCP resync

As we know, IPs in subnet CIDR are used for
1) Broadcast port
2) Gateway port
3) DHCP port if enable_dhcp is True, or update to True
4) Others go into allocation_pools
Above 1) to 3) are created by default, which means if CIDR doesn't
have that much of IPs, subnet create/update will cause a DHCP resync.

This fix is to add some restricts to the issue:
A) When subnet create, if enable_dhcp is True, /31 and /32
   cidrs are forbidden for IPv4 subnets while /127 and /128 cidrs are
   forbidden for IPv6 subnets.
B) When subnet update, if enable_dhcp is changing to True and there are no
   more IPs in allocation_pools, the request should be denied.

Change-Id: I2e4a4d5841b9ad908f02b7d0795cba07596c023d
Co-authored-by: Andrew Boik <dboik@cisco.com>
Closes-Bug: #1443798

9 years agoMake sure OVS restarts when Exception occurred
watanabe.isao [Thu, 2 Apr 2015 01:54:56 +0000 (10:54 +0900)]
Make sure OVS restarts when Exception occurred

This fix let flows in br-tun automatically recover from an Exception,
which is an ideal situation.
Simplly improve a missed flag will make sure OVS restart properly
after we walked out of Exception loop.

Change-Id: Id0ac9399ec39fef19ce71566670ed245c681192e
Closes-Bug: #1439472