components/ruby/puppet-modules/openstack-swift/patches/03-init.patch
author Patrick Einheber <patrick.einheber@oracle.com>
Wed, 27 Apr 2016 14:55:10 -0700
changeset 5860 afd31ba91ee9
parent 5464 6e2e17e6aa45
child 6817 e4a26f447d0c
permissions -rw-r--r--
23146903 Puppet and OpenStack modules need modification notices

In-house patch to add support for Solaris 11.3 and 12.0.  This patch
has not yet been submitted upstream due to requirements for 3rd party
CI testing.

--- openstack-swift-6.1.0/manifests/init.pp.orig	2016-04-21 09:04:49.670248833 -0700
+++ openstack-swift-6.1.0/manifests/init.pp	2016-04-21 09:05:19.849256812 -0700
@@ -1,7 +1,15 @@
+#######################################################################
+# Oracle has modified the originally distributed contents of this file.
+#######################################################################
+
 # Install and configure base swift components
 #
 # == Parameters
 #
+# [*swift_hash_prefix*] string of text to be used
+#   as a salt when hashing to determine mappings in the ring.
+#   This file should be the same on every node in the cluster.
+#
 # [*swift_hash_suffix*] string of text to be used
 #   as a salt when hashing to determine mappings in the ring.
 #   This file should be the same on every node in the cluster.
@@ -29,6 +37,7 @@
 # Copyright 2011 Puppetlabs Inc, unless otherwise noted.
 #
 class swift(
+  $swift_hash_prefix,
   $swift_hash_suffix,
   $package_ensure        = 'present',
   $client_package_ensure = 'present',
@@ -49,27 +58,9 @@
     ensure => $client_package_ensure;
   }
 
-  File { owner => 'swift', group => 'swift', require => Package['swift'] }
-
-  file { '/etc/swift':
-    ensure => directory,
-    mode   => '2770',
-  }
-  user {'swift':
-    ensure => present,
-  }
-  file { '/var/lib/swift':
-    ensure => directory,
-  }
-  file { '/var/run/swift':
-    ensure => directory,
-  }
-
-  file { '/etc/swift/swift.conf':
-    ensure => file,
-    mode   => '0660',
+  swift_config { 'swift-hash/swift_hash_path_prefix':
+    value => $swift_hash_prefix,
   }
-
   swift_config { 'swift-hash/swift_hash_path_suffix':
     value => $swift_hash_suffix,
   }