Merge "fuel-plugin-opendaylight: Prebuilt leveldbjni DEB"
[armband.git] / patches / fuel-library / 0001-ceph-Fix-obsolete-XFS-mount-param-delaylog.patch
1 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2 Date: Sun, 27 Mar 2016 20:32:50 +0200
3 Subject: [PATCH] ceph: Fix obsolete XFS mount param "delaylog".
4
5 According to [1], "delaylog" mount arg is now enforced by default,
6 and passing it will lead to mount failure.
7
8 Trim "delaylog" from default list of xfs mount args and leave it up to
9 ceph-osd.pp to add this obsoleted arg only for targets running a kernel
10 older than 4.0.
11
12 [1] https://www.kernel.org/doc/Documentation/filesystems/xfs.txt
13 ---
14  deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp   | 7 +++++++
15  deployment/puppet/osnailyfacter/manifests/globals/globals.pp | 2 +-
16  2 files changed, 8 insertions(+), 1 deletion(-)
17
18 diff --git a/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp b/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp
19 index 2480f18..0957010 100644
20 --- a/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp
21 +++ b/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp
22 @@ -35,6 +35,13 @@ class osnailyfacter::ceph::ceph_osd {
23    }
24
25    if $ceph_tuning_settings_hash != {} {
26 +    if versioncmp($::kernelmajversion, '4.0') < 0 {
27 +      # FIXME(armband): XFS mount opt delaylog is deprecated in kernels >=4.0.
28 +      $ceph_tuning_settings_hash['osd_mount_options_xfs'] = join([
29 +        $ceph_tuning_settings_hash['osd_mount_options_xfs'],
30 +        'delaylog'
31 +      ], ',')
32 +    }
33      ceph_conf {
34        'global/debug_default'                    : value => $debug;
35        'global/max_open_files'                   : value => $ceph_tuning_settings_hash['max_open_files'];
36 diff --git a/deployment/puppet/osnailyfacter/manifests/globals/globals.pp b/deployment/puppet/osnailyfacter/manifests/globals/globals.pp
37 index 854d297..7345d66 100644
38 --- a/deployment/puppet/osnailyfacter/manifests/globals/globals.pp
39 +++ b/deployment/puppet/osnailyfacter/manifests/globals/globals.pp
40 @@ -148,7 +148,7 @@ class osnailyfacter::globals::globals {
41      $ceph_tuning_settings = {
42        'max_open_files'                       => pick($storage_tuning_settings['max_open_files'], '131072'),
43        'osd_mkfs_type'                        => pick($storage_tuning_settings['osd_mkfs_type'], 'xfs'),
44 -      'osd_mount_options_xfs'                => pick($storage_tuning_settings['osd_mount_options_xfs'], 'rw,relatime,inode64,logbsize=256k,delaylog,allocsize=4M'),
45 +      'osd_mount_options_xfs'                => pick($storage_tuning_settings['osd_mount_options_xfs'], 'rw,relatime,inode64,logbsize=256k,allocsize=4M'),
46        'osd_op_threads'                       => pick($storage_tuning_settings['osd_op_threads'], '20'),
47        'filestore_queue_max_ops'              => pick($storage_tuning_settings['filestore_queue_max_ops'], '500'),
48        'filestore_queue_committing_max_ops'   => pick($storage_tuning_settings['filestore_queue_committing_max_ops'], '5000'),