Remove support for the nova-lxd driver
This driver has been retired [1] and tests are now failing becasue the nova-lxd repo master branch is now empty. [1] https://review.opendev.org/#/c/672283/ Change-Id: I9906ede54f6b41972a03bfa1d39ba5f99c6235ed
This commit is contained in:
Jonathan Rosser
committed by
Mohammed Naser
parent
e57db22374
commit
9376fd253d
20 changed files with 19 additions and 308 deletions
@@ -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": "<ml2 network name>", "devname": "<physical nic>" }'
@@ -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
@@ -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
15
releasenotes/notes/remove-lxd-driver-79969c0adc73115d.yaml
Normal file
15
releasenotes/notes/remove-lxd-driver-79969c0adc73115d.yaml
Normal file
@@ -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
@@ -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
@@ -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 %}
@@ -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
@@ -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"
@@ -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
8
tox.ini
8
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 =
@@ -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
@@ -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) %}
@@ -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 %}
@@ -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'
@@ -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) %}
@@ -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'
@@ -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
@@ -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"
@@ -1,27 +0,0 @@
---
# Copyright 2019, Logan Vig <logan2211@gmail.com>
#
# 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
@@ -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
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.