make LXC AppArmor profile conditional for cinder_volume

and neutron_agent on RHEL 10

LXC on RHEL 10 is built without AppArmor support, causing
cinder-volumes and neutron_agent containers startup to fail.
Make it conditional, keeping unconfined only on Debian/Ubuntu.

Change-Id: I7f824811ce2e7a496e6bafbaadce23c2d76cc0fc
Signed-off-by: Dmitriy Chubinidze <dcu995@gmail.com>
This commit is contained in:
Dmitriy Chubinidze committed 2026-06-15 07:07:30 +00:00
1 parent e167fe2fb5
commit 35f9b2b435
2 files changed
+3 -4

No files matched your search

+1 -2
View File
@@ -18,5 +18,4 @@
# here so it can be consumed by the nova group vars
cinder_backend_rbd_inuse: '{{ (cinder_backends|default("")|to_json).find("cinder.volume.drivers.rbd.RBDDriver") != -1 }}'
lxc_container_config_list:
- "lxc.apparmor.profile=unconfined"
lxc_container_config_list: "{{ ((hostvars[physical_host]['ansible_facts']['os_family'] | lower) == 'debian') | ternary(['lxc.apparmor.profile=unconfined'], []) }}"
+2 -2
View File
@@ -20,8 +20,8 @@
neutron_dhcp_config:
dhcp-ignore: "tag:!known"
lxc_container_config_list:
- "lxc.apparmor.profile=unconfined"
lxc_container_config_list: "{{ ((hostvars[physical_host]['ansible_facts']['os_family'] | lower) == 'debian') | ternary(['lxc.apparmor.profile=unconfined'], []) }}"
# Ensure that all neutron agent containers get a fixed mac address
lxc_container_fixed_mac: true