components/ruby/puppet-modules/openstack-swift/patches/03-init.patch
author Drew Fisher <drew.fisher@oracle.com>
Tue, 16 Feb 2016 13:47:43 -0800
changeset 5464 6e2e17e6aa45
child 5860 afd31ba91ee9
permissions -rw-r--r--
PSARC/2016/001 OpenStack Puppet Modules 22491714 Request to integrate OpenStack Puppet modules
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5464
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     1
In-house patch to add support for Solaris 11.3 and 12.0.  This patch
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     2
has not yet been submitted upstream due to requirements for 3rd party
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     3
CI testing.
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     4
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     5
--- openstack-swift-6.1.0/manifests/init.pp.orig     2015-08-10 11:12:30.293187329 -0700
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     6
+++ openstack-swift-6.1.0/manifests/init.pp     2015-08-10 11:13:32.086133292 -0700
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     7
@@ -2,6 +2,10 @@
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     8
 #
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     9
 # == Parameters
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    10
 #
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    11
+# [*swift_hash_prefix*] string of text to be used
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    12
+#   as a salt when hashing to determine mappings in the ring.
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    13
+#   This file should be the same on every node in the cluster.
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    14
+#
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    15
 # [*swift_hash_suffix*] string of text to be used
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    16
 #   as a salt when hashing to determine mappings in the ring.
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    17
 #   This file should be the same on every node in the cluster.
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    18
@@ -29,6 +33,7 @@
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    19
 # Copyright 2011 Puppetlabs Inc, unless otherwise noted.
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    20
 #
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    21
 class swift(
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    22
+  $swift_hash_prefix,
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    23
   $swift_hash_suffix,
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    24
   $package_ensure        = 'present',
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    25
   $client_package_ensure = 'present',
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    26
@@ -49,27 +54,9 @@ class swift(
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    27
     ensure => $client_package_ensure;
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    28
   }
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    29
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    30
-  File { owner => 'swift', group => 'swift', require => Package['swift'] }
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    31
-
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    32
-  file { '/etc/swift':
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    33
-    ensure => directory,
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    34
-    mode   => '2770',
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    35
-  }
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    36
-  user {'swift':
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    37
-    ensure => present,
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    38
-  }
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    39
-  file { '/var/lib/swift':
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    40
-    ensure => directory,
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    41
-  }
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    42
-  file { '/var/run/swift':
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    43
-    ensure => directory,
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    44
-  }
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    45
-
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    46
-  file { '/etc/swift/swift.conf':
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    47
-    ensure => file,
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    48
-    mode   => '0660',
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    49
+  swift_config { 'swift-hash/swift_hash_path_prefix':
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    50
+    value => $swift_hash_prefix,
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    51
   }
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    52
-
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    53
   swift_config { 'swift-hash/swift_hash_path_suffix':
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    54
     value => $swift_hash_suffix,
6e2e17e6aa45 PSARC/2016/001 OpenStack Puppet Modules
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    55
   }