From 4d1889a2337468d0ac8d0203f8981bf95a96f0a5 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Wed, 30 Nov 2022 10:00:54 +0000 Subject: [PATCH] Remove support for calico ml2 driver. Change-Id: I25e28c678f69a1b2f067e6ce87f1b3134e6470d2 --- defaults/main.yml | 14 +---- doc/source/app-calico.rst | 89 ------------------------------ doc/source/index.rst | 1 - tasks/dependent_neutron_roles.yml | 14 ----- tasks/providers/calico_config.yml | 43 --------------- tests/calico_inventory | 77 -------------------------- tests/lxb_inventory | 2 - tests/neutron-overrides-calico.yml | 35 ------------ tests/test-calico-functional.yml | 50 ----------------- tests/test.yml | 2 - tox.ini | 9 --- vars/main.yml | 45 --------------- zuul.d/jobs.yaml | 5 -- zuul.d/project.yaml | 2 - 14 files changed, 1 insertion(+), 387 deletions(-) delete mode 100644 doc/source/app-calico.rst delete mode 100644 tasks/providers/calico_config.yml delete mode 100644 tests/calico_inventory delete mode 100644 tests/neutron-overrides-calico.yml delete mode 100644 tests/test-calico-functional.yml diff --git a/defaults/main.yml b/defaults/main.yml index 90e9db23..ae77381c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -59,8 +59,6 @@ neutron_vpnaas_git_repo: https://opendev.org/openstack/neutron-vpnaas neutron_vpnaas_git_install_branch: master neutron_dynamic_routing_git_repo: https://opendev.org/openstack/neutron-dynamic-routing neutron_dynamic_routing_git_install_branch: master -networking_calico_git_repo: https://github.com/projectcalico/networking-calico -networking_calico_git_install_branch: master networking_odl_git_repo: https://opendev.org/openstack/networking-odl networking_odl_git_install_branch: master networking_sfc_git_repo: https://opendev.org/openstack/networking-sfc @@ -143,10 +141,6 @@ neutron_dnsmasq_noresolv: False neutron_api_paste_ini_overrides: {} neutron_bgp_dragent_ini_overrides: {} neutron_bgp_dragent_init_overrides: {} -neutron_calico_dhcp_agent_ini_overrides: {} -neutron_calico_dhcp_agent_init_overrides: {} -neutron_calico_felix_ini_overrides: {} -neutron_calico_felix_init_overrides: {} neutron_dhcp_agent_ini_overrides: {} neutron_dhcp_agent_init_overrides: {} neutron_ironic_neutron_agent_ini_overrides: {} @@ -192,7 +186,7 @@ neutron_ovn_metadata_agent_init_overrides: {} ### UWSGI ### # NOTE(noonedeadpunk): uWSGI is still not fully supported. See: https://bugs.launchpad.net/neutron/+bug/1912359 -neutron_use_uwsgi: "{{ (neutron_plugin_type not in ['ml2.ovn', 'ml2.calico']) }}" +neutron_use_uwsgi: "{{ (neutron_plugin_type not in ['ml2.ovn']) }}" neutron_wsgi_processes_max: 16 neutron_wsgi_processes: "{{ [[ansible_processor_vcpus|default(1), 1] | max * 2, neutron_wsgi_processes_max] | min }}" neutron_wsgi_threads: 1 @@ -474,12 +468,6 @@ neutron_vpnaas_service_provider: "{{ _neutron_vpnaas_service_provider }}" neutron_vpnaas_custom_config: [] -# Calico Felix agent upstream settings -calico_felix_url: "https://github.com/projectcalico/felix/releases/download/{{ calico_felix_version }}/calico-felix-amd64" -calico_felix_version: v3.21.2 -calico_felix_sha256: 076936b985379fb8221db9b9a798714f6f97429a630da9c46da89bfcb0f84d81 -calico_felix_validate_certs: yes - # OVN Defaults neutron_ovn_ssl: True ovn_proto: "{{ (neutron_ovn_ssl) | ternary('ssl','tcp') }}" diff --git a/doc/source/app-calico.rst b/doc/source/app-calico.rst deleted file mode 100644 index 0436c000..00000000 --- a/doc/source/app-calico.rst +++ /dev/null @@ -1,89 +0,0 @@ -===================================================== -Scenario - Using the networking-calico Neutron plugin -===================================================== - -Introduction -~~~~~~~~~~~~ - -This document describes the steps required to deploy Project Calico Neutron -networking with OpenStack-Ansible (OSA). These steps include: - -- Configure OSA environment overrides. - -- Configure OSA user variables. - -- Execute the playbooks. - -For additional configuration about Project Calico and its architecture, please -reference the `networking-calico`_ and `Project Calico`_ documentation. - -.. _networking-calico: https://docs.openstack.org/networking-calico/latest/ -.. _Project Calico: https://docs.projectcalico.org/en/latest/index.html - -Prerequisites -~~~~~~~~~~~~~ - -#. The deployment environment has been configured according to OSA - best-practices. This includes cloning OSA software and bootstrapping - Ansible. See `OpenStack-Ansible Install Guide `_ -#. BGP peers configured to accept routing announcements from your hypervisors. - By default, the hypervisor's default router is set as the BGP peer. - -Configure OSA Environment for Project Calico -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Add hosts to the ``/etc/openstack_deploy/conf.d/etcd.conf`` configuration file -to add container hosts for the etcd cluster. See -``etc/openstack_deploy/conf.d/etcd.conf.example`` in the openstack-ansible repo -or adjust the example below to match your infrastructure hosts: - -.. code-block:: yaml - - etcd_hosts: - infra1: - ip: 172.20.236.111 - infra2: - ip: 172.20.236.112 - infra3: - ip: 172.20.236.113 - -Copy the neutron environment overrides to -``/etc/openstack_deploy/env.d/neutron.yml`` to disable the creation of the -neutron agents container, and implement the calico-dhcp-agent hosts group -containing all compute hosts. - -.. code-block:: yaml - - component_skel: - neutron_calico_dhcp_agent: - belongs_to: - - neutron_all - - container_skel: - neutron_agents_container: - contains: {} - neutron_calico_dhcp_agent_container: - belongs_to: - - compute_containers - contains: - - neutron_calico_dhcp_agent - properties: - is_metal: true - service_name: neutron - -Configure networking-calico Neutron Plugin -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Set the following in ``/etc/openstack_deploy/user_variables.yml``. - -.. code-block:: yaml - - neutron_plugin_type: ml2.calico - nova_network_type: calico - -Installation -~~~~~~~~~~~~ - -After multi-node OpenStack cluster is configured as detailed above; start -the OpenStack deployment as listed in the OpenStack-Ansible Install guide by -running all playbooks in sequence on the deployment host diff --git a/doc/source/index.rst b/doc/source/index.rst index 3e94b3dc..edda08e5 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -14,7 +14,6 @@ Neutron role for OpenStack-Ansible app-ovn.rst app-nuage.rst app-nsx.rst - app-calico.rst app-opendaylight.rst app-genericswitch.rst diff --git a/tasks/dependent_neutron_roles.yml b/tasks/dependent_neutron_roles.yml index 3967ecbc..2f30d27a 100644 --- a/tasks/dependent_neutron_roles.yml +++ b/tasks/dependent_neutron_roles.yml @@ -13,20 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Include etcd role - include_role: - name: etcd - vars: - etcd_install_type: gateway - when: - - "neutron_plugin_type in ['ml2.calico']" - - "group_names | intersect([ - neutron_services['calico-dhcp-agent']['group'], - neutron_services['calico-felix']['group'], - neutron_services['neutron-server']['group'] - ]) | length > 0" - - "'etcd' not in group_names" - - name: Include ODL role include_role: name: opendaylight diff --git a/tasks/providers/calico_config.yml b/tasks/providers/calico_config.yml deleted file mode 100644 index 4c4c527e..00000000 --- a/tasks/providers/calico_config.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -# Copyright 2016, Logan Vig -# -# 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: Install Calico Felix agent - get_url: - url: "{{ calico_felix_url }}" - dest: "{{ calico_felix_bin }}" - sha256sum: "{{ calico_felix_sha256 }}" - validate_certs: "{{ calico_felix_validate_certs }}" - mode: '0755' - register: install_packages - until: install_packages is success - retries: 5 - delay: 2 - when: - - "neutron_services['calico-felix']['group'] in group_names" - notify: Restart neutron services - tags: - - calico-install - -- name: Ensure calico config directory exists - file: - path: "/etc/calico" - state: directory - owner: "root" - group: "root" - mode: "0644" - when: - - neutron_services['calico-felix']['group'] in group_names - tags: - - calico-config diff --git a/tests/calico_inventory b/tests/calico_inventory deleted file mode 100644 index 405c8f14..00000000 --- a/tests/calico_inventory +++ /dev/null @@ -1,77 +0,0 @@ -[all] -localhost -infra1 -server1 -server2 -agents1 -agents2 - -[physical_host] -localhost - -[all_containers] -infra1 -server1 -server2 -agents1 -agents2 - -[oslomsg_rpc_all] -infra1 - -[oslomsg_notify_all] -infra1 - -[rabbitmq_all] -infra1 - -[galera_all] -infra1 - -[memcached_all] -infra1 - -[etcd_all] -infra1 - -[etcd:children] -etcd_all - -[service_all:children] -rabbitmq_all -galera_all -memcached_all -etcd_all - -[keystone_all] -infra1 - -[neutron_calico_dhcp_agent] -agents1 -agents2 - -[neutron_server] -server1 -server2 - -[neutron_agent] -[neutron_dhcp_agent] -[neutron_linuxbridge_agent] -[neutron_openvswitch_agent] -[neutron_metering_agent] -[neutron_l3_agent] -[neutron_metadata_agent] - -[neutron_all:children] -neutron_agent -neutron_dhcp_agent -neutron_linuxbridge_agent -neutron_openvswitch_agent -neutron_metering_agent -neutron_l3_agent -neutron_metadata_agent -neutron_server -neutron_calico_dhcp_agent - -[utility_all] -infra1 diff --git a/tests/lxb_inventory b/tests/lxb_inventory index b80aca2d..bb30ec84 100644 --- a/tests/lxb_inventory +++ b/tests/lxb_inventory @@ -69,8 +69,6 @@ agents2 server1 server2 -[neutron_calico_dhcp_agent] - [neutron_all:children] neutron_agent neutron_dhcp_agent diff --git a/tests/neutron-overrides-calico.yml b/tests/neutron-overrides-calico.yml deleted file mode 100644 index f9a634d2..00000000 --- a/tests/neutron-overrides-calico.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -# Copyright 2016, Logan Vig -# -# 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. - -tempest_run: yes - -tempest_plugins: - - name: neutron-plugins - repo: https://opendev.org/openstack/neutron-tempest-plugin - branch: master - -tempest_test_whitelist: - - "neutron_tempest_plugin.api.test_networks*" - -tempest_private_net_provider_type: "local" -tempest_private_net_seg_id: '' -tempest_public_net_provider_type: "local" -tempest_public_net_physical_type: '' - -tempest_network_ping_gateway: False - -neutron_plugin_type: ml2.calico -neutron_provider_networks: - network_types: '' diff --git a/tests/test-calico-functional.yml b/tests/test-calico-functional.yml deleted file mode 100644 index 1087c58d..00000000 --- a/tests/test-calico-functional.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -# Copyright 2016, Logan Vig -# -# 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: Test calico - hosts: neutron_calico_dhcp_agent - user: root - gather_facts: true - tasks: - - name: Ensure Calico services are running - command: pgrep -a {{ item }} - with_items: - - calico-felix - - calico-dhcp-age - tags: - - skip_ansible_lint - when: - - "neutron_plugin_type == 'ml2.calico'" - - - name: Ensure that the Calico Felix agent is alive - command: openstack --os-cloud default network agent list -f json - register: calico_felix_agent - until: |- - ansible_nodename in (calico_felix_agent.stdout - | from_json - | selectattr('Binary', 'equalto', 'calico-felix') - | map(attribute='Host') | list) - retries: 5 - delay: 10 - with_items: "{{ ansible_play_hosts }}" - delegate_to: "{{ groups['utility_all'][0] }}" - run_once: yes - tags: - - skip_ansible_lint - when: - - "neutron_plugin_type == 'ml2.calico'" - - vars_files: - - common/test-vars.yml diff --git a/tests/test.yml b/tests/test.yml index 91afdeb8..187f327c 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -33,5 +33,3 @@ # Install and execute tempest - import_playbook: common/test-install-tempest.yml - -- import_playbook: test-calico-functional.yml diff --git a/tox.ini b/tox.ini index 75718459..52816925 100644 --- a/tox.ini +++ b/tox.ini @@ -102,15 +102,6 @@ setenv = commands = bash -c "{toxinidir}/tests/common/test-ansible-functional.sh" -[testenv:calico] -basepython = python3 -setenv = - {[testenv]setenv} - ANSIBLE_INVENTORY={toxinidir}/tests/calico_inventory - ANSIBLE_OVERRIDES={toxinidir}/tests/neutron-overrides-calico.yml -commands = - bash -c "{toxinidir}/tests/common/test-ansible-functional.sh" - [testenv:linters] basepython = python3 commands = diff --git a/vars/main.yml b/vars/main.yml index e30f9661..d2981e78 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -24,9 +24,6 @@ neutron_needs_openvswitch: >- or (neutron_services['neutron-ovn-controller']['group'] in group_names and (neutron_plugin_type == 'ml2.ovn') | bool) or ((neutron_services['neutron-server']['group'] not in group_names) and neutron_plugin_type == 'ml2.opendaylight') }} -# Set the Calico Felix agent executable destination path -calico_felix_bin: /usr/local/bin/calico-felix - ### ### Python code details ### @@ -47,11 +44,6 @@ neutron_optional_oslomsg_amqp1_pip_packages: neutron_optional_bgp_pip_packages: - "git+{{ neutron_dynamic_routing_git_repo }}@{{ neutron_dynamic_routing_git_install_branch }}#egg=neutron-dynamic-routing" -neutron_optional_calico_pip_packages: - - "git+{{ networking_calico_git_repo }}@{{ networking_calico_git_install_branch }}#egg=networking-calico" - - python-etcd - - etcd3gw - neutron_optional_fwaas_pip_packages: - "git+{{ neutron_fwaas_git_repo }}@{{ neutron_fwaas_git_install_branch }}#egg=neutron-fwaas" @@ -98,12 +90,6 @@ neutron_venv_packages: >- {%- if neutron_oslomsg_amqp1_enabled | bool %} {%- set _ = pkg_list.extend(neutron_optional_oslomsg_amqp1_pip_packages) %} {%- endif %} - {%- if (neutron_plugin_type.split('.')[-1] == 'calico') and - ((neutron_services['neutron-server']['group'] in group_names) or - (neutron_services['calico-felix']['group'] in group_names) or - (neutron_services['calico-dhcp-agent']['group'] in group_names)) %} - {%- set _ = pkg_list.extend(neutron_optional_calico_pip_packages) %} - {%- endif %} {%- if (neutron_plugin_type.split('.')[-1] == 'nuage') and (neutron_services['neutron-server']['group'] in group_names) %} {%- set _ = pkg_list.extend(neutron_optional_nuage_pip_packages) %} @@ -196,12 +182,6 @@ neutron_plugins: plugin_conf_ini_overrides: "{{ neutron_ml2_conf_ini_overrides }}" plugin_core: ml2 plugin_ini: plugins/ml2/ml2_conf.ini - ml2.calico: - drivers_type: "flat, local" - mechanisms: "calico" - plugin_conf_ini_overrides: "{{ neutron_ml2_conf_ini_overrides }}" - plugin_core: ml2 - plugin_ini: plugins/ml2/ml2_conf.ini nuage: plugin_core: nuage_neutron.plugins.nuage.plugin.NuagePlugin plugin_ini: plugins/nuage/nuage.ini @@ -493,31 +473,6 @@ neutron_services: init_config_overrides: "{{ neutron_rpc_server_init_overrides | combine(neutron_server_init_overrides) }}" start_order: 2 execstarts: "{{ neutron_bin }}/neutron-rpc-server --config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/{{ neutron_plugins[neutron_plugin_type].plugin_ini }}{%- if ('ml2.genericswitch' in neutron_plugin_types) %} --config-file {{ neutron_conf_dir }}/{{ neutron_plugins['ml2.genericswitch'].plugin_ini }}{%- endif %}" - calico-felix: - group: neutron_calico_dhcp_agent - systemd_user_name: root - systemd_group_name: root - service_name: calico-felix - service_en: "{{ neutron_plugin_type == 'ml2.calico' }}" - service_conf_path: /etc/calico - service_conf: felix.cfg - execstarts: "{{ calico_felix_bin }} --config-file /etc/calico/felix.cfg" - config_overrides: "{{ neutron_calico_felix_ini_overrides }}" - config_type: "ini" - init_config_overrides: "{{ neutron_calico_felix_init_overrides }}" - start_order: 3 - calico-dhcp-agent: - group: neutron_calico_dhcp_agent - systemd_user_name: root - systemd_group_name: root - service_name: calico-dhcp-agent - service_en: "{{ neutron_plugin_type == 'ml2.calico' }}" - service_rootwrap: rootwrap.d/dhcp.filters - execstarts: "{{ neutron_bin }}/calico-dhcp-agent --config-file {{ neutron_conf_dir }}/neutron.conf" - config_overrides: "{{ neutron_calico_dhcp_agent_ini_overrides }}" - config_type: "ini" - init_config_overrides: "{{ neutron_calico_dhcp_agent_init_overrides }}" - start_order: 3 neutron-sriov-nic-agent: group: neutron_sriov_nic_agent service_name: neutron-sriov-nic-agent diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index e2239cee..aec8f7aa 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -34,11 +34,6 @@ parent: openstack-ansible-deploy-aio nodeset: ubuntu-focal -- job: - name: openstack-ansible-deploy-aio_metal_calico-ubuntu-focal - parent: openstack-ansible-deploy-aio_metal-ubuntu-focal - nodeset: ubuntu-focal - # CentOS 9 - job: name: openstack-ansible-deploy-aio_ovs_lxc-centos-9-stream diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index ce431720..5fd09653 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -23,8 +23,6 @@ - build-release-notes-jobs-python3 check: jobs: - - openstack-ansible-deploy-aio_metal_calico-ubuntu-focal: - voting: false - openstack-ansible-deploy-aio_ovs_lxc-ubuntu-focal - openstack-ansible-deploy-aio_metal_ovs-ubuntu-focal - openstack-ansible-deploy-aio_ovs_lxc-centos-9-stream