Remove LBaaSv1

The LBaaSv1 code was deprecated in Liberty and was removed from
neutron-lbaas in the Newton release. This patch removes all of
the LBaaSv1 references from the neutron role.

Change-Id: Ib4b6ccfe578d3c760b0b37e63c1dbd1e75a2d26b
This commit is contained in:
Major Hayden 2016-07-19 09:23:55 -05:00
parent 14d4eb59b7
commit 13b41a3b54
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1
12 changed files with 24 additions and 128 deletions

View File

@ -80,7 +80,7 @@ neutron_plugin_core: "{{ neutron_plugins[neutron_plugin_type].plugin_core }}"
# - router
# - firewall
# - lbaas
# - lbaasv2
# - neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2
# - vpnaas
# - metering
# - qos
@ -186,17 +186,8 @@ neutron_services:
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --log-file=/var/log/neutron/neutron-l3-agent.log
config_overrides: "{{ neutron_l3_agent_ini_overrides }}"
config_type: "ini"
neutron-lbaas-agent:
group: neutron_lbaas_agent
service_name: neutron-lbaas-agent
service_en: "{{ neutron_lbaas | bool }}"
service_conf: lbaas_agent.ini
service_rootwrap: rootwrap.d/lbaas-haproxy.filters
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/lbaas_agent.ini --log-file=/var/log/neutron/neutron-lbaas-agent.log
config_overrides: "{{ neutron_lbaas_agent_ini_overrides }}"
config_type: "ini"
neutron-lbaasv2-agent:
group: neutron_lbaas_agent
group: neutron_lbaasv2_agent
service_name: neutron-lbaasv2-agent
service_en: "{{ neutron_lbaasv2 | bool }}"
service_conf: lbaas_agent.ini
@ -226,15 +217,16 @@ neutron_dhcp: "{% if neutron_plugin_type.split('.')[0] == 'ml2' %}True{% else %}
neutron_metadata: "{% if neutron_plugin_type.split('.')[0] == 'ml2' and (neutron_plugin_type == 'ml2.ovs.dvr' or 'nova_compute' not in group_names) %}True{% else %}False{% endif %}"
## Neutron LBaaS
# See documentation section titled "Configuring the Network Load Balacing
# See documentation section titled "Configuring the Network Load Balancing
# Service (Optional)" for more details.
#
# To enable LBaaS v1, add 'lbaas' to neutron_plugin_base list.
# To enable LBaaS v2, add 'lbaasv2' to neutron_plugin_base list
# TODO(odyssey4me): Remove the classpath from this conditional in the Newton cycle.
neutron_lbaas: "{% if 'lbaas' in neutron_plugin_base or 'neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPlugin' in neutron_plugin_base %}True{% else %}False{% endif %}"
neutron_lbaasv2: "{% if 'lbaasv2' in neutron_plugin_base or 'neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2' in neutron_plugin_base %}True{% else %}False{% endif %}"
# To enable LBaaS v2, add the following item to the neutron_plugin_base list:
# neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2
#
# NOTE(mhayden): neutron-lbaas doesn't have entry points and the full classpath
# is required.
neutron_lbaasv2: "{% if 'neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2' in neutron_plugin_base %}True{% else %}False{% endif %}"
neutron_lbaasv2_device_driver: neutron_lbaas.drivers.haproxy.namespace_driver.HaproxyNSDriver
## Neutron L3
## Please add 'router' to the neutron_plugin_base list
#TODO(odyssey4me): Remove the class path from this conditional in the Newton cycle

View File

@ -0,0 +1,8 @@
---
features:
- The LBaaSv2 device driver is now set by the Ansible variable
``neutron_lbaasv2_device_driver``. The default is set to use the
``HaproxyNSDriver``, which allows for agent-based load balancers.
upgrade:
- LBaaSv1 has been removed from the ``neutron-lbaas`` project in the Newton
release and it has been removed from OpenStack-Ansible as well.

View File

@ -62,10 +62,6 @@
tags:
- neutron-config
- include: neutron_check.yml
tags:
- always
- include: neutron_pre_install.yml
tags:
- neutron-install
@ -84,10 +80,6 @@
tags:
- neutron-install
- include: neutron_lbaas.yml
tags:
- neutron-install
- include: neutron_db_setup.yml
when:
- neutron_services['neutron-server']['group'] in group_names

View File

@ -1,23 +0,0 @@
---
# Copyright 2016, Rackspace US, 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.
- name: Ensure LBaaS v1 and v2 are not enabled simultaneously
fail:
message: |
LBaaS v1 and v2 cannot be enabled at the same time.
Verify that your neutron_plugin_base variable is correct.
when:
- neutron_lbaas | bool
- neutron_lbaasv2 | bool

View File

