Add posibility to set ssd scheduler via udev.
Available values: noop, cfq, deadline (or other available scheduler in kernel)
Default value:
enabled: false
name: deadline
Closes-bug: PROD-36140
Change-Id: I233ccba5b782717d6e387bdad04745b6b91a3582
diff --git a/README.rst b/README.rst
index 641a335..4e799e6 100644
--- a/README.rst
+++ b/README.rst
@@ -269,7 +269,7 @@
Set ssd scheduler on physical nodes:
Default values are
- enabled: true
+ enabled: false
name: deadline
.. code-block:: yaml
diff --git a/linux/map.jinja b/linux/map.jinja
index f1c4b3a..6f92119 100644
--- a/linux/map.jinja
+++ b/linux/map.jinja
@@ -28,7 +28,7 @@
},
'sosreport': {},
'ssd_scheduler': {
- 'enabled': true,
+ 'enabled': false,
'name': 'deadline',
},
},
@@ -65,7 +65,7 @@
},
'sosreport': {},
'ssd_scheduler': {
- 'enabled': true,
+ 'enabled': false,
'name': 'deadline',
},
},
@@ -98,7 +98,7 @@
},
'sosreport': {},
'ssd_scheduler': {
- 'enabled': true,
+ 'enabled': false,
'name': 'deadline',
},
},
diff --git a/linux/system/init.sls b/linux/system/init.sls
index d4fb069..bc9b20d 100644
--- a/linux/system/init.sls
+++ b/linux/system/init.sls
@@ -5,7 +5,7 @@
- linux.system.profile
- linux.system.shell
- linux.system.motd_news
-{%- if system.get('ssd_scheduler', {}).get('enabled', true) and grains.virtual == 'physical' %}
+{%- if system.get('ssd_scheduler', {}).get('enabled', false) and grains.virtual == 'physical' %}
- linux.system.ssd_scheduler
{%- endif %}
{%- if system.login_defs is defined %}
diff --git a/linux/system/ssd_scheduler.sls b/linux/system/ssd_scheduler.sls
index fbf8586..fd1292e 100644
--- a/linux/system/ssd_scheduler.sls
+++ b/linux/system/ssd_scheduler.sls
@@ -1,5 +1,7 @@
{%- from "linux/map.jinja" import system with context %}
+{%- if system.ssd_scheduler.enabled %}
+
create_ssd_scheduler_udev_rule:
file.managed:
- name: /etc/udev/rules.d/60-ssd-scheduler.rules
@@ -15,3 +17,5 @@
- name: /bin/udevadm trigger -a queue/scheduler
- onchanges:
- file: /etc/udev/rules.d/60-ssd-scheduler.rules
+
+{%- endif %}
\ No newline at end of file