Extend template to set up additional values:
- use_cow_images
- force_raw_images
- snapshot_image_format
- images_type
Prod-Related: PROD-34639
Change-Id: I172e8e7d97786f059dad4586d3bf27fa86b89dce
diff --git a/README.rst b/README.rst
index 9284f9f..793f8cd 100644
--- a/README.rst
+++ b/README.rst
@@ -30,6 +30,13 @@
workers: 8
report_interval: 60
dhcp_domain: novalocal
+ vif_plugging_timeout: 300
+ vif_plugging_is_fatal: false
+ instance_build_timeout: 600
+ use_cow_images: False
+ force_raw_images: True
+ snapshot_image_format: qcow2
+ images_type: default
concurrency:
lock_path: '/var/lib/nova/tmp'
consoleauth:
diff --git a/nova/files/ocata/nova-controller.conf.Debian b/nova/files/ocata/nova-controller.conf.Debian
index 7435861..93e724a 100644
--- a/nova/files/ocata/nova-controller.conf.Debian
+++ b/nova/files/ocata/nova-controller.conf.Debian
@@ -378,6 +378,9 @@
# backing files will not be used.
# (boolean value)
#use_cow_images=true
+{%- if controller.use_cow_images is defined and controller.use_cow_images|string|lower in ['true','false'] %}
+use_cow_images = {{ controller.use_cow_images|lower }}
+{%- endif %}
#
# Force conversion of backing images to raw format.
@@ -392,6 +395,9 @@
# * ``compute_driver``: Only the libvirt driver uses this option.
# (boolean value)
#force_raw_images=true
+{%- if controller.force_raw_images is defined and controller.force_raw_images|string|lower in ['true','false'] %}
+force_raw_images = {{ controller.force_raw_images|lower }}
+{%- endif %}
#
# Name of the mkfs commands for ephemeral device.
@@ -6399,6 +6405,9 @@
# (string value)
# Allowed values: raw, qcow2, vmdk, vdi
#snapshot_image_format=<None>
+{%- if controller.snapshot_image_format is defined and controller.snapshot_image_format in ['raw','qcow2','vmdk','vdi'] %}
+snapshot_image_format = {{ controller.snapshot_image_format }}
+{%- endif %}
#
# Override the default disk prefix for the devices attached to an instance.
@@ -6533,6 +6542,9 @@
# (string value)
# Allowed values: raw, flat, qcow2, lvm, rbd, ploop, default
#images_type=default
+{%- if controller.images_type is defined and controller.images_type in ['raw','flat','qcow2','lvm','rbd','ploop','default'] %}
+images_type = {{ controller.images_type }}
+{%- endif %}
#
# LVM Volume Group that is used for VM images, when you specify images_type=lvm
diff --git a/nova/files/pike/nova-controller.conf.Debian b/nova/files/pike/nova-controller.conf.Debian
index f92a2bf..b24a708 100644
--- a/nova/files/pike/nova-controller.conf.Debian
+++ b/nova/files/pike/nova-controller.conf.Debian
@@ -388,6 +388,9 @@
# backing files will not be used.
# (boolean value)
#use_cow_images=true
+{%- if controller.use_cow_images is defined and controller.use_cow_images|string|lower in ['true','false'] %}
+use_cow_images = {{ controller.use_cow_images|lower }}
+{%- endif %}
#
# Force conversion of backing images to raw format.
@@ -402,6 +405,9 @@
# * ``compute_driver``: Only the libvirt driver uses this option.
# (boolean value)
#force_raw_images=true
+{%- if controller.force_raw_images is defined and controller.force_raw_images|string|lower in ['true','false'] %}
+force_raw_images = {{ controller.force_raw_images|lower }}
+{%- endif %}
#
# Name of the mkfs commands for ephemeral device.
@@ -6472,6 +6478,9 @@
# (string value)
# Allowed values: raw, qcow2, vmdk, vdi
#snapshot_image_format=<None>
+{%- if controller.snapshot_image_format is defined and controller.snapshot_image_format in ['raw','qcow2','vmdk','vdi'] %}
+snapshot_image_format = {{ controller.snapshot_image_format }}
+{%- endif %}
#
# Override the default disk prefix for the devices attached to an instance.
@@ -6609,6 +6618,9 @@
# (string value)
# Allowed values: raw, flat, qcow2, lvm, rbd, ploop, default
#images_type=default
+{%- if controller.images_type is defined and controller.images_type in ['raw','flat','qcow2','lvm','rbd','ploop','default'] %}
+images_type = {{ controller.images_type }}
+{%- endif %}
#
# LVM Volume Group that is used for VM images, when you specify images_type=lvm
diff --git a/nova/files/queens/nova-controller.conf.Debian b/nova/files/queens/nova-controller.conf.Debian
index af8f7f9..9e17b00 100644
--- a/nova/files/queens/nova-controller.conf.Debian
+++ b/nova/files/queens/nova-controller.conf.Debian
@@ -384,6 +384,9 @@
# backing files will not be used.
# (boolean value)
#use_cow_images = true
+{%- if controller.use_cow_images is defined and controller.use_cow_images|string|lower in ['true','false'] %}
+use_cow_images = {{ controller.use_cow_images|lower }}
+{%- endif %}
#
# Force conversion of backing images to raw format.
@@ -398,6 +401,9 @@
# * ``compute_driver``: Only the libvirt driver uses this option.
# (boolean value)
#force_raw_images = true
+{%- if controller.force_raw_images is defined and controller.force_raw_images|string|lower in ['true','false'] %}
+force_raw_images = {{ controller.force_raw_images|lower }}
+{%- endif %}
#
# Name of the mkfs commands for ephemeral device.
@@ -6688,6 +6694,9 @@
# vmdk - <No description provided>
# vdi - <No description provided>
#snapshot_image_format = <None>
+{%- if controller.snapshot_image_format is defined and controller.snapshot_image_format in ['raw','qcow2','vmdk','vdi'] %}
+snapshot_image_format = {{ controller.snapshot_image_format }}
+{%- endif %}
#
# Override the default disk prefix for the devices attached to an
@@ -7015,6 +7024,9 @@
# ploop - <No description provided>
# default - <No description provided>
#images_type = default
+{%- if controller.images_type is defined and controller.images_type in ['raw','flat','qcow2','lvm','rbd','ploop','default'] %}
+images_type = {{ controller.images_type }}
+{%- endif %}
#
# LVM Volume Group that is used for VM images, when you specify
diff --git a/tests/pillar/control_cluster.sls b/tests/pillar/control_cluster.sls
index 16a9cc2..0bbfb06 100644
--- a/tests/pillar/control_cluster.sls
+++ b/tests/pillar/control_cluster.sls
@@ -14,6 +14,10 @@
workers: 8
instance_build_timeout: 600
secure_proxy_ssl_header: HTTP_X_FORWARDED_PROTO
+ use_cow_images: False
+ force_raw_images: True
+ snapshot_image_format: qcow2
+ images_type: default
bind:
private_address: 127.0.0.1
public_address: 127.0.0.1