Merge "target Ubuntu: Blacklist rtc-efi if not supported."
[armband.git] / patches / fuel-library / 0011-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/modular/ceph/ceph-osd.pp   | 7 +++++++
15  deployment/puppet/osnailyfacter/modular/globals/globals.pp | 2 +-
16  2 files changed, 8 insertions(+), 1 deletion(-)
17
18 diff --git a/deployment/puppet/osnailyfacter/modular/ceph/ceph-osd.pp b/deployment/puppet/osnailyfacter/modular/ceph/ceph-osd.pp
19 index f7da80e..22aab33 100644
20 --- a/deployment/puppet/osnailyfacter/modular/ceph/ceph-osd.pp
21 +++ b/deployment/puppet/osnailyfacter/modular/ceph/ceph-osd.pp
22 @@ -50,6 +50,13 @@ class {'ceph':
23  }
24  
25  if $ceph_tuning_settings != {} {
26 +  if versioncmp($::kernelmajversion, '4.0') < 0 {
27 +    # FIXME(armband): XFS mount opt delaylog is deprecated in kernels >=4.0.
28 +    $ceph_tuning_settings['osd_mount_options_xfs'] = join([
29 +      $ceph_tuning_settings['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['max_open_files'];
36 diff --git a/deployment/puppet/osnailyfacter/modular/globals/globals.pp b/deployment/puppet/osnailyfacter/modular/globals/globals.pp
37 index 268a5b1..69aed7b 100644
38 --- a/deployment/puppet/osnailyfacter/modular/globals/globals.pp
39 +++ b/deployment/puppet/osnailyfacter/modular/globals/globals.pp
40 @@ -123,7 +123,7 @@ if ($storage_hash['volumes_ceph'] or $storage_hash['images_ceph'] or $storage_ha
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'),