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
e8fe165e00
commit
e4ccafee73
|
@ -24,7 +24,7 @@
|
||||||
append: yes
|
append: yes
|
||||||
with_items: "{{ admin_users }}"
|
with_items: "{{ admin_users }}"
|
||||||
|
|
||||||
- name: install libvirt configuration
|
- name: install libvirt configurations
|
||||||
template:
|
template:
|
||||||
src: libvirt/{{ item }}.j2
|
src: libvirt/{{ item }}.j2
|
||||||
dest: /etc/libvirt/{{ item }}
|
dest: /etc/libvirt/{{ item }}
|
||||||
|
@ -66,6 +66,24 @@
|
||||||
command: systemctl daemon-reload
|
command: systemctl daemon-reload
|
||||||
when: systemd.changed
|
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)
|
- name: start and enable services (not managed by PVC)
|
||||||
service:
|
service:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[Service]
|
||||||
|
Delegate=yes
|
Loading…
Reference in New Issue