Bob Kukura [Fri, 5 Oct 2012 15:50:39 +0000 (11:50 -0400)]
Initial Modular L2 plugin implementation.
The Modular L2 Plugin uses drivers to support separately extensible
sets of network types and of mechanisms for accessing networks of
those types. This is an initial implementation that has been tested
with the openvswitch and linuxbridge agents, and should also work with
the hyperv agent. See quantum/plugins/ml2/README for details.
This patch introduces an API extension for enabling or disabling
source/destination NAT on the router gateway interface, and implements
support for this extension in the l3 agent, which has also been
refactored in order to ensure SNAT rules are applied (or removed)
in a single place in the process_router routine.
The patch therefore enables the extension on all plugins which
leverage this agent.
In this patch the validate_boolean function is re-introduced, as it
used for validating a field of the external_gateway_info dict.
The resource extension process is also slightly changed so that an
API extension can specify which extension should be processed before
its attributes can be processed. This is needed to ensure the
proper validator for external_gateway_info is installed.
Mukul [Fri, 24 May 2013 18:02:12 +0000 (23:32 +0530)]
Added conversion specifier for proper log
In function create_for_sg_rule conversion specifier after string varaible
"rule_id" was missed. It was causing an error during translation of debug
message due to unavailability of conversion specifier. Included proper
conversion specifier for getting proper debug log.
Clark Boylan [Wed, 22 May 2013 21:44:48 +0000 (14:44 -0700)]
Perform a sync with oslo-incubator.
This oslo-incubator sync pulls in a new log.py which will make quantum's
default log output format the same as nova, glance and cinder (once
cinder's corresponding oslo sync merges). This common log format
simplifies log indexing as part of CI and makes lives easier for
deployers.
This sync does add a requirement on six as jsonutils depends on it. It
updates install_venv_common.py to be python26 compatible. It also brings
in a bunch of recent python3 compatibility that was added to oslo.
Commit 362bd7f switched us from using 'QUOTA' as a config file section
name to using 'quota'.
This broke backwards compatibility support for 'QUOTA' because the
version of oslo.config that has that compat support had not yet been
released. The gory details are summarized here:
This patch adds a read-only attribute to the network gateway API
extension. This attribute will return the list of ports connected to
a gateway, including their segmentation types and ids.
This patch now adds joined load for a gateway's connections, thus
avoiding extra queries to the db.
Previous code simply removed IP allocation for these ports which
should never have an IP. This patch triggers IP recycling so the
IP addresses can be reused by other ports.
Zhongyue Luo [Tue, 21 May 2013 16:37:00 +0000 (00:37 +0800)]
Reference OVS OptGoup names in lowercase
To have consistent option group name format across projects,
oslo.config now normalizes all non lowercase group names to lowercase
when loading conf files.
Thus conf files are backwards compatible but option group references
in the code must now use lowercase before we update oslo.config.
Ryota MIBU [Mon, 20 May 2013 05:36:39 +0000 (14:36 +0900)]
Make logging level in unit tests configurable.
Added a debug option to unittest(BaseTestCase) which sets logging level of
fixtures.FakeLogger to DEBUG. To enable this option, set OS_DEBUG=True or
OS_DEBUG=1 in environment variables.
gessau [Wed, 15 May 2013 01:57:47 +0000 (21:57 -0400)]
Check network vlan ranges for correctness.
Check that the range beginning and end tags are valid values 1-4094.
Supply two global constants for min/max vlan tags and update all
local usage of these values to use the global constants.
Zhongyue Luo [Sat, 18 May 2013 13:52:15 +0000 (21:52 +0800)]
Reference DEFAULT_SERVICETYPE OptGoup names in lowercase
To have consistent option group name format across projects,
oslo.config now normalizes all non lowercase group names to lowercase
when loading conf files.
Thus conf files are backwards compatible but option group references
in the code must now use lowercase before we update oslo.config.
This patch replaces all 'DEFAULT_SERVICETYPE' references to
'default_servicetype'
Zhongyue Luo [Wed, 15 May 2013 00:36:11 +0000 (08:36 +0800)]
Reference QUOTA OptGoup names in lowercase
To have consistent option group name format across projects,
oslo.config now normalizes all non lowercase group names to lowercase
when loading conf files.
Thus conf files are backwards compatible but option group references
in the code must now use lowercase before we update oslo.config.
This patch replaces all 'QUOTA' references to 'quota'
Deprecate "extension:xxx" policies but preserve bw compatibility
Blueprint make-authz-orthogonal
Patch #4 for this blueprint.
With this change, if policies starting with 'extension' are still
present in policy.json, a deprecation warning will be emitted, and
the policy will be translated in the corresponding, new-style,
policy(ies).
fujioka yuuichi [Tue, 14 May 2013 00:01:17 +0000 (09:01 +0900)]
fix reference to tenant id.
Administrator can create resource, even if the tenant of resource is
different from the one of authentication. For example, administrator
can operate 'quantum net-create' command with different tenant
between the authentication tenant(--os-tenant-name) and --tenant-id.
In this case, quota cannot be restricted with the resource tenant,
because it is restricted with --os-tenant-name.
Bob Kukura [Tue, 14 May 2013 21:35:08 +0000 (17:35 -0400)]
Fix linuxbridge RPC message format
The linuxbridge, openvswitch, and hyperv plugins all use the same
basic RPC interface between their plugins and L2 agents. But the
attributes describing a virtual network passed from the plugin to the
agent over this interface differed for historical reasons. The
openvswitch and hyperv plugins each pass network_type,
physical_network, and segmentation_id attributes, whereas the
linuxbridge plugin previously passed vlan_id and physical_network
attributes, using special vlan_id values to indicate flat or local
network types.
This patch changes the linuxbridge plugin to pass network_type and
segmentation_id attributes instead of the vlan_id attribute, bringing
its message formats into sync with the other plugins. RPC
compatibility is required for blueprint modular-l2 so that the ml2
plugin can work with all three existing types of L2 agent. This RPC
message format change is also required for blueprint
vxlan-linuxbridge.
Unlike the vxlan-linuxbridge patch on which it is based (see
https://review.openstack.org/#/c/26516/), this patch does not bump the
linuxbridge RPC version number, as the ml2 plugin will require all
three L2 agents to use the same RPC version. Instead, the updated
linuxbridge agent maintains compatibility with old linuxbridge plugins
by accepting either the old or new attributes. There is also a
configuration option, currently turned on by default, to enable the
updated linuxbridge plugin to pass the vlan_id attribute expected by
old linuxbridge agents along with the new attributes. These message
format compatibility mechanisms are intended to aid during upgrades,
and can eventually be removed.
VLAN IDs in the range 1006-4094 are considered to be in the extended
range by the Cisco Nexus 3K switch. As such, the 3K rejects any
state change configuration commands for VLANs in this range, including
"state active" and "no shutdown". The errors returned by the 3K for
these commands can be ignored, since the default states for these commands
are acceptable for the 3K.
For the 5K and 7K versions of the Nexus switch, on the other hand, the
"state active" and "no shutdown" commands are required for proper VLAN
configuration, regardless of VLAN ID.
This fix splits the configuration commands which are used to create a
VLAN on the Nexus switch into three separate configurations:
- VLAN creation
- state active
- no shutdown
For the "state active" and "no shutdown" configurations, the Cisco Nexus
plugin will tolerate (ignore) errors involving invalid setting of state
for VLANs in the extended VLAN range. These specific errors can be
identified by looking for the appearance of certain signature strings
in the associated exception's message string, i.e. "Can't modify
state for extended" or "Command is allowed on VLAN".
This approach will yield a very small hit in performance, but the solution
is much less error prone than requiring customers to configure the
Cisco plugin for 3K vs. 5K vs. 7K, or perhaps even specific software
versions of the 3K, in order to inform the Cisco plugin whether
VLAN state configuration commands should be used or not.