From 19b2ecfc865f0f4d50100a9056e7e2425fa7c508 Mon Sep 17 00:00:00 2001 From: James Page Date: Mon, 18 Jan 2016 16:42:36 +0000 Subject: [PATCH] Add configuration option for toggling use of direct io for OSD journals --- config.yaml | 5 +++++ hooks/ceph_hooks.py | 1 + templates/ceph.conf | 1 + 3 files changed, 7 insertions(+) diff --git a/config.yaml b/config.yaml index 2dc2a586..2afa6afc 100644 --- a/config.yaml +++ b/config.yaml @@ -152,3 +152,8 @@ options: description: | A comma-separated list of nagios servicegroups. If left empty, the nagios_context will be used as the servicegroup + use-direct-io: + default: True + type: boolean + description: Configure use of direct IO for OSD journals. + diff --git a/hooks/ceph_hooks.py b/hooks/ceph_hooks.py index aa22646c..dc0815ff 100755 --- a/hooks/ceph_hooks.py +++ b/hooks/ceph_hooks.py @@ -84,6 +84,7 @@ def emit_cephconf(): 'ceph_public_network': config('ceph-public-network'), 'ceph_cluster_network': config('ceph-cluster-network'), 'loglevel': config('loglevel'), + 'dio': str(config('use-direct-io')).lower(), } if config('prefer-ipv6'): diff --git a/templates/ceph.conf b/templates/ceph.conf index 0696142a..edd4f646 100644 --- a/templates/ceph.conf +++ b/templates/ceph.conf @@ -40,4 +40,5 @@ keyring = /var/lib/ceph/mds/$cluster-$id/keyring keyring = /var/lib/ceph/osd/$cluster-$id/keyring osd journal size = {{ osd_journal_size }} filestore xattr use omap = true +journal dio = {{ dio }}