Files
vmware-nsx/quantum/plugins/openvswitch/common/config.py
Bob Kukura fb7fae34b1 Add enable_tunneling openvswitch configuration variable
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.

Change-Id: I149db182dd132cc05802dcb20c6b552e293664a5
2012-09-10 22:34:57 -04:00

60 lines
2.0 KiB
Python

# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from quantum.openstack.common import cfg
DEFAULT_BRIDGE_MAPPINGS = []
DEFAULT_VLAN_RANGES = []
DEFAULT_TUNNEL_RANGES = []
database_opts = [
cfg.StrOpt('sql_connection', default='sqlite://'),
cfg.IntOpt('sql_max_retries', default=-1),
cfg.IntOpt('reconnect_interval', default=2),
]
ovs_opts = [
cfg.StrOpt('integration_bridge', default='br-int'),
cfg.BoolOpt('enable_tunneling', default=False),
cfg.StrOpt('tunnel_bridge', default='br-tun'),
cfg.StrOpt('local_ip', default='10.0.0.3'),
cfg.ListOpt('bridge_mappings',
default=DEFAULT_BRIDGE_MAPPINGS,
help="List of <physical_network>:<bridge>"),
cfg.StrOpt('tenant_network_type', default='local',
help="Network type for tenant networks "
"(local, vlan, gre, or none)"),
cfg.ListOpt('network_vlan_ranges',
default=DEFAULT_VLAN_RANGES,
help="List of <physical_network>:<vlan_min>:<vlan_max> "
"or <physical_network>"),
cfg.ListOpt('tunnel_id_ranges',
default=DEFAULT_TUNNEL_RANGES,
help="List of <tun_min>:<tun_max>"),
]
agent_opts = [
cfg.IntOpt('polling_interval', default=2),
cfg.StrOpt('root_helper', default='sudo'),
cfg.BoolOpt('rpc', default=True),
]
cfg.CONF.register_opts(database_opts, "DATABASE")
cfg.CONF.register_opts(ovs_opts, "OVS")
cfg.CONF.register_opts(agent_opts, "AGENT")