Move models for mac learning and logical services extensions
into the module neutron.plugins.vmware.dbexts.nsx_models
This patch is part of a set of minor refactorings in the NSX plugin
which will then lead to a semi-full decomposition by the end of
the Kilo release cycle.
This patch introduces a new module for hosting NSX DB model classes,
and populates it with models for the 'network gateway' extension,
which are then removed from the model hosting the network gateway
mixin.
This patch is part of a set of minor refactorings in the NSX plugin
which will then lead to a semi-full decomposition by the end of
the Kilo release cycle.
Carl Baldwin [Tue, 27 Jan 2015 22:34:06 +0000 (22:34 +0000)]
Move ha router functionality from the agent to ha_router
This was pretty much a mechanical change. Most of the methods passed
in ri as the first argument and so changing the way they're called was
a simple matter of replacing self with ri. In the methods themselves,
I first made sure that self was not referenced for anything that
wasn't available in the router context and then replaced ri with self.
Add requirements.txt file for OpenDaylight Mech Driver
Move the driver into its own module, but make the change
backward compatible so that we don't break the ODL driver
counterpart (which will use the new module when [1] merges).
Doug Wiegley [Wed, 28 Jan 2015 03:17:00 +0000 (20:17 -0700)]
Mechanisms to move extensions and config into service repos
- Extensions will automatically be loaded from service repos in addition
to neutron proper, but neutron proper will take precedence.
- Config entries for service repos will be read out of neutron-{service}.conf
first, and then neutron.conf. After Kilo, they will be read only from
neutron-{service}.conf.
- Service providers for drivers will be collected from all neutron conf files.
This is review 1 of 3. The second set will be in the server repos, moving
the extensions. The third will be in neutron, removing the service exts.
Sukhdev [Tue, 20 Jan 2015 18:37:33 +0000 (10:37 -0800)]
Thining Arista ML2 driver from neutron tree
Moving all the back-end drivers for the Arista
ML2 driver. The DB Models and Config is
left in the tree. Rest all is moving to
networking-arista project.
Reorganize the code to ensure a smoother transition
to a decomposed Arista ML2 driver.
Miguel Angel Ajo [Mon, 18 Aug 2014 11:00:58 +0000 (13:00 +0200)]
Implements the ProcessMonitor in the l3_agent
The ProcessMonitor class will watch over spawned external processes,
taking the administrator configured action in the case of any
of the external processes dying unexpectedly.
It covers both the neutron-ns-metadata-proxy for non-ha routers
and the IPv6 radvd external processes. Keepalived +
neutron-ns-metadata-proxy needs to be covered in a second follow up
patch when neutron-ns-metadata-proxy is handled by the l3-agent
(instead keepalived) in the ha-routers.
Moshe Levi [Sun, 11 Jan 2015 13:25:59 +0000 (15:25 +0200)]
Thin MLNX ML2 mechanism driver and agent
This commit thins the in-tree MLNX ML2 MechanismDriver and Agent. A matching
change to the stackforge/networking-mlnx project has the backend logic
there.
Ann Kamyshnikova [Fri, 12 Dec 2014 12:30:06 +0000 (15:30 +0300)]
Default security group table
This change prevents the race condition by enforcing a single default
security group via new table default_security_group. It has tenant_id
as primary key and security_group_id, which is id of default
security group. Migration that inroduces this table has sanity check that
verifies that there is no duplicate default security group in any
tenant.
This idea has come up from discussion in comments to
https://review.openstack.org/135006
Do not check twice IP allocations for auto-address subnets
For auto-address subnets such as those with SLAAC and DHCP_STATELESS
address modes it is ok to delete them even when there are active IP
allocations.
The current logic might trigger unexpected 409 errors if IP
allocations are made on these subnets concurrently with their
deletion.
This patch simply ensures the final check for active IP allocations is
not performed for this class of subnets; since all IP allocations will
be removed anyway, it does not make sense to check whether there are
allocations at all. In fact, doing this check might cause a failure
of the delete operation if an IP allocation is made concurrently.
This patch also factors out the logic for checking whether there are
IP allocations on the subnet to avoid code duplication.
Carl Baldwin [Wed, 28 Jan 2015 17:50:31 +0000 (17:50 +0000)]
Make the interface driver available to the router classes
Ultimately, it will only be the routers that need access to the
interface driver and the agent won't need to use it for anything.
However, it still makes sense for the agent to initialize it once and
pass it to each of the routers as they're created.
Multiple patches with multiple authors will be created to depend on
this addition.
Carl Baldwin [Tue, 20 Jan 2015 16:48:47 +0000 (16:48 +0000)]
Make agent config available to the router classes
Since the agent and the routers are all configured in the same config
file, the routers are going to need access to the agent's config.
This work will support multiple future patches.
Yoni Shafrir [Mon, 26 Jan 2015 07:32:55 +0000 (09:32 +0200)]
Allow 'max_l3_agents_per_router' to be set to '0'
Currently the field 'max_l3_agents_per_router' from
'neutron.conf' cannot be set to '0' even though the comments
and code indicate it is be supported. The value
means 'unlimited' agents per router is allowed on HA routers.
This patch adds a special handling for this value when validating
the config. When a value of '0' is used, the further validation
of max value is skipped.
Kyle Mestery [Mon, 26 Jan 2015 15:12:31 +0000 (15:12 +0000)]
Add abandon script from nova
This adds the abandon_old_reviews.sh from the nova repository into
Neutron. This is handy for cleaning up the neutron review queues
by abandoning stale reviews stuck in the queue with a helpful
message.
Miguel Angel Ajo [Tue, 27 Jan 2015 11:52:30 +0000 (11:52 +0000)]
Refactor the ProcessMonitor _exit_handler to ProcessMonitor
We allowed to provide an specific _exit_handler, but in
the end all the implementations are providing the same
one. So, now it's refactored back to the monitor, and
removed any YAGNI code.
Brings in VLAN underlay support for
distributed virtual router. In line with
it brings in the ability to route packets
between VLAN and VXLAN (or) VLAN and GRE
networks via distributed virtual routers.
Lucian Petrut [Mon, 26 Jan 2015 18:58:18 +0000 (20:58 +0200)]
Fixes Hyper-V agent root_helper issue
This patch I2aaa55e8e539e47427e56b4da42321cfcfcde622 introduced a
reference to the root_helper config option in the Hyper-V Neutron
agent without it being registered. For this reason,
the Hyper-V Neutron agent fails to start.
As the root helper is not used by the Hyper-V Neutron agent,
all the occurences within the agent can be safely removed.
Brian Haley [Tue, 25 Nov 2014 02:33:20 +0000 (21:33 -0500)]
Add address family to 'ip rule' calls
Without an address family, 'ip rule' won't work with IPv6
arguments because it assumes IPv4. This causes the l3-agent
to throw an error when adding a rule in DVR mode.
Also changed these functions to be more symmetrical and take the
same arguments, which required a little tweaking, but it looks
much cleaner now.
Terry Wilson [Tue, 23 Dec 2014 20:49:15 +0000 (13:49 -0700)]
Add OVSDB abstract API
Abstract all existing run_vsctl calls to an abstract OVSDB API.
This will allow the future addition of a native OVSDB protocol
implementation of the API without breaking backward compatibility.
Jakub Libosvar [Fri, 3 Oct 2014 16:31:10 +0000 (18:31 +0200)]
Add functional tests for IptablesManager using tcp/udp
This commit adds tests for filter table using tcp and udp protocols.
Part of it is a NetcatTester class providing ability to test connection
between two veth pairs in namespaces.
Ihar Hrachyshka [Tue, 20 Jan 2015 14:18:36 +0000 (15:18 +0100)]
dhcp: move dnsmasq version check to sanity_check
We should avoid checking version numbers in runtime. In that way, we may
break some existing setups by minimal version bumps that are often not
critical for operation. One example is a recent version bump to support
IPv6 DHCP stateful address assignment mode. Even though old dnsmasq
version made this particular mode to fail to assign addresses to
instances, other IPv6 modes, and, even more importantly, all IPv4
networks continued to operate with no issues.
So let's move the fatal check from DHCP agent into sanity_check tool to
avoid potential breakages on neutron update.
In ideal world, we would make the check smarter. Since current version
cap is due to missing hwaddr matching for IPv6 clients for old dnsmasq
versions, we could preconfigure and start up dnsmasq server in a
namespace, and request a IPv6 lease from it. That would require a DHCP
IPv6 client installed though, and I'm not sure we can always expect it
to be present, so leaving it as-is for now.
Since DHCP drivers are pluggable, we cannot drop check_version method
from DhcpBase to support other drivers that may live in the wild.
Note: we could mark the method as deprecated if we really want to get
rid of it.
Russell Bryant [Fri, 23 Jan 2015 18:52:10 +0000 (13:52 -0500)]
Use DVRServerRpcApi instead of a mixin
Replace DVRServerRpcApiMixin with a standalone rpc client class,
DVRServerRpcApi. Also convert the one user of this code (the ovs
agent) to use it. This is a prerequisite to being able to put this
rpc interface into a messaging namespace.
Russell Bryant [Thu, 22 Jan 2015 20:03:19 +0000 (15:03 -0500)]
Scope secgroup rpc api using a messaging namespace
This patch scopes the agent to plugin security group rpc interface
using a messaging namespace. Right now some plugins expose several
interfaces via the default namespace. This effectively means they are
a single API and should be managed with a single version stream. It's
much more managable to just treat these as separate interfaces and
this change makes that explicit and functionally true. Now when a
method is invoked, the only classes considered for handling that
request will be ones marked with the right namespace.
Russell Bryant [Thu, 22 Jan 2015 15:18:17 +0000 (10:18 -0500)]
Add and use SecurityGroupAgentRpc
Add a new class, SecurityGroupAgentRpc, which is based on
SecurityGroupAgentRpcMixin. Most uses of SecurityGroupAgentRpcMixin
follow the same pattern, so this class makes it possible to cut
down on some duplicated code.
Make use of SecurityGroupAgentRpc in: linuxbridge, openvswitch, mlnx,
nec, ofagent, oneconvergence, sriovnicagent, bigswitch, and hyperv.
Ihar Hrachyshka [Sat, 17 Jan 2015 12:57:21 +0000 (13:57 +0100)]
tests: don't spread fixtures.TempDir throughout test cases
Instead, provide self.get_temp_file_path() utility method for tests
interested in creating temporary files.
There also cases when tests are interested in multiple separate
temporary directories. With this in mind, self.get_temp_file_path()
supports root= argument that allows to pass a different temporary
directory fixture than default.
While at it, consolidated cleanup setup for NEC temporary file in single
place.
Mike Kolesnik [Mon, 8 Dec 2014 08:03:05 +0000 (10:03 +0200)]
Extract l2pop/DVR controller logic to common method
Regular ports and DVR ports are treated almost the same, extract the
l2pop logic to treat them to a unified method that gets an argument if
the FDB entries are needed or not, in order to reduce code duplication.