Unhardcode parameters for rocky and queens
timeout_nbd and heal_instance_info_cache_interval were available
for configuration in pike so should be available and in later
releases.
Change-Id: I3bf9bcde5f60761826926d5a6e00893980925681
Related-Prod: https://mirantis.jira.com/browse/PROD-27288
diff --git a/README.rst b/README.rst
index 51ed2d1..a290d34 100644
--- a/README.rst
+++ b/README.rst
@@ -274,6 +274,8 @@
compute:
version: juno
enabled: true
+ timeout_nbd: 10
+ heal_instance_info_cache_interval: 60
cross_az_attach: false
disk_cachemodes: network=writeback,block=none
availability_zone: availability_zone_01
diff --git a/nova/files/queens/nova-compute.conf.Debian b/nova/files/queens/nova-compute.conf.Debian
index 54dfd87..645cc4d 100644
--- a/nova/files/queens/nova-compute.conf.Debian
+++ b/nova/files/queens/nova-compute.conf.Debian
@@ -430,6 +430,9 @@
# (integer value)
# Minimum value: 0
#timeout_nbd = 10
+{%- if compute.timeout_nbd is defined %}
+timeout_nbd = {{ compute.timeout_nbd }}
+{%- endif %}
#
# Location of cached images.
diff --git a/nova/files/queens/nova-controller.conf.Debian b/nova/files/queens/nova-controller.conf.Debian
index 2f15f22..f430fdf 100644
--- a/nova/files/queens/nova-controller.conf.Debian
+++ b/nova/files/queens/nova-controller.conf.Debian
@@ -423,6 +423,9 @@
# (integer value)
# Minimum value: 0
#timeout_nbd = 10
+{%- if controller.timeout_nbd is defined %}
+timeout_nbd = {{ controller.timeout_nbd }}
+{%- endif %}
#
# Location of cached images.
@@ -885,6 +888,9 @@
# * Any value <=0 will disable the sync. This is not recommended.
# (integer value)
#heal_instance_info_cache_interval = 60
+{%- if controller.heal_instance_info_cache_interval is defined %}
+heal_instance_info_cache_interval = {{ controller.heal_instance_info_cache_interval }}
+{%- endif %}
#
# Interval for reclaiming deleted instances.
diff --git a/nova/files/rocky/nova-compute.conf.Debian b/nova/files/rocky/nova-compute.conf.Debian
index 819ad84..ed0aceb 100644
--- a/nova/files/rocky/nova-compute.conf.Debian
+++ b/nova/files/rocky/nova-compute.conf.Debian
@@ -319,6 +319,9 @@
# Amount of time, in seconds, to wait for NBD device start up. (integer value)
# Minimum value: 0
#timeout_nbd = 10
+{%- if compute.timeout_nbd is defined %}
+timeout_nbd = {{ compute.timeout_nbd }}
+{%- endif %}
#
# Location of cached images.
diff --git a/nova/files/rocky/nova-controller.conf.Debian b/nova/files/rocky/nova-controller.conf.Debian
index 63810ad..4856353 100644
--- a/nova/files/rocky/nova-controller.conf.Debian
+++ b/nova/files/rocky/nova-controller.conf.Debian
@@ -313,6 +313,9 @@
# Amount of time, in seconds, to wait for NBD device start up. (integer value)
# Minimum value: 0
#timeout_nbd = 10
+{%- if controller.timeout_nbd is defined %}
+timeout_nbd = {{ controller.timeout_nbd }}
+{%- endif %}
#
# Location of cached images.
@@ -736,6 +739,9 @@
# * Any value <=0 will disable the sync. This is not recommended.
# (integer value)
#heal_instance_info_cache_interval = 60
+{%- if controller.heal_instance_info_cache_interval is defined %}
+heal_instance_info_cache_interval = {{ controller.heal_instance_info_cache_interval }}
+{%- endif %}
#
# Interval for reclaiming deleted instances.
diff --git a/tests/pillar/compute_cluster.sls b/tests/pillar/compute_cluster.sls
index 7c79c8a..378de4f 100644
--- a/tests/pillar/compute_cluster.sls
+++ b/tests/pillar/compute_cluster.sls
@@ -7,6 +7,7 @@
mount_points:
- path: /mnt/hugepages_1GB
disk_cachemodes: network=writeback,block=none
+ timeout_nbd: 10
heal_instance_info_cache_interval: 60
vncproxy_url: openstack:6080
report_interval: 60
diff --git a/tests/pillar/compute_single.sls b/tests/pillar/compute_single.sls
index c2b740a..5677ab6 100644
--- a/tests/pillar/compute_single.sls
+++ b/tests/pillar/compute_single.sls
@@ -2,6 +2,7 @@
compute:
version: newton
enabled: true
+ timeout_nbd: 10
heal_instance_info_cache_interval: 60
vncproxy_url: openstack:6080
vnc_keymap: en-gb
diff --git a/tests/pillar/compute_single_config_drive_options.sls b/tests/pillar/compute_single_config_drive_options.sls
index 739f876..44c6428 100644
--- a/tests/pillar/compute_single_config_drive_options.sls
+++ b/tests/pillar/compute_single_config_drive_options.sls
@@ -2,6 +2,7 @@
compute:
version: queens
enabled: true
+ timeout_nbd: 10
heal_instance_info_cache_interval: 60
vncproxy_url: openstack:6080
vnc_keymap: en-gb
diff --git a/tests/pillar/control_single.sls b/tests/pillar/control_single.sls
index 9423b53..114aee8 100644
--- a/tests/pillar/control_single.sls
+++ b/tests/pillar/control_single.sls
@@ -3,6 +3,8 @@
enabled: true
networking: contrail
version: queens
+ timeout_nbd: 10
+ heal_instance_info_cache_interval: 60
security_group: false
vncproxy_url: 127.0.0.1
vnc_keymap: en-gb