Remove deprecated swift_hash_suffix
swift_hash_suffix was deprecated in Mitaka and should be removed in Newton. See http://docs.openstack.org/icehouse/config-reference/content/swift-general-service-configuration.html Change-Id: I3b5c55607bcd8a2aa5288cdfefa96a152d1682cb
This commit is contained in:
parent
6790b2007c
commit
2d84cf4e16
@ -47,7 +47,7 @@ To utilize the swift module's functionality you will need to declare multiple re
|
||||
|
||||
```puppet
|
||||
class { 'swift':
|
||||
swift_hash_suffix => 'swift_secret',
|
||||
swift_hash_path_suffix => 'swift_secret',
|
||||
}
|
||||
|
||||
swift::storage::loopback { ['1', '2']:
|
||||
@ -99,10 +99,10 @@ Usage
|
||||
Class that will set up the base packages and the base /etc/swift/swift.conf
|
||||
|
||||
```puppet
|
||||
class { 'swift': swift_hash_suffix => 'shared_secret', }
|
||||
class { 'swift': swift_hash_path_suffix => 'shared_secret', }
|
||||
```
|
||||
|
||||
####`swift_hash_suffix`
|
||||
####`swift_hash_path_suffix`
|
||||
The shared salt used when hashing ring mappings.
|
||||
|
||||
### Class swift::proxy
|
||||
|
@ -13,7 +13,7 @@
|
||||
# string.
|
||||
#
|
||||
# [*swift_hash_path_prefix*]
|
||||
# (Required)String. A prefix used by hash_path to offer a bit more security
|
||||
# (Required) String. A prefix used by hash_path to offer a bit more security
|
||||
# when generating hashes for paths. It simply prepends this value to all paths;
|
||||
# if someone knows this prefix, it's easier for them to guess the hash a path
|
||||
# will end up with. New installations are advised to set this parameter to a
|
||||
@ -23,22 +23,18 @@
|
||||
# as a salt when hashing to determine mappings in the ring.
|
||||
# This file should be the same on every node in the cluster.
|
||||
#
|
||||
# [*package_ensure*] The ensure state for the swift package.
|
||||
# (Optional) Defaults to present.
|
||||
# [*package_ensure*]
|
||||
# (Optional) The ensure state for the swift package.
|
||||
# Defaults to present.
|
||||
#
|
||||
# [*client_package_ensure*] The ensure state for the swift client package.
|
||||
# (Optional) Defaults to present.
|
||||
# [*client_package_ensure*]
|
||||
# (Optional) The ensure state for the swift client package.
|
||||
# Defaults to present.
|
||||
#
|
||||
# [*max_header_size*] Max HTTP header size for incoming requests for all swift
|
||||
# [*max_header_size*]
|
||||
# (Optional) Max HTTP header size for incoming requests for all swift
|
||||
# services. Recommended size is 32768 for PKI keystone tokens.
|
||||
# (Optional) Defaults to 8192
|
||||
|
||||
## DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*swift_hash_suffix*]
|
||||
# DEPRECATED. 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.
|
||||
# Defaults to 8192
|
||||
#
|
||||
# == Dependencies
|
||||
#
|
||||
@ -58,20 +54,13 @@ class swift(
|
||||
$package_ensure = 'present',
|
||||
$client_package_ensure = 'present',
|
||||
$max_header_size = '8192',
|
||||
# DEPRECATED PARAMETERS
|
||||
$swift_hash_suffix = undef,
|
||||
) {
|
||||
|
||||
include ::swift::deps
|
||||
include ::swift::params
|
||||
|
||||
if ($swift_hash_suffix == undef and $swift_hash_path_suffix == undef) {
|
||||
fail('You must specify swift_hash_path_suffix')
|
||||
} elsif ($swift_hash_suffix != undef and $swift_hash_path_suffix == undef) {
|
||||
warning('swift_hash_suffix has been deprecated and should be replaced with swift_hash_path_suffix, this will be removed as part of the N-cycle')
|
||||
$swift_hash_path_suffix_real = $swift_hash_suffix
|
||||
} else {
|
||||
$swift_hash_path_suffix_real = $swift_hash_path_suffix
|
||||
if ($swift_hash_path_prefix == undef and $swift_hash_path_suffix == undef) {
|
||||
fail('You must specify at least swift_hash_path_prefix or swift_hash_path_suffix')
|
||||
}
|
||||
|
||||
if !defined(Package['swift']) {
|
||||
@ -114,7 +103,7 @@ class swift(
|
||||
File['/etc/swift/swift.conf'] -> Swift_config<||>
|
||||
|
||||
swift_config {
|
||||
'swift-hash/swift_hash_path_suffix': value => $swift_hash_path_suffix_real;
|
||||
'swift-hash/swift_hash_path_suffix': value => $swift_hash_path_suffix;
|
||||
'swift-hash/swift_hash_path_prefix': value => $swift_hash_path_prefix;
|
||||
'swift-constraints/max_header_size': value => $max_header_size;
|
||||
}
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
other:
|
||||
- remove swift_hash_suffix deprecated in Mitaka and change
|
||||
tests to use swift_hash_path_suffix.
|
@ -21,7 +21,7 @@ describe 'basic swift' do
|
||||
# Swift resources
|
||||
class { '::swift':
|
||||
# not sure how I want to deal with this shared secret
|
||||
swift_hash_suffix => 'secrete',
|
||||
swift_hash_path_suffix => 'secrete',
|
||||
package_ensure => latest,
|
||||
}
|
||||
class { '::swift::keystone::auth':
|
||||
@ -102,7 +102,7 @@ describe 'basic swift' do
|
||||
# Swift resources
|
||||
class { '::swift':
|
||||
# not sure how I want to deal with this shared secret
|
||||
swift_hash_suffix => 'secrete',
|
||||
swift_hash_path_suffix => 'secrete',
|
||||
package_ensure => latest,
|
||||
}
|
||||
class { '::swift::keystone::auth':
|
||||
|
@ -22,7 +22,7 @@ describe 'swift::bench' do
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'swift': swift_hash_suffix => 'string' }"
|
||||
"class { 'swift': swift_hash_path_suffix => 'string' }"
|
||||
end
|
||||
|
||||
let :facts do
|
||||
|
@ -17,7 +17,7 @@ describe 'swift::dispersion' do
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'swift': swift_hash_suffix => 'string' }"
|
||||
"class { 'swift': swift_hash_path_suffix => 'string' }"
|
||||
end
|
||||
|
||||
let :facts do
|
||||
|
@ -11,7 +11,7 @@ describe 'swift::proxy::ceilometer' do
|
||||
let :pre_condition do
|
||||
'concat { "/etc/swift/proxy-server.conf": }
|
||||
class { "swift":
|
||||
swift_hash_suffix => "dummy"
|
||||
swift_hash_path_suffix => "dummy"
|
||||
}'
|
||||
end
|
||||
|
||||
|
@ -20,7 +20,7 @@ describe 'swift::proxy' do
|
||||
|
||||
let :pre_condition do
|
||||
"class { memcached: max_memory => 1}
|
||||
class { swift: swift_hash_suffix => string }"
|
||||
class { swift: swift_hash_path_suffix => string }"
|
||||
end
|
||||
|
||||
describe 'without the proxy local network ip address being specified' do
|
||||
@ -105,7 +105,7 @@ account_autocreate = true
|
||||
let :pre_condition do
|
||||
"
|
||||
class { memcached: max_memory => 1}
|
||||
class { swift: swift_hash_suffix => string }
|
||||
class { swift: swift_hash_path_suffix => string }
|
||||
swift_proxy_config { 'foo/bar': value => 'foo' }
|
||||
"
|
||||
end
|
||||
|
@ -17,7 +17,7 @@ describe 'swift::ringbuilder' do
|
||||
|
||||
let :pre_condition do
|
||||
"class { memcached: max_memory => 1}
|
||||
class { swift: swift_hash_suffix => string }"
|
||||
class { swift: swift_hash_path_suffix => string }"
|
||||
end
|
||||
|
||||
it 'should rebalance the ring for all ring types' do
|
||||
@ -57,7 +57,7 @@ describe 'swift::ringbuilder' do
|
||||
describe 'when specifying ring devices' do
|
||||
let :pre_condition do
|
||||
'class { memcached: max_memory => 1}
|
||||
class { swift: swift_hash_suffix => string }
|
||||
class { swift: swift_hash_path_suffix => string }
|
||||
ring_object_device { "127.0.0.1:6000/1":
|
||||
zone => 1,
|
||||
weight => 1,
|
||||
|
@ -8,7 +8,7 @@ describe 'swift::ringserver' do
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'swift::storage': storage_local_net_ip => '127.0.0.1' }
|
||||
class {'swift' : swift_hash_suffix => 'eee' }
|
||||
class {'swift' : swift_hash_path_suffix => 'eee' }
|
||||
include swift::ringbuilder"
|
||||
end
|
||||
|
||||
@ -46,7 +46,7 @@ describe 'swift::ringserver' do
|
||||
context 'when storage.pp was not already included' do
|
||||
|
||||
let :pre_condition do
|
||||
"class {'swift' : swift_hash_suffix => 'eee' }
|
||||
"class {'swift' : swift_hash_path_suffix => 'eee' }
|
||||
include swift::ringbuilder"
|
||||
end
|
||||
|
||||
|
@ -4,7 +4,7 @@ describe 'swift' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:swift_hash_suffix => 'string',
|
||||
:swift_hash_path_suffix => 'string',
|
||||
:max_header_size => '16384',
|
||||
}
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
describe 'swift::storage::account' do
|
||||
let :pre_condition do
|
||||
"class { 'swift': swift_hash_suffix => 'foo' }
|
||||
"class { 'swift': swift_hash_path_suffix => 'foo' }
|
||||
class { 'swift::storage': storage_local_net_ip => '10.0.0.1' }"
|
||||
end
|
||||
|
||||
|
@ -10,7 +10,7 @@ describe 'swift::storage::all' do
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'swift': swift_hash_suffix => 'changeme' }"
|
||||
"class { 'swift': swift_hash_path_suffix => 'changeme' }"
|
||||
end
|
||||
|
||||
let :default_params do
|
||||
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
describe 'swift::storage::container' do
|
||||
let :pre_condition do
|
||||
"class { 'swift': swift_hash_suffix => 'foo' }
|
||||
"class { 'swift': swift_hash_path_suffix => 'foo' }
|
||||
class { 'swift::storage': storage_local_net_ip => '10.0.0.1' }"
|
||||
end
|
||||
|
||||
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
||||
describe 'swift::storage::object' do
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'swift': swift_hash_suffix => 'foo' }
|
||||
"class { 'swift': swift_hash_path_suffix => 'foo' }
|
||||
class { 'swift::storage': storage_local_net_ip => '10.0.0.1' }"
|
||||
end
|
||||
|
||||
|
@ -10,7 +10,7 @@ describe 'swift::storage' do
|
||||
|
||||
describe 'when required classes are specified' do
|
||||
let :pre_condition do
|
||||
"class { 'swift': swift_hash_suffix => 'changeme' }"
|
||||
"class { 'swift': swift_hash_path_suffix => 'changeme' }"
|
||||
end
|
||||
|
||||
describe 'when the local net ip is specified' do
|
||||
|
@ -14,7 +14,7 @@ describe 'swift::storage::generic' do
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'swift': swift_hash_suffix => 'foo' }
|
||||
"class { 'swift': swift_hash_path_suffix => 'foo' }
|
||||
class { 'swift::storage': storage_local_net_ip => '10.0.0.1' }"
|
||||
end
|
||||
|
||||
|
@ -20,7 +20,7 @@ describe 'swift::storage::node' do
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'swift': swift_hash_suffix => 'foo' }
|
||||
"class { 'swift': swift_hash_path_suffix => 'foo' }
|
||||
class { 'swift::storage': storage_local_net_ip => '127.0.0.1' }"
|
||||
end
|
||||
|
||||
|
@ -11,7 +11,7 @@ describe 'swift::storage::server' do
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'swift': swift_hash_suffix => 'foo' }
|
||||
"class { 'swift': swift_hash_path_suffix => 'foo' }
|
||||
class { 'swift::storage': storage_local_net_ip => '10.0.0.1' }"
|
||||
end
|
||||
let :default_params do
|
||||
@ -123,7 +123,7 @@ describe 'swift::storage::server' do
|
||||
describe "when using swift_#{t}_config resource" do
|
||||
let :pre_condition do
|
||||
"
|
||||
class { 'swift': swift_hash_suffix => 'foo' }
|
||||
class { 'swift': swift_hash_path_suffix => 'foo' }
|
||||
class { 'swift::storage': storage_local_net_ip => '10.0.0.1' }
|
||||
swift_#{t}_config { 'foo/bar': value => 'foo' }
|
||||
"
|
||||
|
@ -17,8 +17,8 @@ class { '::memcached':
|
||||
|
||||
class { '::swift':
|
||||
# not sure how I want to deal with this shared secret
|
||||
swift_hash_suffix => $swift_shared_secret,
|
||||
package_ensure => latest,
|
||||
swift_hash_path_suffix => $swift_shared_secret,
|
||||
package_ensure => latest,
|
||||
}
|
||||
|
||||
# === Configure Storage
|
||||
|
@ -124,8 +124,8 @@ node /swift-storage/ {
|
||||
|
||||
class { '::swift':
|
||||
# not sure how I want to deal with this shared secret
|
||||
swift_hash_suffix => $swift_shared_secret,
|
||||
package_ensure => latest,
|
||||
swift_hash_path_suffix => $swift_shared_secret,
|
||||
package_ensure => latest,
|
||||
}
|
||||
|
||||
# create xfs partitions on a loopback device and mount them
|
||||
@ -188,8 +188,8 @@ node /swift-proxy/ {
|
||||
|
||||
class { '::swift':
|
||||
# not sure how I want to deal with this shared secret
|
||||
swift_hash_suffix => $swift_shared_secret,
|
||||
package_ensure => latest,
|
||||
swift_hash_path_suffix => $swift_shared_secret,
|
||||
package_ensure => latest,
|
||||
}
|
||||
|
||||
# curl is only required so that I can run tests
|
||||
|
Loading…
Reference in New Issue
Block a user