the l3-agent only pushes down some of the DNAT rules for metadata mapping
if there is a gateway set on a router. However, the nova-api server could
itself be running in the local router namespace (or on the same box as
the quantum-l3-agent in the case were namespaces are disabled. In fact,
with namespaces disabled, this is the likely setup for a simple
environment). Thus, we should simply always push down the metadata nat
rules for a router, router than waiting until a gateway is added.
This patch also refactors the actions taken by the l3-agent when a router
is added or removed into a separate function for improved readability,
as add/removing the nat rules made these code segments even longer.
* eval() was previously used to marshall unchecked strings as
filter parameters for QuantumDbPluginV2.get_ports() via
the --fixed_ips flag.
* This change removes the use of eval and cleans up the filtering
implementation for get_ports().
* The new filtering implementation does not support arbitrary
OR'ing or AND'ing. Instead, multiple values for a given filter
key are logically OR'ed, and filters across keys are AND'ed.
* Example usage - filter for .2 or .3 in the given subnet:
This fixes the exceptions occurring in the virtual switch mode of the
Cisco plugin for create/delete/update network operations. The exceptions
were occurring on account of the recent changes in the OVS module to the
get_vlan and get_vlans methods, which were still being invoked here.
Test configuration has been changed to increase the code coverage to
catch such issues in the future. All changes are limited to the Cisco
plugin and related tests.
Currently, setup.py will not copy l3_agent.ini and rootwrap filters
into directory /etc/quantum. Add copy operation in setup.py for those
config files so that those files will be copied into proper directory.
This commit fixes a bug that quantum agent using a namespace does not
work with NEC plugin. NEC plugin uses an Open vSwitch as an OpenFlow switch,
but an OVS port created by ovs-vsctl add-port becomes down when the port is
moved to some network namespace. Usual OpenFlow controllers respect the
OpenFlow port status. Since DHCP server (dnsmasq) is connected to the down
port, DHCP server disappears from the virtual network.
This behavior can be avoided if we use a similar approach used in
BridgeInterfaceDriver, i.e., we first create a veth pair, add one veth device
to OVS and move the other veth device to a network namespace. To accomplish it
this patch introduces a new interface driver OVSVethInterfaceDriver.
In addition, this patch adds a 'prefix' paramter to unplug(). When deleting
a veth pair, a veth device added to OVS bridge is not removed automatically.
Thus we need a mean to know the veth device name from a device_name to be
removed. It is the reason to add 'prefix' parameter to unplug().
The changeset also removed the namespace garbage collection from the port unplug. This
attempts to delete the namespace. This is problematic as there may be additional attributes
to the namespace that need to be dealt with.
writing to the subnets attribute is not supported, so rather than
making it looks like we accept it but ignoring it, we should explicitly
reject requests to specify it on network create/update.
1. The external interface for the linux bridge will be created at run time.
The configuration parameter external_network_bridge should be set as empty.
That is, "external_network_bridge = ". The link between the network and
the physical interface should be done via the provider network parameters.
2. The plug operation for the linux bridge replaces the interface name
prefix with tap. We need to ensure that the prefix length is 3 characters.
Not all systems that support Open vSwitch support its GRE tunneling
feature that is not in the Linux kernel source tree. Therefore, a new
configuration variable, enable_tunneling, applies to both the server
and agent. Its default value is False, so it must be set to True to
enable tunneling for tenant and/or provider networks. If
enable_tunneling is False, the server will not allow creation of GRE
networks, and the agent will not initialize the tunnel bridge and will
log an error if there is an attempt to provision a GRE network. If it
is True, the agent now logs an error and exits if it fails to
initialize the patch ports used for the tunnel bridge. Fixes bug 1045610.
When there is an attempt to provision a flat or VLAN network and the
agent has no bridge mapping configured for a the specified physical
network, the agent will now log an error rather than crash.
An undefined variable in a logging statement has been corrected.
Logging levels for openvswitch have been checked and updated where
necessary, and logging statements now avoid the % string substitution
syntax. Fixes bug 1045592.
The corresponding devstack update has already been merged.
This patch adds a periodic resync check to the DHCP agent that will
resync state with the Quantum server if any notification or rpc errors
have occurred since the last check.
Allows user to invoke L3-agent in a way that limits the agent to
implementing only routers associated with a particular external network.
Thus, it is possible to have a deployment with multiple external networks,
since you can run one agent per external network.
Also makes l3-agent pay attention to router admin_state_up field.
Old behavior meant that any port with device owner starting with
"network:" would be auto-deleted when a network was deleted. We don't
want that behavior for floating IPs or external network gateways.
This provides a model where we explicitly list the set of owners that
should be auto-deleted.
- Also clean up NetworkInUse message to no longer mention 'attachment',
since that is API v1 terminology.
There was a KeyError in the case where we tried to throw an exception
to inform the user that a newly created floating ip could not be
associated with the requested port because they belonged to different
tenants.
In create/update_subnet(), IP address fields (cidr, gateway_ip, host_routes,
dns_nameserver) should be checked whether they are consistent with IP version
specified. IP version check for allocation_pools is already implemented,
so this commit adds IP version checks for other IP fields.
This patch adds 'local' as a new value for provider:network_type,
supported by the openvswitch and linuxbridge plugins. Networks of this
type provide connectivity through a bridge for VMs and agents local to
the host, but no external connectivity. They do not require
provider:physical_network or provider:segmentation_id values. These
local networks are intended mainly to support single-box
zero-configuration testing (including quantum gating), but may have
other uses as well.
For openvswitch, the new OVS.tenant_network_type configuration
variable selects what type of networks are allocated as tenant
(i.e. non-provider) networks. It defaults to 'local', but must be
changed to 'vlan' or 'gre' for openvswitch tenant networks to have
external connectivity. The default value is intended to support
single-box zero-configuration testing without any need to allocate
physical network resources or configure bridges, and without requiring
the operating system to support OVS GRE tunneling. It can also be set
to 'none' to completely disable creation of tenant networks.
For linuxbridge, the new VLANS.tenant_network_type configuration
variable works similarly, with a value of 'vlan' supporting tenant
networks with external connectivity.
With either plugin, administrators can create provider local networks
by specifying "--provider:network_type local". Additionally, with
openvswitch, provider GRE networks can now be created by specifying
"--provider:network_type gre --provider:segmentation_id <tunnel-id>".
A corresponding devstack patch is available at
https://review.openstack.org/#/c/12456/. With this patch, the
openvswitch and linuxbridge plugins are by default configured to
support only local networks. A set of shell variables, documented in
stack.sh, can be set in localrc to configure remote connectivity,
including bridges/interfaces available for provider networks.
The unit tests were calling a nonexistent assert_called() on the
mocks. This patch fixes the problem by using the correct assert for
checking that the mocked method was invoked.
Note: This patch does not fix the error in test_call_driver() because a
separate bug fix revises the test.