14572c3153
This patch adjusts the nova-lxd deployment so that it works correctly with LXD3 and bionic. * Update the zuul job and project config to switch from xenial to bionic. * Change the variable lxd_storage_pool to always have a defined value in the role defaults. This variable represents the name of the LXD storage pool which is distinct from any names associated with underlying storage. LXD storage pools created with 'lxd init' are always called 'default'. * Switch the role test storage backend from dir to ZFS. nova-lxd is currently not working for the dir backend as it expects the storage subsystem to support quotas. * Due to limitiations in nova-lxd it is necessary to ensure that the LXD storage pool name and ZFS pool names are both set to 'default'. Closes-Bug: #1800837 Change-Id: If1e48bb2e789e13f20435da19907b5adb7c1ef1f
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
---
|
|
# 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: localhost
|
|
user: root
|
|
become: true
|
|
connection: local
|
|
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"
|