Merge "Use max function for openstack_* related metrics"
diff --git a/nova/files/mitaka/nova-compute.conf.Debian b/nova/files/mitaka/nova-compute.conf.Debian
index ef05fa0..11f89c7 100644
--- a/nova/files/mitaka/nova-compute.conf.Debian
+++ b/nova/files/mitaka/nova-compute.conf.Debian
@@ -127,7 +127,11 @@
[libvirt]
cpu_mode = {{ compute.get('cpu_mode', 'host-passthrough') }}
+{%- if compute.libvirt.virt_type is defined %}
+virt_type = {{ compute.libvirt.virt_type }}
+{%- else %}
virt_type = kvm
+{%- endif%}
inject_partition=-2
inject_password=False
disk_cachemodes="{{ compute.get('disk_cachemodes', 'network=writeback,block=none') }}"
diff --git a/nova/files/mitaka/nova-controller.conf.Debian b/nova/files/mitaka/nova-controller.conf.Debian
index 8e7b702..e0e9e38 100644
--- a/nova/files/mitaka/nova-controller.conf.Debian
+++ b/nova/files/mitaka/nova-controller.conf.Debian
@@ -74,6 +74,10 @@
block_device_allocate_retries=600
block_device_allocate_retries_interval=10
+{%- if controller.host is defined %}
+host={{ controller.host }}
+{%- endif %}
+
[vnc]
enabled = true
novncproxy_host = {{ controller.bind.get('novncproxy_address', '0.0.0.0') }}
diff --git a/nova/files/newton/nova-compute.conf.Debian b/nova/files/newton/nova-compute.conf.Debian
index 830f8f9..1c0fce9 100644
--- a/nova/files/newton/nova-compute.conf.Debian
+++ b/nova/files/newton/nova-compute.conf.Debian
@@ -180,7 +180,11 @@
[libvirt]
cpu_mode = {{ compute.get('cpu_mode', 'host-passthrough') }}
+{%- if compute.libvirt.virt_type is defined %}
+virt_type = {{ compute.libvirt.virt_type }}
+{%- else %}
virt_type = kvm
+{%- endif%}
inject_partition=-2
inject_password=False
disk_cachemodes="{{ compute.get('disk_cachemodes', 'network=writeback,block=none') }}"
diff --git a/nova/files/newton/nova-controller.conf.Debian b/nova/files/newton/nova-controller.conf.Debian
index 38a20c0..1cf2bfa 100644
--- a/nova/files/newton/nova-controller.conf.Debian
+++ b/nova/files/newton/nova-controller.conf.Debian
@@ -95,6 +95,11 @@
{# rabbitmq ssl configuration #}
{%- if controller.message_queue.get('ssl',{}).get('enabled', False) %}
+
+{%- if controller.host is defined %}
+host={{ controller.host }}
+{%- endif %}
+
[oslo_messaging_rabbit]
rabbit_use_ssl=true
diff --git a/nova/files/ocata/nova-compute.conf.Debian b/nova/files/ocata/nova-compute.conf.Debian
index 3eb807b..8e8b3de 100644
--- a/nova/files/ocata/nova-compute.conf.Debian
+++ b/nova/files/ocata/nova-compute.conf.Debian
@@ -5940,7 +5940,11 @@
# From nova.conf
#
cpu_mode = {{ compute.get('cpu_mode', 'host-passthrough') }}
+{%- if compute.libvirt.virt_type is defined %}
+virt_type = {{ compute.libvirt.virt_type }}
+{%- else %}
virt_type = kvm
+{%- endif%}
inject_partition=-2
inject_password=True
disk_cachemodes="{{ compute.get('disk_cachemodes', 'network=writeback,block=none') }}"
diff --git a/nova/files/ocata/nova-controller.conf.Debian b/nova/files/ocata/nova-controller.conf.Debian
index 59c0e5c..e758573 100644
--- a/nova/files/ocata/nova-controller.conf.Debian
+++ b/nova/files/ocata/nova-controller.conf.Debian
@@ -1511,6 +1511,9 @@
# * String with hostname, FQDN or IP address. Default is hostname of this host.
# (string value)
#host=lcy01-22
+{%- if controller.host is defined %}
+host={{ controller.host }}
+{%- endif %}
#
# Assign IPv6 and IPv4 addresses when creating instances.
diff --git a/nova/files/pike/nova-compute.conf.Debian b/nova/files/pike/nova-compute.conf.Debian
index 3eb807b..8e8b3de 100644
--- a/nova/files/pike/nova-compute.conf.Debian
+++ b/nova/files/pike/nova-compute.conf.Debian
@@ -5940,7 +5940,11 @@
# From nova.conf
#
cpu_mode = {{ compute.get('cpu_mode', 'host-passthrough') }}
+{%- if compute.libvirt.virt_type is defined %}
+virt_type = {{ compute.libvirt.virt_type }}
+{%- else %}
virt_type = kvm
+{%- endif%}
inject_partition=-2
inject_password=True
disk_cachemodes="{{ compute.get('disk_cachemodes', 'network=writeback,block=none') }}"
diff --git a/nova/files/pike/nova-controller.conf.Debian b/nova/files/pike/nova-controller.conf.Debian
index 2a584d7..d8d58d2 100644
--- a/nova/files/pike/nova-controller.conf.Debian
+++ b/nova/files/pike/nova-controller.conf.Debian
@@ -1511,6 +1511,9 @@
# * String with hostname, FQDN or IP address. Default is hostname of this host.
# (string value)
#host=lcy01-22
+{%- if controller.host is defined %}
+host={{ controller.host }}
+{%- endif %}
#
# Assign IPv6 and IPv4 addresses when creating instances.