diff --git a/defaults/main.yml b/defaults/main.yml index 16a5e692..3bf8f215 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -49,13 +49,9 @@ nova_install_method: "source" nova_git_repo: https://git.openstack.org/openstack/nova nova_git_install_branch: master -nova_lxd_git_repo: https://git.openstack.org/openstack/nova-lxd -nova_lxd_git_install_branch: master - nova_upper_constraints_url: "{{ requirements_git_url | default('https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=' ~ requirements_git_install_branch | default('master')) }}" nova_git_constraints: - "git+{{ nova_git_repo }}@{{ nova_git_install_branch }}#egg=nova" - - "git+{{ nova_lxd_git_repo }}@{{ nova_lxd_git_install_branch }}#egg=nova-lxd" - "--constraint {{ nova_upper_constraints_url }}" nova_pip_install_args: "{{ pip_install_options | default('') }}" @@ -162,10 +158,6 @@ nova_virt_types: nova_compute_driver: libvirt.LibvirtDriver nova_reserved_host_memory_mb: 2048 nova_scheduler_tracks_instance_changes: True - lxd: - nova_compute_driver: lxd.LXDDriver - nova_reserved_host_memory_mb: 2048 - nova_scheduler_tracks_instance_changes: True qemu: nova_compute_driver: libvirt.LibvirtDriver nova_reserved_host_memory_mb: 2048 @@ -183,7 +175,6 @@ nova_compute_ksm_enabled: False nova_supported_virt_types: - qemu - kvm - - lxd - ironic ## Nova Auth @@ -540,11 +531,6 @@ nova_user_pip_packages: [] nova_optional_oslomsg_amqp1_pip_packages: - oslo.messaging[amqp1] -nova_compute_lxd_pip_packages: - - pylxd - - nova-lxd - - pyOpenSSL - nova_qemu_user: libvirt-qemu nova_qemu_group: kvm @@ -567,28 +553,6 @@ nova_vendor_data_overrides: {} nova_api_metadata_uwsgi_ini_overrides: {} nova_api_os_compute_uwsgi_ini_overrides: {} -lxd_bind_address: 0.0.0.0 -lxd_bind_port: 8443 - -# Supported backends are 'zfs', 'dir' and 'btrfs' for now. -# To use btrfs, a btrfs filesystem must be mounted in /var/lib/lxd -# during compute node configuration. -lxd_storage_backend: dir -# This needs to be set in the user_secrets.yml file. -#lxd_trust_password: - -# The name of the underlying storage pool created by, or consumed by -# lxd init. As an example this would be the name of a ZFS pool. -#lxd_init_storage_pool: pool - -# Nova requires the LXD storage pool name to be specified -lxd_storage_pool: default - -# This variable should be used with lxd when using a -# storage backend that utilizes storage pool if you -# want to use a specific bloc device instead of loop -#lxd_storage_create_device: "/dev/sdb" - # PCI devices passthrough to nova # For SR-IOV please use: # nova_pci_passthrough_whitelist: '{ "physical_network": "", "devname": "" }' diff --git a/doc/source/index.rst b/doc/source/index.rst index 7941850e..16f5884d 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -79,7 +79,6 @@ compute drivers are supported: - libvirt (default) - ironic -- lxd (via nova-lxd) The driver type is automatically detected by the OpenStack Ansible Nova role for the following compute driver types: @@ -89,15 +88,12 @@ for the following compute driver types: Any mix and match of compute node types can be used for those platforms, except for ironic. -If using the lxd driver, the compute type must be specified using the -``nova_virt_type`` variable. - The ``nova_virt_type`` may be set in ``/etc/openstack_deploy/user_variables.yml``, for example: .. code-block:: shell-session - nova_virt_type: lxd + nova_virt_type: ironic You can set ``nova_virt_type`` per host by using ``host_vars`` in ``/etc/openstack_deploy/openstack_user_config.yml``. For example: @@ -108,7 +104,7 @@ You can set ``nova_virt_type`` per host by using ``host_vars`` in aio1: ip: 172.29.236.100 host_vars: - nova_virt_type: lxd + nova_virt_type: ironic If ``nova_virt_type`` is set in ``/etc/openstack_deploy/user_variables.yml``, all nodes in the deployment are set to that hypervisor type. Setting diff --git a/files/rootwrap.d/lxd.filters b/files/rootwrap.d/lxd.filters deleted file mode 100644 index b2c32f75..00000000 --- a/files/rootwrap.d/lxd.filters +++ /dev/null @@ -1,10 +0,0 @@ -# nova-rootwrap filters for compute nodes running nova-lxd -# This file should be owned by (and only-writable by) the root user - -[Filters] -zfs: CommandFilter, zfs, root -zpool: CommandFilter, zpool, root -btrfs: CommandFilter, btrfs, root -chown: CommandFilter, chown, root -chmod: CommandFilter, chmod, root - diff --git a/releasenotes/notes/remove-lxd-driver-79969c0adc73115d.yaml b/releasenotes/notes/remove-lxd-driver-79969c0adc73115d.yaml new file mode 100644 index 00000000..3baf5014 --- /dev/null +++ b/releasenotes/notes/remove-lxd-driver-79969c0adc73115d.yaml @@ -0,0 +1,15 @@ +--- +deprecations: + - | + The nova-lxd driver is no longer supported upstream, and the git repo + for it's source code has been retired on the master branch. All code + for deploying or testing nova-lxd has been removed from the os_nova + ansible role. The following variables have been removed: + + * nova_supported_virt_types 'lxd' list entry + * nova_compute_lxd_pip_packages + * lxd_bind_address + * lxd_bind_port + * lxd_storage_backend + * lxd_trust_password + * lxd_storage_create_device diff --git a/tasks/drivers/lxd/nova_compute_lxd.yml b/tasks/drivers/lxd/nova_compute_lxd.yml deleted file mode 100644 index 8751100f..00000000 --- a/tasks/drivers/lxd/nova_compute_lxd.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -# Copyright 2016, Walmart Stores, 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: Add nova user to lxd group - user: - name: "{{ nova_system_user_name }}" - groups: "lxd" - append: "yes" - tags: - - nova-lxd - -- name: Place lxd config script - template: - src: lxd-init.sh.j2 - dest: "{{ nova_system_home_folder }}/lxd-init.sh" - owner: "{{ nova_system_user_name }}" - group: "lxd" - mode: 0770 - register: lxd_init_script - tags: - - nova-lxd - -- name: Configure lxd init - command: "{{ nova_system_home_folder }}/lxd-init.sh" - when: lxd_init_script is changed - tags: - - nova-lxd diff --git a/templates/lxd-init.sh.j2 b/templates/lxd-init.sh.j2 deleted file mode 100644 index e37deff3..00000000 --- a/templates/lxd-init.sh.j2 +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# {{ ansible_managed }} - -{% if (lxd_storage_backend == "zfs" or lxd_storage_backend == "dir") %} - -# This is a script to configure lxd system settings. -# "/usr/bin/lxd init" - -/usr/bin/lxd init \ - --auto \ - --network-address={{ lxd_bind_address }} \ - --network-port={{ lxd_bind_port }} \ - --storage-backend={{ lxd_storage_backend }} \ -{% if lxd_init_storage_pool is defined %} - --storage-pool={{ lxd_init_storage_pool }} \ -{% endif %} -{% if lxd_storage_create_device is defined %} - --storage-create-device={{ lxd_storage_create_device }} \ -{% endif %} - --trust-password={{ lxd_trust_password }} - -{% elif (lxd_storage_backend == "btrfs") %} - -# Check if filesystem if mounted as btrfs. -# If not nothing happens and storage will still be set to dir by default - -if [ $(findmnt /var/lib/lxd -o FSTYPE -n) == "btrfs" ]; then - systemctl restart lxd -fi - -{% endif %} diff --git a/templates/nova.conf.j2 b/templates/nova.conf.j2 index 67ea4f3d..1c9721f2 100644 --- a/templates/nova.conf.j2 +++ b/templates/nova.conf.j2 @@ -53,7 +53,7 @@ metadata_workers = {{ nova_metadata_workers | default(nova_api_threads) }} my_ip = {% if nova_management_address == 'localhost' %}127.0.0.1{% else %}{{ nova_management_address }}{% endif %} ## Vif -{% if nova_virt_type in ['kvm', 'lxd', 'qemu', 'xen'] %} +{% if nova_virt_type in ['kvm', 'qemu', 'xen'] %} libvirt_vif_type = ethernet {% endif %} @@ -266,11 +266,6 @@ hw_disk_discard = {{ nova_libvirt_hw_disk_discard }} disk_cachemodes = {{ nova_libvirt_disk_cachemodes }} {% endif %} -{% if nova_virt_type == 'lxd' %} -[lxd] -pool= {{ lxd_storage_pool }} -{% endif %} - {% if nova_barbican_enabled %} [barbican] auth_endpoint = {{ keystone_service_internaluri }}/v3 diff --git a/tests/test-create-zfs-dev.yml b/tests/test-create-zfs-dev.yml deleted file mode 100644 index cbae1499..00000000 --- a/tests/test-create-zfs-dev.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -# Copyright 2018, BBC R&D -# -# 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: Configure ZFS backing storage - hosts: nova_compute - user: root - tasks: - - block: - - name: Install ZFS packages - package: - name: "{{ zfs_package[ansible_distribution | lower] }}" - state: present - - - name: Create base directories - file: - path: "{{ item }}" - state: "directory" - with_items: - - /openstack - - - name: Create sparse ZFS backing file - command: "truncate -s 1024G /openstack/nova-lxd-zfs.img" - args: - creates: /openstack/nova-lxd-zfs.img - register: lxc_zfs_create - - - name: Create the ZFS pool - command: zpool create default /openstack/nova-lxd-zfs.img - args: - creates: /default - - vars: - zfs_package: - ubuntu: "zfsutils-linux" diff --git a/tests/test.yml b/tests/test.yml index d8aa9d44..b44c3442 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -13,11 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Setup ZFS pool for nova-lxd tests -- import_playbook: test-create-zfs-dev.yml - when: - - nova_virt_type is defined and nova_virt_type == "lxd" - # Setup the host - import_playbook: common/test-setup-host.yml diff --git a/tox.ini b/tox.ini index 2c5b33f5..e9924aa2 100644 --- a/tox.ini +++ b/tox.ini @@ -102,14 +102,6 @@ commands = bash -c "{toxinidir}/tests/common/test-ansible-functional.sh" -[testenv:lxd] -setenv = - {[testenv]setenv} - ANSIBLE_OVERRIDES={toxinidir}/tests/os_nova-overrides-lxd.yml -commands = - bash -c "{toxinidir}/tests/common/test-ansible-functional.sh" - - [testenv:linters] basepython = python3 commands = diff --git a/vars/debian.yml b/vars/debian.yml index c8b212e9..ba368190 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -41,8 +41,6 @@ nova_service_distro_packages: nova_service_extra_distro_packages: kvm: - nova-compute-kvm - lxd: - - nova-compute-lxd novnc: - nova-novncproxy nova_api: @@ -101,20 +99,6 @@ nova_compute_kvm_packages_to_symlink: - python-guestfs - python3-guestfs -nova_compute_lxd_distro_packages: - - bridge-utils - - dosfstools - - genisoimage - - kpartx - - lxd - - multipath-tools - - nfs-common - - open-iscsi - - python-guestfs - - sysfsutils - - vlan - - thin-provisioning-tools - nova_compute_ksm_packages: - ksmtuned diff --git a/vars/distro_install.yml b/vars/distro_install.yml index 059ca39c..318db833 100644 --- a/vars/distro_install.yml +++ b/vars/distro_install.yml @@ -44,9 +44,6 @@ nova_package_list: |- {% if nova_compute_ksm_enabled %} {% set _ = packages.extend(nova_compute_ksm_packages) %} {% endif %} - {% elif nova_virt_type == 'lxd' %} - {% set _ = packages.extend(nova_compute_lxd_distro_packages) %} - {% set _ = packages.extend(nova_service_extra_distro_packages['lxd']) %} {% endif %} {% if nova_barbican_enabled | bool %} {% set _ = packages.extend(nova_compute_barbican_distro_packages) %} diff --git a/vars/main.yml b/vars/main.yml index 203b77c6..2baac1e7 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -23,9 +23,7 @@ nova_venv_packages: |- {%- set _ = pkg_list.extend(nova_novnc_pip_packages) %} {%- endif %} {%- if (nova_services['nova-compute']['group'] in group_names) %} - {%- if nova_virt_type == 'lxd' %} - {%- set _ = pkg_list.extend(nova_compute_lxd_pip_packages) %} - {%- elif nova_virt_type == 'ironic' %} + {%- if nova_virt_type == 'ironic' %} {%- set _ = pkg_list.extend(nova_compute_ironic_pip_packages) %} {%- endif %} {%- endif %} diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml index 06455d9b..7e8f94dd 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -45,7 +45,6 @@ nova_service_extra_distro_packages: kvm: - openstack-nova-compute - openstack-nova-migration - lxd: [] novnc: - openstack-nova-novncproxy nova_api: @@ -91,7 +90,4 @@ nova_compute_oslomsg_amqp1_distro_packages: - cyrus-sasl-plain - cyrus-sasl-md5 -# TODO: add support for LXD on CentOS at some point. -nova_compute_lxd_distro_packages: [] - nova_uwsgi_bin: '/usr/sbin' diff --git a/vars/source_install.yml b/vars/source_install.yml index ffebe51d..5c4937bc 100644 --- a/vars/source_install.yml +++ b/vars/source_install.yml @@ -26,8 +26,6 @@ nova_package_list: |- {% if nova_compute_ksm_enabled %} {% set _ = packages.extend(nova_compute_ksm_packages) %} {% endif %} - {% elif nova_virt_type == 'lxd' %} - {% set _ = packages.extend(nova_compute_lxd_distro_packages) %} {% endif %} {% if nova_barbican_enabled | bool %} {% set _ = packages.extend(nova_compute_barbican_distro_packages) %} diff --git a/vars/suse.yml b/vars/suse.yml index 7e475a13..2afa5c9d 100644 --- a/vars/suse.yml +++ b/vars/suse.yml @@ -44,7 +44,6 @@ nova_service_distro_packages: nova_service_extra_distro_packages: kvm: - openstack-nova-compute - lxd: [] novnc: - openstack-nova-novncproxy nova_api: @@ -100,7 +99,4 @@ nova_compute_oslomsg_amqp1_distro_packages: - cyrus-sasl-plain - cyrus-sasl-digestmd5 -# TODO: add support for LXD on openSUSE at some point. -nova_compute_lxd_distro_packages: [] - nova_uwsgi_bin: '/usr/sbin' diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml deleted file mode 100644 index cd5a71e7..00000000 --- a/zuul.d/jobs.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# Copyright 2017, 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. - -- job: - name: openstack-ansible-deploy-aio_metal_lxd-ubuntu-bionic - parent: openstack-ansible-deploy-aio_metal-ubuntu-bionic - pre-run: - - zuul.d/playbooks/pre-lxd.yml diff --git a/zuul.d/playbooks/files/user_variables_lxd.yml b/zuul.d/playbooks/files/user_variables_lxd.yml deleted file mode 100644 index d0314c89..00000000 --- a/zuul.d/playbooks/files/user_variables_lxd.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -# Copyright 2016, Walmart Stores, 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. - -nova_virt_type: lxd -lxd_storage_backend: zfs -lxd_init_storage_pool: default - -tempest_test_whitelist: - - tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops - -tempest_tempest_conf_overrides: - 'compute-feature-enabled': - 'config_drive': 'false' - -tempest_images: - - url: "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-lxc.tar.gz" - checksum: "sha256:7276165f1f02e416d153f337d9d01beaa19cce185ad1d7c59a5fc2466fd19967" - format: "raw" - name: "cirros" - -neutron_provider_networks: - network_types: "vxlan,flat" - network_mappings: "flat:eth12" - network_vxlan_ranges: "1:1000" diff --git a/zuul.d/playbooks/pre-lxd.yml b/zuul.d/playbooks/pre-lxd.yml deleted file mode 100644 index 7395f201..00000000 --- a/zuul.d/playbooks/pre-lxd.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -# Copyright 2019, 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. - -- hosts: all[0] - become: yes - tasks: - - name: Run the LXD ZFS bootstrap - command: openstack-ansible tests/test-create-zfs-dev.yml - args: - chdir: "src/opendev.org/openstack/openstack-ansible-os_nova" - - - name: Drop the LXD variable overrides - copy: - src: user_variables_lxd.yml - dest: /etc/openstack_deploy/user_variables_lxd.yml diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index b1532cbf..f3f621af 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -21,9 +21,3 @@ - openstack-ansible-deploy-aio_distro_metal-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 - check: - jobs: - - openstack-ansible-deploy-aio_metal_lxd-ubuntu-bionic - gate: - jobs: - - openstack-ansible-deploy-aio_metal_lxd-ubuntu-bionic