diff --git a/defaults/main.yml b/defaults/main.yml index b35c0a98..f599dd78 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 diff --git a/releasenotes/notes/remove-lbaasv1-26044c48b5d3b508.yaml b/releasenotes/notes/remove-lbaasv1-26044c48b5d3b508.yaml new file mode 100644 index 00000000..46041a23 --- /dev/null +++ b/releasenotes/notes/remove-lbaasv1-26044c48b5d3b508.yaml @@ -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. diff --git a/tasks/main.yml b/tasks/main.yml index 568653bd..3984658f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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 diff --git a/tasks/neutron_check.yml b/tasks/neutron_check.yml deleted file mode 100644 index 4cf1068c..00000000 --- a/tasks/neutron_check.yml +++ /dev/null @@ -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 diff --git a/tasks/neutron_init.yml b/tasks/neutron_init.yml index ca4f699c..9b19ca62 100644 --- a/tasks/neutron_init.yml +++ b/tasks/neutron_init.yml @@ -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 }}" diff --git a/tasks/neutron_install-apt.yml b/tasks/neutron_install-apt.yml index 5d4bda73..4e75779d 100644 --- a/tasks/neutron_install-apt.yml +++ b/tasks/neutron_install-apt.yml @@ -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: diff --git a/tasks/neutron_lbaas.yml b/tasks/neutron_lbaas.yml deleted file mode 100644 index 2b3a13e9..00000000 --- a/tasks/neutron_lbaas.yml +++ /dev/null @@ -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 diff --git a/templates/lbaas_agent.ini.j2 b/templates/lbaas_agent.ini.j2 index 0809b4d1..24656297 100644 --- a/templates/lbaas_agent.ini.j2 +++ b/templates/lbaas_agent.ini.j2 @@ -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 diff --git a/templates/neutron.conf.j2 b/templates/neutron.conf.j2 index a5f886b6..7d6db8e1 100644 --- a/templates/neutron.conf.j2 +++ b/templates/neutron.conf.j2 @@ -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 %} diff --git a/tests/lxb_inventory b/tests/lxb_inventory index 3699c831..975b981b 100644 --- a/tests/lxb_inventory +++ b/tests/lxb_inventory @@ -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 diff --git a/vars/ubuntu-14.04.yml b/vars/ubuntu-14.04.yml index bcf88281..c9be8e64 100644 --- a/vars/ubuntu-14.04.yml +++ b/vars/ubuntu-14.04.yml @@ -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" diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml index 62cda1e6..ba86b16d 100644 --- a/vars/ubuntu-16.04.yml +++ b/vars/ubuntu-16.04.yml @@ -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"