]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Allow os_tuning_params to overwrite fs.aio-max-nr
authorAndy McCrae <andy.mccrae@gmail.com>
Thu, 10 May 2018 10:15:30 +0000 (11:15 +0100)
committerAndy McCrae <andy.mccrae@googlemail.com>
Fri, 11 May 2018 09:49:37 +0000 (10:49 +0100)
The order of fs.aio-max-nr (which is hard-coded to 1048576) means that
if you set fs.aio-max-nr in os_tuning_params it will effectively be
ignored for bluestore scenarios.

To resolve this we should move the setting of fs.aio-max-nr above the
setting of os_tuning_params, in this way the operator can define the
value of fs.aio-max-nr to be something other than 1048576 if they want
to.

Additionally, we can make the sysctl settings happen in 1 task rather
than multiple.

roles/ceph-osd/tasks/system_tuning.yml

index b900c9ac7e367f7a80b669a4c0fb065f7b02eb56..a1e3eb58d0371155b683b890b11372805e9ba3cc 100644 (file)
     sysctl_file: /etc/sysctl.d/ceph-tuning.conf
     sysctl_set: yes
     ignoreerrors: yes
-  with_items: "{{ os_tuning_params }}"
-
-- name: increase aio-max-nr for bluestore
-  sysctl:
-    name: fs.aio-max-nr
-    value: 1048576
-    sysctl_file: /etc/sysctl.d/ceph-tuning.conf
-    sysctl_set: yes
-  when:
-    - osd_objectstore == 'bluestore'
+  with_items:
+    - { name: "fs.aio-max-nr", value: "1048576", enable: (osd_objectstore == 'bluestore') }
+    - "{{ os_tuning_params }}"
+  when: item.enable | default(true)