Allow lxc_container_base_name to be set by the deployer

This patch ensures that the deployer is able to override the base
container name used when implementing copy-on-write based containers.

This patch ensures that the var name and default value matches that
set in https://review.openstack.org/358340

Change-Id: I672a77248061c00233fb306a25adbfe9add2c05d
This commit is contained in:
Jesse Pretorius 2016-08-23 00:53:50 +01:00 committed by Jesse Pretorius (odyssey4me)
parent f75789f963
commit 2967bf4e60
2 changed files with 5 additions and 1 deletions

View File

@ -42,6 +42,10 @@ lxc_container_default_bind_mounts:
- host_directory: "/openstack/backup/{{ inventory_hostname }}"
container_directory: "/var/backup"
# When using a base container to snapshot from for the overlayfs or LVM
# copy-on-write backing stored, the base container can be set.
lxc_container_base_name: "{{ lxc_container_map.distro }}-{{ lxc_container_map.release }}-{{ lxc_container_map.arch }}"
# Mappings from Ansible reported architecture to distro release architecture
lxc_architecture_mapping:
x86_64: amd64

View File

@ -94,7 +94,7 @@
- name: Create container (copy-on-write backing store)
command: >
lxc-copy --snapshot -B {{ lxc_container_backing_store }}
--name {{ lxc_container_map.distro }}-{{ lxc_container_map.release }}-{{ lxc_container_map.arch }}
--name {{ lxc_container_base_name }}
--newname {{ inventory_hostname }}
-L {{ properties.container_fs_size | default(lxc_container_fs_size) }}
--logfile {{ lxc_container_log_path }}/lxc-{{ inventory_hostname }}.log