From 3ebd71c8c2aacb2ac6a55b98d85963805942e3f0 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Wed, 6 Nov 2019 10:15:53 -0500 Subject: [PATCH] ceph-osd: fix fs.aio-max-nr sysctl condition [1] introduced a regression on the fs.aio-max-nr sysctl value condition. The enable key isn't a boolean but a string because the expression isn't evaluated. This string output "(osd_objectstore == 'bluestore')" is always true because item.enable condition only matches non empty string. So the sysctl value was applyied for both filestore and bluestore backend. [2] added the bool filter to the condition but the filter always returns false on string and the sysctl wasn't applyed at all. This commit fixes the enable key value by evaluating the value instead of using the string. [1] https://github.com/ceph/ceph-ansible/commit/08a2b58 [2] https://github.com/ceph/ceph-ansible/commit/ab54fe2 Signed-off-by: Dimitri Savineau (cherry picked from commit ece46d33be566994d6ce799fdc4547299b352429) --- roles/ceph-osd/tasks/system_tuning.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ceph-osd/tasks/system_tuning.yml b/roles/ceph-osd/tasks/system_tuning.yml index 21ff94d28..86a157a8d 100644 --- a/roles/ceph-osd/tasks/system_tuning.yml +++ b/roles/ceph-osd/tasks/system_tuning.yml @@ -56,6 +56,6 @@ sysctl_set: yes ignoreerrors: yes with_items: - - { name: "fs.aio-max-nr", value: "1048576", enable: (osd_objectstore == 'bluestore') } + - { name: "fs.aio-max-nr", value: "1048576", enable: "{{ osd_objectstore == 'bluestore' }}" } - "{{ os_tuning_params }}" when: item.enable | default(true) | bool -- 2.39.5