@ -97,18 +97,6 @@
- neutron_services['neutron-metering-agent']['group'] in group_names
- neutron_services['neutron-metering-agent'].service_en | bool
- include: neutron_init_common.yml
vars:
program_name: "{{ neutron_services['neutron-lbaas-agent'].service_name }}"
program_config_options: "{{ neutron_services['neutron-lbaas-agent'].config_options }}"
service_name: "{{ neutron_service_name }}"
system_user: "{{ neutron_system_user_name }}"
system_group: "{{ neutron_system_group_name }}"
service_home: "{{ neutron_system_home_folder }}"
when:
- neutron_services['neutron-lbaas-agent']['group'] in group_names
- neutron_services['neutron-lbaas-agent'].service_en | bool
- include: neutron_init_common.yml
vars:
program_name: "{{ neutron_services['neutron-lbaasv2-agent'].service_name }}"

View File

@ -87,8 +87,8 @@
delay: 2
with_items: "{{ neutron_lbaas_apt_packages }}"
when:
- neutron_services['neutron-lbaas-agent']['group'] in group_names
- neutron_lbaas | bool or neutron_lbaasv2 | bool
- neutron_services['neutron-lbaasv2-agent']['group'] in group_names
- neutron_lbaasv2 | bool
- name: Install apt packages for VPNaaS
apt:

View File

@ -1,51 +0,0 @@
---
# Copyright 2016, Rackspace US, 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.
# These tasks are here to handle a situation where a deployer has v1 deployed
# and then chooses to deploy v2 (or vice versa). The existing tasks within
# neutron_upstart_init.yml will deploy configuration files for both agents
# and both will be running on the system until these tasks run.
#
# These tasks will ensure that the correct agent is the only one running.
- name: Check if LBaaS agent v1 startup script exists when v2 is in neutron_plugin_base
stat:
path: "{{ neutron_lbaasv1_initscript_path }}"
register: neutron_lbaas_startup
when: neutron_lbaasv2 | bool
- name: Check if LBaaS agent v2 startup script exists when v1 is in neutron_plugin_base
stat:
path: "{{ neutron_lbaasv2_initscript_path }}"
register: neutron_lbaasv2_startup
when: neutron_lbaas | bool
- name: Ensure LBaaS v1 agent is stopped when v2 is in neutron_plugin_base
service:
name: "{{ neutron_lbaasv1_agent_servicename }}"
enabled: no
state: stopped
when:
- neutron_lbaasv2 | bool
- neutron_lbaas_startup.stat.exists
- name: Ensure LBaaS v2 agent is stopped when v1 is in neutron_plugin_base
service:
name: "{{ neutron_lbaasv2_agent_servicename }}"
enabled: no
state: stopped
when:
- neutron_lbaas | bool
- neutron_lbaasv2_startup.stat.exists

View File

@ -22,11 +22,7 @@ interface_driver = {{ neutron_plugins[neutron_plugin_type].driver_interface }}
# device_driver = path.to.provider1.driver.Driver
# device_driver = path.to.provider2.driver.Driver
# Default is:
{% if neutron_lbaas | bool %}
device_driver = neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver
{% elif neutron_lbaasv2 | bool %}
device_driver = neutron_lbaas.drivers.haproxy.namespace_driver.HaproxyNSDriver
{% endif %}
device_driver = {{ neutron_lbaasv2_device_driver }}
[haproxy]
# Location to store config and state files

View File

@ -155,9 +155,7 @@ pool_timeout = {{ neutron_db_pool_timeout }}
# Service providers
[service_providers]
{% if neutron_lbaas | bool %}
service_provider = LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
{% elif neutron_lbaasv2 | bool %}
{% if neutron_lbaasv2 | bool %}
service_provider = LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
{% endif %}
{% if neutron_vpnaas| bool %}

View File

@ -40,7 +40,7 @@ openstack1
[neutron_l3_agent]
openstack1
[neutron_lbaas_agent]
[neutron_lbaasv2_agent]
openstack1
[neutron_metadata_agent]
@ -56,6 +56,6 @@ neutron_linuxbridge_agent
neutron_openvswitch_agent
neutron_metering_agent
neutron_l3_agent
neutron_lbaas_agent
neutron_lbaasv2_agent
neutron_metadata_agent
neutron_server

View File

@ -50,7 +50,5 @@ neutron_vpnaas_apt_packages:
neutron_apt_remove_packages:
- conntrackd
neutron_lbaasv1_initscript_path: "/etc/init/neutron-lbaas-agent.conf"
neutron_lbaasv2_initscript_path: "/etc/init/neutron-lbaasv2-agent.conf"
neutron_lbaasv1_agent_servicename: "neutron-lbaas-agent"
neutron_lbaasv2_agent_servicename: "neutron-lbaasv2-agent"

View File

@ -48,7 +48,5 @@ neutron_vpnaas_apt_packages:
neutron_apt_remove_packages:
- conntrackd
neutron_lbaasv1_initscript_path: "/etc/init/neutron-lbaas-agent.conf"
neutron_lbaasv2_initscript_path: "/etc/init/neutron-lbaasv2-agent.conf"
neutron_lbaasv1_agent_servicename: "neutron-lbaas-agent"
neutron_lbaasv2_agent_servicename: "neutron-lbaasv2-agent"