From 31b2b471c098ad79d02a2007777e122da0426e00 Mon Sep 17 00:00:00 2001
From: SamYaple <sam@yaple.net>
Date: Sun, 27 Dec 2015 15:18:05 +0000
Subject: [PATCH] Fix broken nova-compute/nova-libvirt

Currently the state of master has nova_compute unable to talk to
nova-libvirt. There have been some efforts to fix this, but they have
failed for various reasons. This puts the connection type for libvirt
from a socket to connecting to the already-open tcp connection thus
restoring the ability for nova-compute to talk to nova-libvirt and
function.

Change-Id: I5a6c39bb16159a2924a93a831e3c53cedd0ca7a1
Partially-Implements: blueprint drop-root
---
 ansible/roles/nova/templates/nova.conf.j2 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2
index e9b60eb4d7..9aad3ef1a0 100644
--- a/ansible/roles/nova/templates/nova.conf.j2
+++ b/ansible/roles/nova/templates/nova.conf.j2
@@ -137,8 +137,9 @@ project_name = service
 username = nova
 password = {{ nova_keystone_password }}
 
-{% if enable_ceph | bool %}
 [libvirt]
+connection_uri = "qemu+tcp://{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}/system"
+{% if enable_ceph | bool %}
 images_type = rbd
 images_rbd_pool = {{ ceph_nova_pool_name }}
 images_rbd_ceph_conf = /etc/ceph/ceph.conf