From c1ed80fe84d9160c1aa0cc10c96bc3d114795b18 Mon Sep 17 00:00:00 2001
From: Yotaro Konishi <konishi.yotaro@jp.fujitsu.com>
Date: Wed, 26 Jul 2017 16:31:25 +0900
Subject: [PATCH] Fix configuration for nova_compute_ironic

Currently nova.conf.j2 generates two compute_driver options for
nova_compute_ironic container like this:

compute_driver = ironic.IronicDriver
compute_driver = libvirt.LibvirtDriver

nova_compute_ironic container fails to start because the latter value
overrides the former one.

This patch fixes the issue recently introduced in [1].

[1] 63314ad6dd181a0e975438de2e99409238f1b775

Change-Id: Ibb661a5a594120be4195d331c38883c3b2886361
Closes-Bug: #1706534
---
 ansible/roles/nova/templates/nova.conf.j2 | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2
index 4ead2182ab..566cc8f4ca 100644
--- a/ansible/roles/nova/templates/nova.conf.j2
+++ b/ansible/roles/nova/templates/nova.conf.j2
@@ -28,9 +28,7 @@ log_file = /var/log/kolla/nova/nova-compute-ironic.log
 compute_driver = ironic.IronicDriver
 ram_allocation_ratio = 1.0
 reserved_host_memory_mb = 0
-{% endif %}
-
-{% if enable_nova_fake | bool %}
+{% elif enable_nova_fake | bool %}
 host = {{ ansible_hostname }}_{{ service_name }}
 compute_driver = fake.FakeDriver
 {% else %}