lzklibj [Mon, 18 Jan 2016 03:34:31 +0000 (11:34 +0800)]
Remove dead method _get_router_ids
No place is using _get_router_ids, it is dead method now.
And for l3_db.Router related query, it always based on certain
filters, such as on which host, extra attribute is distributed
or HA. While this method cannot fix those requirements.
Method _get_router_ids is created in patch
I35eae975209316aad6b2c97c909dce385729864d , its purpose is to
avoid DB query to fetch full data for routers while only id is
needed. But in patch Ie561b19a2e58a2a563d79b75421e9e24c70f36f9 ,
its caller was removed, but seems we forget to remove this dead
method at that time.
Terry Wilson [Fri, 15 Jan 2016 19:44:14 +0000 (13:44 -0600)]
Move L2populationDbMixin to module-level functions
None of the L2populationDbMixin methods actually use 'self' for
anything. As the class is basically just used as a namespace and
modules already provide that, this patch gets rid of the mixin. This
makes the code simpler and easier to debug as inheritance doesn't buy
us anything in this case.
The OPNFV project [1] is a reference implementation of the
ETSI NFV architecture built on open source components.
OpenStack, and Neutron in particular, are key elements of
this story, and many requirements and issues are driven and
submitted by OPNFV folks that work in both communities.
This tag makes sure that we can keep all of them together for
tracking purposes.
Ryan Moats [Mon, 30 Nov 2015 18:36:54 +0000 (12:36 -0600)]
Refactor router delete processing
The discussion in [2] indicated that [1] would lead to orphaned
items during error cases. This refactoring replaces the
optimistic approach followed by [1] with a separate delete code
path that does not execute the operations that take place within
the namespace that will be removed. Operations that take place
outside of those namespaces are still performed to ensure that
no orphaned items result.
A comment has been added to the functional test to explain what
case is being tested.
[1] https://review.openstack.org/#/c/240971
[2] conversation starting at http://goo.gl/bZgvqW
Change-Id: I663f1264fb3963789b79a4a7c3e46d232b2f0620 Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
Ihar Hrachyshka [Wed, 13 Jan 2016 11:37:21 +0000 (12:37 +0100)]
Make security_groups_provider_updated work with Kilo agents
Initially, we bumped the required version for the agent endpoint from
1.1 (the initial version that implemented security groups) to 1.3
without considering that the code should work with old agents that do
not yet know about the new devices_to_update argument.
Actually, there was no need to bump the version: old agent side code
already captures all unknown arguments that could be passed from the
server, ignoring them:
(^ the link shows the latest Kilo code as of writing)
Note: some people may argue that the approach that is taken in Neutron
to support backwards compatibility for server notifications is wrong,
and we instead should adopt some stricter mechanism like nova version
pinning. While that is a noble thing to do, it's out of scope for the
patch that is designed to be easily backportable to stable/liberty.
Note: some people may also argue that the patch should go straight into
stable/liberty because we don't claim support for rolling upgrade
scenarios that span multiple releases. That's indeed true, though my
take on it is that if we have a way to handle more unofficial scenarios
without more coding effort, it's worth doing it.
Oleg Bondarev [Thu, 17 Dec 2015 11:57:21 +0000 (14:57 +0300)]
Introduce new query to return all hosts for DVR router
When we remove explicit binding of dvr routers to compute nodes
we'll need a way to know all hosts where a dvr router should be
hosted in order to send notifications.
This patch adds such a query and updates l3 rpc notifier to use it.
lzklibj [Wed, 28 Oct 2015 09:02:11 +0000 (17:02 +0800)]
fix get_ha_sync_data_for_host for non-dvr agent
get_ha_sync_data_for_host will call _get_dvr_sync_data
even given agent is not in DVR agent_mode.
_get_dvr_sync_data has additional processing for dvr
like:
dvr_router_ids = set(router['id'] for router in routers
if is_distributed_router(router))
floating_ip_port_ids = [fip['port_id'] for fip in floating_ips
if fip['router_id'] in dvr_router_ids]
which should only work for DVR scenario.
That will increase neutron-server processing time for
non-DVR scenario. Adding logic to judge whether given
agent is in DVR agent_mode, call get_sync_data directly.
Ihar Hrachyshka [Thu, 14 Jan 2016 15:06:20 +0000 (16:06 +0100)]
dhcp: handle advertise_mtu=True when plugin does not set mtu values
DHCP agent may be used by plugins that don't set mtu value for networks.
Handle the case by not passing the DHCP option when network does not
have the value set.
Most plugins do set the value though, since it's enforced in base db
plugin class.