From 8211795de956540090cbe9518679808a05450ce6 Mon Sep 17 00:00:00 2001 From: Bharat Kunwar Date: Fri, 16 Aug 2019 15:18:45 +0100 Subject: [PATCH] Separate disk tuning from system tuning At present, when tuning is enabled, the role assumes that all oss paths are block devices. This leads to failure in some cases. This patch attempts to separate the logic. --- tasks/tuning.yml | 1 - templates/beegfs-oss-tuning.sh.j2 | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/tuning.yml b/tasks/tuning.yml index c112750..a5534f5 100644 --- a/tasks/tuning.yml +++ b/tasks/tuning.yml @@ -29,5 +29,4 @@ src: beegfs-oss-tuning.service dest: /etc/systemd/system/ notify: Restart BeeGFS tuning service - when: beegfs_oss_tunable | default([]) | length > 0 become: true diff --git a/templates/beegfs-oss-tuning.sh.j2 b/templates/beegfs-oss-tuning.sh.j2 index be5a23e..e884db8 100644 --- a/templates/beegfs-oss-tuning.sh.j2 +++ b/templates/beegfs-oss-tuning.sh.j2 @@ -5,6 +5,7 @@ set -x echo always > /sys/kernel/mm/transparent_hugepage/enabled echo always > /sys/kernel/mm/transparent_hugepage/defrag +{% if beegfs_oss_tunable | length > 0 %} for dev in {{ beegfs_oss_tunable | join(' ') }} do if [ -d /sys/block/${dev} ]; then @@ -14,3 +15,4 @@ do echo 256 > /sys/block/${dev}/queue/max_sectors_kb fi done +{% endif %}