From 92952f016562cb89d1fd0ac320baff0786850aff Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Thu, 16 Feb 2017 02:31:55 -0500 Subject: [PATCH] Clarify that native L3 is always used. Remove all remaining remnants of L3 agent support. Change-Id: Ia9e97837e6eb1a23435f2def74060032ce0e5409 Closes-bug: 1626717 Signed-off-by: Russell Bryant --- devstack/devstackgatekuryrrc | 1 - devstack/lib/networking-ovn | 34 ++++++++++----------------------- devstack/local.conf.sample | 30 +++-------------------------- devstack/override-defaults | 8 +------- devstack/plugin.sh | 6 +++--- devstack/upgrade/upgrade.sh | 4 ---- doc/source/install.rst | 22 +++++++++------------ networking_ovn/common/config.py | 3 +++ 8 files changed, 29 insertions(+), 79 deletions(-) diff --git a/devstack/devstackgatekuryrrc b/devstack/devstackgatekuryrrc index a679569d9..367456353 100644 --- a/devstack/devstackgatekuryrrc +++ b/devstack/devstackgatekuryrrc @@ -23,5 +23,4 @@ export OVERRIDE_ENABLED_SERVICES=kuryr,etcd-server,docker-engine,key,n-api,n-cpu export PROJECTS="openstack/networking-ovn openstack/kuryr $PROJECTS" export DEVSTACK_LOCAL_CONFIG="enable_plugin networking-ovn git://git.openstack.org/openstack/networking-ovn" export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin kuryr http://git.openstack.org/openstack/kuryr" -export DEVSTACK_LOCAL_CONFIG+=$'\n'"OVN_L3_MODE=True" export DEVSTACK_LOCAL_CONFIG+=$'\n'"OVN_NATIVE_DHCP=True" diff --git a/devstack/lib/networking-ovn b/devstack/lib/networking-ovn index cd6eb299f..2639f8f56 100644 --- a/devstack/lib/networking-ovn +++ b/devstack/lib/networking-ovn @@ -75,20 +75,17 @@ OVN_INSTALL_OVS_PYTHON_MODULE=$(trueorfalse False OVN_INSTALL_OVS_PYTHON_MODULE) # configure the DHCP agent MTU option. OVN_GENEVE_OVERHEAD=${OVN_GENEVE_OVERHEAD:-38} -# If using OVN_L3_MODE, this sets whether to create a public network and bridge. +# This sets whether to create a public network and bridge. # If set to True, a public network and subnet(s) will be created, and a router # will be created to route the default private network to the public one. -# Can only be set to True if OVN_L3_MODE is being used (and not q-l3) and -# NEUTRON_CREATE_INITIAL_NETWORKS is True (the default). There are known issues -# setting this to true in a multinode devstack setup OVN_L3_CREATE_PUBLIC_NETWORK=$(trueorfalse False OVN_L3_CREATE_PUBLIC_NETWORK) # ml2/config for neutron_sync_mode OVN_NEUTRON_SYNC_MODE=${OVN_NEUTRON_SYNC_MODE:-log} -# If using OVN_L3_MODE, the type of OVN L3 Scheduler to use. The OVN L3 -# Scheduler determines the hypervisor/chassis where a routers gateway should -# be hosted in OVN. The default OVN L3 scheduler is leastloaded +# The type of OVN L3 Scheduler to use. The OVN L3 Scheduler determines the +# hypervisor/chassis where a routers gateway should be hosted in OVN. The +# default OVN L3 scheduler is leastloaded OVN_L3_SCHEDULER=${OVN_L3_SCHEDULER:-leastloaded} # Neutron directory @@ -169,23 +166,14 @@ function configure_ovn_plugin { export NETWORK_API_EXTENSIONS=$(python -c \ 'from networking_ovn.common import extensions ;\ print ",".join(extensions.ML2_SUPPORTED_API_EXTENSIONS)') - if [[ "$OVN_L3_MODE" == "True" ]]; then - export NETWORK_API_EXTENSIONS=$NETWORK_API_EXTENSIONS,$(python -c \ - 'from networking_ovn.common import extensions ;\ - print ",".join(extensions.ML2_SUPPORTED_API_EXTENSIONS_OVN_L3)') - else - export NETWORK_API_EXTENSIONS=$NETWORK_API_EXTENSIONS,$(python -c \ - 'from networking_ovn.common import extensions ;\ - print ",".join(extensions.ML2_SUPPORTED_API_EXTENSIONS_NEUTRON_L3)') - fi + export NETWORK_API_EXTENSIONS=$NETWORK_API_EXTENSIONS,$(python -c \ + 'from networking_ovn.common import extensions ;\ + print ",".join(extensions.ML2_SUPPORTED_API_EXTENSIONS_OVN_L3)') populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_type_geneve max_header_size=$OVN_GENEVE_OVERHEAD populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_nb_connection="$OVN_NB_REMOTE" populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_sb_connection="$OVN_SB_REMOTE" - populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_l3_mode="$OVN_L3_MODE" populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn neutron_sync_mode="$OVN_NEUTRON_SYNC_MODE" - if [[ "$OVN_L3_MODE" == "True" ]]; then - populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_l3_scheduler="$OVN_L3_SCHEDULER" - fi + populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_l3_scheduler="$OVN_L3_SCHEDULER" populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_native_dhcp="$OVN_NATIVE_DHCP" populate_ml2_config /$Q_PLUGIN_CONF_FILE securitygroup enable_security_group="$Q_USE_SECGROUP" inicomment /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver @@ -209,9 +197,7 @@ function configure_ovn_plugin { fi if is_service_enabled q-l3 ; then - if [[ "$OVN_L3_MODE" == "True" ]]; then - die $LINENO "The q-l3 service must be disabled with OVN_L3_MODE set to True." - fi + die $LINENO "The q-l3 service must be disabled with OVN." fi # NOTE(rtheis): OVN native layer-3 and DHCP services currently lack support @@ -225,7 +211,7 @@ function configure_ovn_plugin { # support, the conventional DHCP agent will be forced to provide # metadata for all networks. iniset $Q_DHCP_CONF_FILE DEFAULT force_metadata True - elif [[ "$OVN_NATIVE_DHCP" == "True" && "$OVN_L3_MODE" == "True" ]]; then + elif [[ "$OVN_NATIVE_DHCP" == "True" ]]; then if is_service_enabled n-cpu ; then iniset $NOVA_CONF DEFAULT force_config_drive True fi diff --git a/devstack/local.conf.sample b/devstack/local.conf.sample index 0747c5152..e554fc3e3 100644 --- a/devstack/local.conf.sample +++ b/devstack/local.conf.sample @@ -30,8 +30,10 @@ enable_service ovn-controller disable_service n-net enable_service q-svc -# We have to disable the neutron L2 agent. OVN does not use the L2 agent. +# Disable Neutron agents not used with OVN. disable_service q-agt +disable_service q-l3 +disable_service q-dhcp # How to connect to ovsdb-server hosting the OVN NB database. #OVN_NB_REMOTE=tcp:$SERVICE_HOST:6641 @@ -44,37 +46,11 @@ disable_service q-agt # DevStack runs. #OVN_UUID= -# OVN native layer-3 service is enabled by default. To use the conventional -# layer-3 agent, set OVN_L3_MODE to False and enable the q-l3 service. You -# should also consider enabling the conventional metadata service (q-meta). -#OVN_L3_MODE=False -#enable_service q-l3 -disable_service q-l3 - # If using the OVN native layer-3 service, choose a router scheduler to # manage the distribution of router gateways on hypervisors/chassis. # Default value is leastloaded. #OVN_L3_SCHEDULER=leastloaded -# OVN native DHCP functionality is enabled by default. To use the conventional -# DHCP agent, set OVN_NATIVE_DHCP to False and enable the q-dhcp service. -# However, if you choose the conventional DHCP agent instead of the native -# DHCP service, see the deployment considerations. You should also consider -# enabling the conventional metadata service (q-meta). -#OVN_NATIVE_DHCP=False -#enable_service q-dhcp -disable_service q-dhcp - -# OVN currently relies on the conventional metadata agent to provide instances -# with metadata. However, this mechanism only works in conjunction with the -# conventional layer-3 and/or DHCP agents. For single-node deployments, enable -# the metadata agent on the controller node. For multi-node deployments, -# consider disabling the agent on the controller node and enabling the agent on -# a subset of compute nodes. For more information, see -# computenode-local.conf.sample. -#enable_service q-meta -disable_service q-meta - # Whether or not to build custom openvswitch kernel modules from the ovs git # tree. This is enabled by default. This is required unless your distro kernel # includes ovs+conntrack support. This support was first released in Linux 4.3, diff --git a/devstack/override-defaults b/devstack/override-defaults index 12b348e6a..137fa78fd 100644 --- a/devstack/override-defaults +++ b/devstack/override-defaults @@ -4,13 +4,7 @@ Q_ML2_PLUGIN_MECHANISM_DRIVERS=${Q_ML2_PLUGIN_MECHANISM_DRIVERS:-ovn,logger} Q_ML2_PLUGIN_TYPE_DRIVERS=${Q_ML2_PLUGIN_TYPE_DRIVERS:-local,flat,vlan,geneve} Q_ML2_TENANT_NETWORK_TYPE=${Q_ML2_TENANT_NETWORK_TYPE:-"geneve"} Q_ML2_PLUGIN_GENEVE_TYPE_OPTIONS=${Q_ML2_PLUGIN_GENEVE_TYPE_OPTIONS:-"vni_ranges=1:65536"} - -# Whether to enable using OVN's L3 functionality. If this value is disabled, -# OpenStack will use q-l3 functionality. -OVN_L3_MODE=$(trueorfalse True OVN_L3_MODE) -if [[ "$OVN_L3_MODE" == "True" ]]; then - ML2_L3_PLUGIN="networking_ovn.l3.l3_ovn.OVNL3RouterPlugin" -fi +ML2_L3_PLUGIN="networking_ovn.l3.l3_ovn.OVNL3RouterPlugin" # Whether to enable using OVN's native dhcp support. If this value is disabled, # OpenStack will use the q-dhcp functionality. If you set diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 3eabe07ac..777b87112 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -46,9 +46,9 @@ if is_service_enabled q-svc || is_ovn_service_enabled ovn-northd || is_ovn_servi elif [[ "$1" == "stack" && "$2" == "extra" ]]; then if [[ "$OVN_L3_CREATE_PUBLIC_NETWORK" == "True" ]]; then - if [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" != "True" || "$OVN_L3_MODE" != "True" ]]; then - echo "OVN_L3_CREATE_PUBLIC_NETWORK=True is being ignored because either" - echo "NEUTRON_CREATE_INITIAL_NETWORKS or OVN_L3_MODE is set to False" + if [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" != "True" ]]; then + echo "OVN_L3_CREATE_PUBLIC_NETWORK=True is being ignored because" + echo "NEUTRON_CREATE_INITIAL_NETWORKS is set to False" else create_public_bridge fi diff --git a/devstack/upgrade/upgrade.sh b/devstack/upgrade/upgrade.sh index 85e7bd796..aa657a522 100755 --- a/devstack/upgrade/upgrade.sh +++ b/devstack/upgrade/upgrade.sh @@ -43,10 +43,6 @@ NW_OVN_DEVSTACK_DIR=$(dirname "$0")/.. source $NW_OVN_DEVSTACK_DIR/lib/networking-ovn export OVN_NEUTRON_SYNC_MODE=repair -# Use neutron l3 as there is a check in nova upgrade, which -# verifies an instance can be reached with its floating ip even -# after upgrade -export OVN_L3_MODE=False set -x diff --git a/doc/source/install.rst b/doc/source/install.rst index a8841609d..0b2e987d6 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -243,7 +243,7 @@ primary node. See the :ref:`faq` for more information. The ``firewall_driver`` option under ``[securitygroup]`` is ignored since the OVN ML2 driver itself handles security groups. - * Configure OVS database access, OVN L3 mode, L3 scheduler and OVN DHCP mode + * Configure OVS database access, L3 scheduler and OVN DHCP mode .. code-block:: ini @@ -251,23 +251,19 @@ primary node. See the :ref:`faq` for more information. ... ovn_nb_connection = tcp:IP_ADDRESS:6641 ovn_sb_connection = tcp:IP_ADDRESS:6642 - ovn_l3_mode = OVN_L3_MODE ovn_l3_scheduler = OVN_L3_SCHEDULER ovn_native_dhcp = OVN_NATIVE_DHCP .. note:: - Replace ``IP_ADDRESS`` with the IP address of the controller node - that runs the ``ovsdb-server`` service. Replace ``OVN_L3_MODE`` - with ``True`` if you enabled the native layer-3 service in - ``/etc/neutron/neutron.conf`` else ``False``. The ovn_l3_scheduler - value is only valid if ovn_l3_mode is set to ``True``. Replace - ``OVN_L3_SCHEDULER`` with ``leastloaded`` if you want the scheduler - to select a compute node with the least number of gateway ports - or ``chance`` if you want the scheduler to randomly select a compute - node from the available list of compute nodes. And finally, replace - ``OVN_NATIVE_DHCP`` with ``True`` if you want to enable the native DHCP - service else ``False`` to use the conventional DHCP agent. + Replace ``IP_ADDRESS`` with the IP address of the controller node that + runs the ``ovsdb-server`` service. Replace ``OVN_L3_SCHEDULER`` with + ``leastloaded`` if you want the scheduler to select a compute node with + the least number of gateway ports or ``chance`` if you want the + scheduler to randomly select a compute node from the available list of + compute nodes. And finally, replace ``OVN_NATIVE_DHCP`` with ``True`` + if you want to enable the native DHCP service else ``False`` to use the + conventional DHCP agent. #. Start the ``neutron-server`` service. diff --git a/networking_ovn/common/config.py b/networking_ovn/common/config.py index c768da100..9d1a11d05 100644 --- a/networking_ovn/common/config.py +++ b/networking_ovn/common/config.py @@ -44,6 +44,9 @@ ovn_opts = [ ' that are no longer in Neutron.')), cfg.BoolOpt('ovn_l3_mode', default=True, + deprecated_for_removal=True, + deprecated_reason="This option is no longer used. Native L3 " + "support in OVN is always used.", help=_('Whether to use OVN native L3 support. Do not change ' 'the value for existing deployments that contain ' 'routers.')),