From: Andy McCrae Date: Thu, 10 May 2018 10:15:30 +0000 (+0100) Subject: Allow os_tuning_params to overwrite fs.aio-max-nr X-Git-Tag: v3.1.0rc3~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=54ef0496dabb1e6e50ff33a2b2b4fb796f775897;p=ceph-ansible.git Allow os_tuning_params to overwrite fs.aio-max-nr 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. (cherry picked from commit 08a2b58d39a687e25436afdf3fda1591d3be8ca1) --- diff --git a/roles/ceph-osd/tasks/system_tuning.yml b/roles/ceph-osd/tasks/system_tuning.yml index b900c9ac7..a1e3eb58d 100644 --- a/roles/ceph-osd/tasks/system_tuning.yml +++ b/roles/ceph-osd/tasks/system_tuning.yml @@ -61,13 +61,7 @@ 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)