Allow to set ionice level for lvm volume clear
for now implemented in downstream and only in Queens
pillar item is compute.lvm.volume_clear_ionice_level
Change-Id: I3d00e1b4c8752133ef395797045c3f2a3afae94d
Related-Issue: PROD-29930
diff --git a/nova/files/queens/nova-compute.conf.Debian b/nova/files/queens/nova-compute.conf.Debian
index 9bf3ea2..6f59898 100644
--- a/nova/files/queens/nova-compute.conf.Debian
+++ b/nova/files/queens/nova-compute.conf.Debian
@@ -6246,6 +6246,9 @@
{%- if compute.lvm.volume_clear_size is defined %}
volume_clear_size={{ compute.lvm.volume_clear_size }}
{%- endif %}
+{%- if compute.lvm.volume_clear_ionice_level is defined %}
+volume_clear_ionice_level={{compute.lvm.volume_clear_ionice_level}}
+{%- endif %}
{%- endif %}
#
@@ -7259,6 +7262,31 @@
#volume_clear_size = 0
#
+# What I/O schedule class and priority level should be used when clearing
+# a volume. Only takes effect if ``volume_clear`` option is set to ``zero`` or
+# ``shred``. For more info about classes and priorities, check ``man ionice``.
+#
+# Possible values:
+#
+# * idle - use the Idle scheduling class. This option impacts system performance
+# the least with a downside of increased time for volume clearance
+# * from 0 to 7 - use the Best-effort scheduling class and set the priority level
+# to the specified number
+#
+# If not set - do not set I/O scheduling class explicitly. Usually, it's the most
+# aggressive option in terms of system performance impact.
+#
+# Related options:
+#
+# * images_type - must be set to ``lvm``
+# * volume_clear - must be set and the value must be different than ``none``
+# for this option to have any impact
+# (string value)
+# Possible values:
+# 'idle', '0', '1', '2', '3', '4', '5', '6', '7'
+#volume_clear_ionice_level=None
+
+#
# Enable snapshot compression for ``qcow2`` images.
#
# Note: you can set ``snapshot_image_format`` to ``qcow2`` to force
diff --git a/nova/files/queens/nova-controller.conf.Debian b/nova/files/queens/nova-controller.conf.Debian
index 402e6ec..e9e49bb 100644
--- a/nova/files/queens/nova-controller.conf.Debian
+++ b/nova/files/queens/nova-controller.conf.Debian
@@ -7109,6 +7109,30 @@
#volume_clear_size = 0
#
+# What I/O schedule class and priority level should be used when clearing
+# a volume. Only takes effect if ``volume_clear`` option is set to ``zero`` or
+# ``shred``. For more info about classes and priorities, check ``man ionice``.
+#
+# Possible values:
+#
+# * idle - use the Idle scheduling class. This option impacts system performance
+# the least with a downside of increased time for volume clearance
+# * from 0 to 7 - use the Best-effort scheduling class and set the priority level
+# to the specified number
+#
+# If not set - do not set I/O scheduling class explicitly. Usually, it's the most
+# aggressive option in terms of system performance impact.
+#
+# Related options:
+#
+# * images_type - must be set to ``lvm``
+# * volume_clear - must be set and the value must be different than ``none``
+# for this option to have any impact
+# (string value)
+# Possible values:
+# 'idle', '0', '1', '2', '3', '4', '5', '6', '7'
+#volume_clear_ionice_level=None
+#
# Enable snapshot compression for ``qcow2`` images.
#
# Note: you can set ``snapshot_image_format`` to ``qcow2`` to force