Add config template for qemu.conf
Currently, qemu.conf is not tunable by OSA. However, the default config file for qemu.conf is typically all comments and is not frequently overwritten. This patch enables deployers to deploy a custom /etc/libvirt/qemu.conf config file by defining a dictionary qemu_conf_dict. config_template plugin is not used because the qemu.conf file does not have sections, thus putting values in [DEFAULT] is untested. Change-Id: I780951ef466d1a82168f1f787abf58aebfe95889
This commit is contained in:
4 changed files with 25 additions and 0 deletions
@@ -415,6 +415,10 @@ nova_compute_lxd_pip_packages:
nova_qemu_user:libvirt-qemu
nova_qemu_group:kvm
# Define the following variable to drop a replacement
# file for /etc/libvirt/qemu.conf
#qemu_conf_dict: {}
# This variable is used by the repo_build process to determine
# which host group to check for members of before building the
# pip packages required by this role. The value is picked up
4
releasenotes/notes/add-qemu-conf-d42337dfd42bac6f.yaml
Normal file
4
releasenotes/notes/add-qemu-conf-d42337dfd42bac6f.yaml
Normal file
@@ -0,0 +1,4 @@
---
features:
- The os_nova role can now deploy the a custom
/etc/libvirt/qemu.conf file by defining ``qemu_conf_dict``.
@@ -40,6 +40,19 @@
- nova-kvm
- nova-libvirt
- name:Set qemu config
template:
src:"qemu.conf.j2"
dest:"/etc/libvirt/qemu.conf"
owner:"root"
group:"root"
mode:"0600"
when:qemu_conf_dict is defined
notify:Restart libvirt-bin
tags:
- nova-kvm
- nova-libvirt
- name:Set libvirt runtime options
lineinfile:
dest:"/etc/default/libvirt-bin"
4
templates/qemu.conf.j2
Normal file
4
templates/qemu.conf.j2
Normal file
@@ -0,0 +1,4 @@
# {{ ansible_managed }}
{% for key, value in qemu_conf_dict.iteritems() %}
{{ key }} = {{ value }}
{% endfor %}
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.