Merge "Unhardcoded inject_* params in nova-compute.conf"
diff --git a/nova/files/mitaka/nova-compute.conf.Debian b/nova/files/mitaka/nova-compute.conf.Debian
index a3a8f14..cc052e2 100644
--- a/nova/files/mitaka/nova-compute.conf.Debian
+++ b/nova/files/mitaka/nova-compute.conf.Debian
@@ -136,8 +136,14 @@
{%- else %}
virt_type = kvm
{%- endif%}
-inject_partition=-2
+
+inject_partition={{ compute.libvirt.inject_partition }}
+{%- if compute.libvirt.get('inject_partition', '-2')|string == '-2' %}
inject_password=False
+{%- else %}
+inject_password={{ compute.libvirt.inject_password }}
+{%- endif %}
+
disk_cachemodes="{{ compute.get('disk_cachemodes', 'network=writeback,block=none') }}"
libvirt_inject_password=True
block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC
diff --git a/nova/files/newton/nova-compute.conf.Debian b/nova/files/newton/nova-compute.conf.Debian
index 999da48..d1e34b1 100644
--- a/nova/files/newton/nova-compute.conf.Debian
+++ b/nova/files/newton/nova-compute.conf.Debian
@@ -189,8 +189,14 @@
{%- else %}
virt_type = kvm
{%- endif%}
-inject_partition=-2
+
+inject_partition={{ compute.libvirt.inject_partition }}
+{%- if compute.libvirt.get('inject_partition', '-2')|string == '-2' %}
inject_password=False
+{%- else %}
+inject_password={{ compute.libvirt.inject_password }}
+{%- endif %}
+
disk_cachemodes="{{ compute.get('disk_cachemodes', 'network=writeback,block=none') }}"
libvirt_inject_password=True
block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC
diff --git a/nova/files/ocata/nova-compute.conf.Debian b/nova/files/ocata/nova-compute.conf.Debian
index 0e922d5..bb1af40 100644
--- a/nova/files/ocata/nova-compute.conf.Debian
+++ b/nova/files/ocata/nova-compute.conf.Debian
@@ -5945,8 +5945,14 @@
{%- else %}
virt_type = kvm
{%- endif%}
-inject_partition=-2
-inject_password=True
+
+inject_partition={{ compute.libvirt.inject_partition }}
+{%- if compute.libvirt.get('inject_partition', '-2')|string == '-2' %}
+inject_password=False
+{%- else %}
+inject_password={{ compute.libvirt.inject_password }}
+{%- endif %}
+
disk_cachemodes="{{ compute.get('disk_cachemodes', 'network=writeback,block=none') }}"
block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC
live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST
diff --git a/nova/files/pike/nova-compute.conf.Debian b/nova/files/pike/nova-compute.conf.Debian
index 402ae02..0e2e958 100644
--- a/nova/files/pike/nova-compute.conf.Debian
+++ b/nova/files/pike/nova-compute.conf.Debian
@@ -5945,8 +5945,14 @@
{%- else %}
virt_type = kvm
{%- endif%}
-inject_partition=-2
-inject_password=True
+
+inject_partition={{ compute.libvirt.inject_partition }}
+{%- if compute.libvirt.get('inject_partition', '-2')|string == '-2' %}
+inject_password=False
+{%- else %}
+inject_password={{ compute.libvirt.inject_password }}
+{%- endif %}
+
disk_cachemodes="{{ compute.get('disk_cachemodes', 'network=writeback,block=none') }}"
block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC
live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST
diff --git a/nova/map.jinja b/nova/map.jinja
index 96f25f5..c2334fc 100644
--- a/nova/map.jinja
+++ b/nova/map.jinja
@@ -124,7 +124,9 @@
libvirt_service: libvirt-bin
bind: compute_bind_defaults
debug: false
- libvirt: []
+ libvirt:
+ inject_partition: '-2'
+ inject_password: False
instances_path: "$state_path/instances"
notification: false
availability_zone:
@@ -155,7 +157,9 @@
libvirt_service: libvirtd
bind: compute_bind_defaults
debug: false
- libvirt: []
+ libvirt:
+ inject_partition: '-2'
+ inject_password: False
notification: false
availability_zone:
identity: