components/ruby/puppet-modules/openstack-swift/patches/03-init.patch
changeset 6817 e4a26f447d0c
parent 5860 afd31ba91ee9
child 6917 6936cd289acf
equal deleted inserted replaced
6816:bb11bcf4ebf8 6817:e4a26f447d0c
     2 has not yet been submitted upstream due to requirements for 3rd party
     2 has not yet been submitted upstream due to requirements for 3rd party
     3 CI testing.
     3 CI testing.
     4 
     4 
     5 --- openstack-swift-6.1.0/manifests/init.pp.orig	2016-04-21 09:04:49.670248833 -0700
     5 --- openstack-swift-6.1.0/manifests/init.pp.orig	2016-04-21 09:04:49.670248833 -0700
     6 +++ openstack-swift-6.1.0/manifests/init.pp	2016-04-21 09:05:19.849256812 -0700
     6 +++ openstack-swift-6.1.0/manifests/init.pp	2016-04-21 09:05:19.849256812 -0700
     7 @@ -1,7 +1,15 @@
     7 @@ -1,3 +1,7 @@
     8 +#######################################################################
     8 +#######################################################################
     9 +# Oracle has modified the originally distributed contents of this file.
     9 +# Oracle has modified the originally distributed contents of this file.
    10 +#######################################################################
    10 +#######################################################################
    11 +
    11 +
    12  # Install and configure base swift components
    12  # Install and configure base swift components
    13  #
    13  #
    14  # == Parameters
    14  # == Parameters
    15  #
    15 @@ -85,27 +89,6 @@ class swift(
    16 +# [*swift_hash_prefix*] string of text to be used
       
    17 +#   as a salt when hashing to determine mappings in the ring.
       
    18 +#   This file should be the same on every node in the cluster.
       
    19 +#
       
    20  # [*swift_hash_suffix*] string of text to be used
       
    21  #   as a salt when hashing to determine mappings in the ring.
       
    22  #   This file should be the same on every node in the cluster.
       
    23 @@ -29,6 +37,7 @@
       
    24  # Copyright 2011 Puppetlabs Inc, unless otherwise noted.
       
    25  #
       
    26  class swift(
       
    27 +  $swift_hash_prefix,
       
    28    $swift_hash_suffix,
       
    29    $package_ensure        = 'present',
       
    30    $client_package_ensure = 'present',
       
    31 @@ -49,27 +58,9 @@
       
    32      ensure => $client_package_ensure;
    16      ensure => $client_package_ensure;
    33    }
    17    }
    34  
    18 
    35 -  File { owner => 'swift', group => 'swift', require => Package['swift'] }
    19 -  File { owner => 'swift', group => 'swift', require => Package['swift'] }
    36 -
    20 -
    37 -  file { '/etc/swift':
    21 -  file { '/etc/swift':
    38 -    ensure => directory,
    22 -    ensure => directory,
    39 -    mode   => '2770',
       
    40 -  }
    23 -  }
    41 -  user {'swift':
    24 -  user {'swift':
    42 -    ensure => present,
    25 -    ensure  => present,
       
    26 -    require => Package['swift'],
    43 -  }
    27 -  }
    44 -  file { '/var/lib/swift':
    28 -  file { '/var/lib/swift':
    45 -    ensure => directory,
    29 -    ensure => directory,
    46 -  }
    30 -  }
    47 -  file { '/var/run/swift':
    31 -  file { '/var/run/swift':
    48 -    ensure => directory,
    32 -    ensure                  => directory,
       
    33 -    selinux_ignore_defaults => true,
    49 -  }
    34 -  }
    50 -
    35 -
    51 -  file { '/etc/swift/swift.conf':
    36 -  file { '/etc/swift/swift.conf':
    52 -    ensure => file,
    37 -    ensure => file,
    53 -    mode   => '0660',
    38 -  }
    54 +  swift_config { 'swift-hash/swift_hash_path_prefix':
       
    55 +    value => $swift_hash_prefix,
       
    56    }
       
    57 -
    39 -
    58    swift_config { 'swift-hash/swift_hash_path_suffix':
    40    File['/etc/swift/swift.conf'] -> Swift_config<||>
    59      value => $swift_hash_suffix,
    41 
    60    }
    42    swift_config {