aboutsummaryrefslogtreecommitdiffstats
path: root/patches/fuel-library/0001-ceph-Fix-obsolete-XFS-mount-param-delaylog.patch
blob: facde8f29a52eed2f18e89ace62708e907b49021 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Sun, 27 Mar 2016 20:32:50 +0200
Subject: [PATCH] ceph: Fix obsolete XFS mount param "delaylog".

According to [1], "delaylog" mount arg is now enforced by default,
and passing it will lead to mount failure.

Trim "delaylog" from default list of xfs mount args and leave it up to
ceph-osd.pp to add this obsoleted arg only for targets running a kernel
older than 4.0.

[1] https://www.kernel.org/doc/Documentation/filesystems/xfs.txt
---
 deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp   | 7 +++++++
 deployment/puppet/osnailyfacter/manifests/globals/globals.pp | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp b/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp
index 2480f18..0957010 100644
--- a/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp
+++ b/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp
@@ -35,6 +35,13 @@ class osnailyfacter::ceph::ceph_osd {
   }

   if $ceph_tuning_settings_hash != {} {
+    if versioncmp($::kernelmajversion, '4.0') < 0 {
+      # FIXME(armband): XFS mount opt delaylog is deprecated in kernels >=4.0.
+      $ceph_tuning_settings_hash['osd_mount_options_xfs'] = join([
+        $ceph_tuning_settings_hash['osd_mount_options_xfs'],
+        'delaylog'
+      ], ',')
+    }
     ceph_conf {
       'global/debug_default'                    : value => $debug;
       'global/max_open_files'                   : value => $ceph_tuning_settings_hash['max_open_files'];
diff --git a/deployment/puppet/osnailyfacter/manifests/globals/globals.pp b/deployment/puppet/osnailyfacter/manifests/globals/globals.pp
index 854d297..7345d66 100644
--- a/deployment/puppet/osnailyfacter/manifests/globals/globals.pp
+++ b/deployment/puppet/osnailyfacter/manifests/globals/globals.pp
@@ -148,7 +148,7 @@ class osnailyfacter::globals::globals {
     $ceph_tuning_settings = {
       'max_open_files'                       => pick($storage_tuning_settings['max_open_files'], '131072'),
       'osd_mkfs_type'                        => pick($storage_tuning_settings['osd_mkfs_type'], 'xfs'),
-      'osd_mount_options_xfs'                => pick($storage_tuning_settings['osd_mount_options_xfs'], 'rw,relatime,inode64,logbsize=256k,delaylog,allocsize=4M'),
+      'osd_mount_options_xfs'                => pick($storage_tuning_settings['osd_mount_options_xfs'], 'rw,relatime,inode64,logbsize=256k,allocsize=4M'),
       'osd_op_threads'                       => pick($storage_tuning_settings['osd_op_threads'], '20'),
       'filestore_queue_max_ops'              => pick($storage_tuning_settings['filestore_queue_max_ops'], '500'),
       'filestore_queue_committing_max_ops'   => pick($storage_tuning_settings['filestore_queue_committing_max_ops'], '5000'),