From b7f8abac296965096d770ee61f8533a162fcb7e4 Mon Sep 17 00:00:00 2001
From: "Michal (inc0) Jastrzebski" <inc007@gmail.com>
Date: Tue, 7 Mar 2017 22:57:46 +0000
Subject: [PATCH] Make qemu use nova user

Libvirt 2.5 (latest version in cloud archive) seems to have changed
behavior of dynamic_ownership.

Change-Id: Icf9592c2f82f0f4a35074b9b13a51643a32631e9
Closes-bug: #1668654
---
 ansible/roles/nova/templates/qemu.conf.j2 | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/ansible/roles/nova/templates/qemu.conf.j2 b/ansible/roles/nova/templates/qemu.conf.j2
index 16bd9d4d9a..0f75244e4b 100644
--- a/ansible/roles/nova/templates/qemu.conf.j2
+++ b/ansible/roles/nova/templates/qemu.conf.j2
@@ -1 +1,12 @@
 stdio_handler = "file"
+
+{% if kolla_base_distro == "ubuntu" %}
+# TODO: this workaround need to be fixed in Pike
+# Ubuntu cloud archive released libvirt-bin version 2.5.0 which runs vms as
+# libvirt-qemu user. This locks access to nova created files for vms which
+# have permissions 722 for nova user. We need to force qemu to use this user
+# to be able to access vm files.
+# see https://bugs.launchpad.net/kolla-ansible/+bug/1668654
+user = "nova"
+group = "nova"
+{% endif %}
-- 
GitLab