From da30982acf1af6d7e04244ba6523c7fdc000f386 Mon Sep 17 00:00:00 2001 From: Seungkyu Ahn Date: Fri, 1 Sep 2017 14:46:02 +0900 Subject: [PATCH] Make qemu use nova user Ubuntu cloud archive released libvirt-bin version 2.5.0 which runs vms as libvirt-qemu user. We need to force qemu to use this user to be able to access vm files. Change-Id: I47ff3e3b3f9412734bdc662f14681850bf64d53f Closes-bug: 1714421 --- libvirt/templates/etc/_libvirtd.conf.tpl | 6 +++--- libvirt/templates/etc/_qemu.conf.tpl | 2 ++ libvirt/values.yaml | 11 +++++++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/libvirt/templates/etc/_libvirtd.conf.tpl b/libvirt/templates/etc/_libvirtd.conf.tpl index 5536b9c988..67536549d3 100644 --- a/libvirt/templates/etc/_libvirtd.conf.tpl +++ b/libvirt/templates/etc/_libvirtd.conf.tpl @@ -17,6 +17,6 @@ limitations under the License. listen_tcp = 1 auth_tcp = "none" ca_file = "" -log_level = {{ .Values.libvirt.log_level }} -log_outputs = "{{ .Values.libvirt.log_level }}:stderr" -listen_addr = "{{ .Values.libvirt.listen_addr }}" +log_level = {{ .Values.conf.libvirt.log_level }} +log_outputs = "{{ .Values.conf.libvirt.log_level }}:stderr" +listen_addr = "{{ .Values.conf.libvirt.listen_addr }}" diff --git a/libvirt/templates/etc/_qemu.conf.tpl b/libvirt/templates/etc/_qemu.conf.tpl index ced8d2c6eb..0b26d0f6d0 100644 --- a/libvirt/templates/etc/_qemu.conf.tpl +++ b/libvirt/templates/etc/_qemu.conf.tpl @@ -28,3 +28,5 @@ limitations under the License. # rollover when a size limit is hit. # stdio_handler = "file" +{{ if not .Values.conf.qemu.user }}#{{ end }}user = {{ .Values.conf.qemu.user | default "nova" | quote }} +{{ if not .Values.conf.qemu.group }}#{{ end }}group = {{ .Values.conf.qemu.group | default "kvm" | quote }} diff --git a/libvirt/values.yaml b/libvirt/values.yaml index dd8c06f1de..95ae6da0cf 100644 --- a/libvirt/values.yaml +++ b/libvirt/values.yaml @@ -29,7 +29,6 @@ images: libvirt: docker.io/kolla/ubuntu-source-nova-libvirt:3.0.3 pull_policy: "IfNotPresent" - ceph: enabled: true monitors: [] @@ -37,9 +36,13 @@ ceph: cinder_keyring: null secret_uuid: 457eb676-33da-42ec-9a8c-9293d545c337 -libvirt: - listen_addr: 0.0.0.0 - log_level: 3 +conf: + libvirt: + listen_addr: 0.0.0.0 + log_level: 3 + qemu: + user: "nova" + group: "kvm" pod: affinity: