Add cgroup delegation override
Required to solve the occasional libvirt: QEMU Driver error : Requested operation is not valid: cgroup CPUACCT controller is not mounted problem, as per: https://answers.launchpad.net/ubuntu/+question/665132
This commit is contained in:
parent
f2a9764f52
commit
a213ee7d4a
|
@ -24,7 +24,7 @@
|
|||
append: yes
|
||||
with_items: "{{ admin_users }}"
|
||||
|
||||
- name: install libvirt configuration
|
||||
- name: install libvirt configurations
|
||||
template:
|
||||
src: libvirt/{{ item }}.j2
|
||||
dest: /etc/libvirt/{{ item }}
|
||||
|
@ -66,6 +66,24 @@
|
|||
command: systemctl daemon-reload
|
||||
when: systemd.changed
|
||||
|
||||
- name: create unit override configuration directory
|
||||
file:
|
||||
dest: /etc/systemd/system/libvirtd.service.d
|
||||
state: directory
|
||||
|
||||
- name: install libvirt cgroup delegation configuration
|
||||
template:
|
||||
src: libvirt/{{ item }}.j2
|
||||
dest: /etc/systemd/system/libvirtd.service.d/{{ item }}
|
||||
with_items:
|
||||
- cgroup-delegation.conf
|
||||
register: systemd
|
||||
notify: restart libvirtd
|
||||
|
||||
- name: reload systemd to apply changes
|
||||
command: systemctl daemon-reload
|
||||
when: systemd.changed
|
||||
|
||||
- name: start and enable services (not managed by PVC)
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[Service]
|
||||
Delegate=yes
|
Loading…
Reference in New Issue