Merge "Set lxc.autodev=0 for cinder_volumes in containers"
This commit is contained in:
commit
fa9ffcc31c
@ -190,6 +190,8 @@ cinder_backends_rbd_inuse: >
|
|||||||
endfor %}{{
|
endfor %}{{
|
||||||
_var.rbd_inuse }}
|
_var.rbd_inuse }}
|
||||||
cinder_ceph_client: cinder
|
cinder_ceph_client: cinder
|
||||||
|
# cinder_backend_lvm_inuse: True if current host has an lvm backend
|
||||||
|
cinder_backend_lvm_inuse: '{{ (cinder_backends|default("")|to_json).find("cinder.volume.drivers.lvm.LVMVolumeDriver") != -1 }}'
|
||||||
|
|
||||||
|
|
||||||
## OpenStack Openrc
|
## OpenStack Openrc
|
||||||
|
@ -50,11 +50,15 @@
|
|||||||
lxc_container:
|
lxc_container:
|
||||||
name: "{{ container_name }}"
|
name: "{{ container_name }}"
|
||||||
container_config:
|
container_config:
|
||||||
|
- "lxc.autodev=0"
|
||||||
- "lxc.aa_profile=unconfined"
|
- "lxc.aa_profile=unconfined"
|
||||||
- "lxc.cgroup.devices.allow=a *:* rmw"
|
- "lxc.cgroup.devices.allow=a *:* rmw"
|
||||||
- "lxc.mount.entry = udev dev devtmpfs defaults 0 0"
|
- "lxc.mount.entry=udev dev devtmpfs defaults 0 0"
|
||||||
delegate_to: "{{ physical_host }}"
|
delegate_to: "{{ physical_host }}"
|
||||||
when: (is_metal == false or is_metal == "False") and inventory_hostname in groups['cinder_volume']
|
when: >
|
||||||
|
(is_metal == false or is_metal == "False") and
|
||||||
|
inventory_hostname in groups['cinder_volume'] and
|
||||||
|
cinder_backend_lvm_inuse
|
||||||
tags:
|
tags:
|
||||||
- cinder-container-setup
|
- cinder-container-setup
|
||||||
register: lxc_config
|
register: lxc_config
|
||||||
|
@ -37,3 +37,4 @@
|
|||||||
- include: cinder_lvm_config.yml
|
- include: cinder_lvm_config.yml
|
||||||
when: >
|
when: >
|
||||||
inventory_hostname in groups['cinder_volume']
|
inventory_hostname in groups['cinder_volume']
|
||||||
|
and cinder_backend_lvm_inuse
|
||||||
|
Loading…
Reference in New Issue
Block a user