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
README.md
manifests
releasenotes/notes
spec
acceptance
classes
swift_bench_spec.rbswift_dispersion_spec.rbswift_proxy_ceilometer_spec.rbswift_proxy_spec.rbswift_ringbuilder_spec.rbswift_ringserver_spec.rbswift_spec.rbswift_storage_account_spec.rbswift_storage_all_spec.rbswift_storage_container_spec.rbswift_storage_object_spec.rbswift_storage_spec.rb
defines
tests
@ -47,7 +47,7 @@ To utilize the swift module's functionality you will need to declare multiple re
|
|||||||
|
|
||||||
```puppet
|
```puppet
|
||||||
class { 'swift':
|
class { 'swift':
|
||||||
swift_hash_suffix => 'swift_secret',
|
swift_hash_path_suffix => 'swift_secret',
|
||||||
}
|
}
|
||||||
|
|
||||||
swift::storage::loopback { ['1', '2']:
|
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
|
Class that will set up the base packages and the base /etc/swift/swift.conf
|
||||||
|
|
||||||
```puppet
|
```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.
|
The shared salt used when hashing ring mappings.
|
||||||
|
|
||||||
### Class swift::proxy
|
### Class swift::proxy
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# string.
|
# string.
|
||||||
#
|
#
|
||||||
# [*swift_hash_path_prefix*]
|
# [*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;
|
# 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
|
# 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
|
# 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.
|
# as a salt when hashing to determine mappings in the ring.
|
||||||
# This file should be the same on every node in the cluster.
|
# This file should be the same on every node in the cluster.
|
||||||
#
|
#
|
||||||
# [*package_ensure*] The ensure state for the swift package.
|
# [*package_ensure*]
|
||||||
# (Optional) Defaults to present.
|
# (Optional) The ensure state for the swift package.
|
||||||
|
# Defaults to present.
|
||||||
#
|
#
|
||||||
# [*client_package_ensure*] The ensure state for the swift client package.
|
# [*client_package_ensure*]
|
||||||
# (Optional) Defaults to present.
|
# (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.
|
# services. Recommended size is 32768 for PKI keystone tokens.
|
||||||
# (Optional) Defaults to 8192
|
# 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.
|
|
||||||
#
|
#
|
||||||
# == Dependencies
|
# == Dependencies
|
||||||
#
|
#
|
||||||
@ -58,20 +54,13 @@ class swift(
|
|||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$client_package_ensure = 'present',
|
$client_package_ensure = 'present',
|
||||||
$max_header_size = '8192',
|
$max_header_size = '8192',
|
||||||
# DEPRECATED PARAMETERS
|
|
||||||
$swift_hash_suffix = undef,
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::swift::deps
|
include ::swift::deps
|
||||||
include ::swift::params
|
include ::swift::params
|
||||||
|
|
||||||
if ($swift_hash_suffix == undef and $swift_hash_path_suffix == undef) {
|
if ($swift_hash_path_prefix == undef and $swift_hash_path_suffix == undef) {
|
||||||
fail('You must specify swift_hash_path_suffix')
|
fail('You must specify at least swift_hash_path_prefix or 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 !defined(Package['swift']) {
|
if !defined(Package['swift']) {
|
||||||
@ -114,7 +103,7 @@ class swift(
|
|||||||
File['/etc/swift/swift.conf'] -> Swift_config<||>
|
File['/etc/swift/swift.conf'] -> Swift_config<||>
|
||||||
|
|
||||||
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-hash/swift_hash_path_prefix': value => $swift_hash_path_prefix;
|
||||||
'swift-constraints/max_header_size': value => $max_header_size;
|
'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
|
# Swift resources
|
||||||
class { '::swift':
|
class { '::swift':
|
||||||
# not sure how I want to deal with this shared secret
|
# not sure how I want to deal with this shared secret
|
||||||
swift_hash_suffix => 'secrete',
|
swift_hash_path_suffix => 'secrete',
|
||||||
package_ensure => latest,
|
package_ensure => latest,
|
||||||
}
|
}
|
||||||
class { '::swift::keystone::auth':
|
class { '::swift::keystone::auth':
|
||||||
@ -102,7 +102,7 @@ describe 'basic swift' do
|
|||||||
# Swift resources
|
# Swift resources
|
||||||
class { '::swift':
|
class { '::swift':
|
||||||
# not sure how I want to deal with this shared secret
|
# not sure how I want to deal with this shared secret
|
||||||
swift_hash_suffix => 'secrete',
|
swift_hash_path_suffix => 'secrete',
|
||||||
package_ensure => latest,
|
package_ensure => latest,
|
||||||
}
|
}
|
||||||
class { '::swift::keystone::auth':
|
class { '::swift::keystone::auth':
|
||||||
|
@ -22,7 +22,7 @@ describe 'swift::bench' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'swift': swift_hash_suffix => 'string' }"
|
"class { 'swift': swift_hash_path_suffix => 'string' }"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :facts do
|
let :facts do
|
||||||
|
@ -17,7 +17,7 @@ describe 'swift::dispersion' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'swift': swift_hash_suffix => 'string' }"
|
"class { 'swift': swift_hash_path_suffix => 'string' }"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :facts do
|
let :facts do
|
||||||
|
@ -11,7 +11,7 @@ describe 'swift::proxy::ceilometer' do
|
|||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
'concat { "/etc/swift/proxy-server.conf": }
|
'concat { "/etc/swift/proxy-server.conf": }
|
||||||
class { "swift":
|
class { "swift":
|
||||||
swift_hash_suffix => "dummy"
|
swift_hash_path_suffix => "dummy"
|
||||||
}'
|
}'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ describe 'swift::proxy' do
|
|||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { memcached: max_memory => 1}
|
"class { memcached: max_memory => 1}
|
||||||
class { swift: swift_hash_suffix => string }"
|
class { swift: swift_hash_path_suffix => string }"
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'without the proxy local network ip address being specified' do
|
describe 'without the proxy local network ip address being specified' do
|
||||||
@ -105,7 +105,7 @@ account_autocreate = true
|
|||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"
|
"
|
||||||
class { memcached: max_memory => 1}
|
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' }
|
swift_proxy_config { 'foo/bar': value => 'foo' }
|
||||||
"
|
"
|
||||||
end
|
end
|
||||||
|
@ -17,7 +17,7 @@ describe 'swift::ringbuilder' do
|
|||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { memcached: max_memory => 1}
|
"class { memcached: max_memory => 1}
|
||||||
class { swift: swift_hash_suffix => string }"
|
class { swift: swift_hash_path_suffix => string }"
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should rebalance the ring for all ring types' do
|
it 'should rebalance the ring for all ring types' do
|
||||||
@ -57,7 +57,7 @@ describe 'swift::ringbuilder' do
|
|||||||
describe 'when specifying ring devices' do
|
describe 'when specifying ring devices' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
'class { memcached: max_memory => 1}
|
'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":
|
ring_object_device { "127.0.0.1:6000/1":
|
||||||
zone => 1,
|
zone => 1,
|
||||||
weight => 1,
|
weight => 1,
|
||||||
|
@ -8,7 +8,7 @@ describe 'swift::ringserver' do
|
|||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'swift::storage': storage_local_net_ip => '127.0.0.1' }
|
"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"
|
include swift::ringbuilder"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ describe 'swift::ringserver' do
|
|||||||
context 'when storage.pp was not already included' do
|
context 'when storage.pp was not already included' do
|
||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class {'swift' : swift_hash_suffix => 'eee' }
|
"class {'swift' : swift_hash_path_suffix => 'eee' }
|
||||||
include swift::ringbuilder"
|
include swift::ringbuilder"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ describe 'swift' do
|
|||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:swift_hash_suffix => 'string',
|
:swift_hash_path_suffix => 'string',
|
||||||
:max_header_size => '16384',
|
:max_header_size => '16384',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'swift::storage::account' do
|
describe 'swift::storage::account' do
|
||||||
let :pre_condition 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' }"
|
class { 'swift::storage': storage_local_net_ip => '10.0.0.1' }"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ describe 'swift::storage::all' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'swift': swift_hash_suffix => 'changeme' }"
|
"class { 'swift': swift_hash_path_suffix => 'changeme' }"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :default_params do
|
let :default_params do
|
||||||
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'swift::storage::container' do
|
describe 'swift::storage::container' do
|
||||||
let :pre_condition 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' }"
|
class { 'swift::storage': storage_local_net_ip => '10.0.0.1' }"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
|||||||
describe 'swift::storage::object' do
|
describe 'swift::storage::object' do
|
||||||
|
|
||||||
let :pre_condition 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' }"
|
class { 'swift::storage': storage_local_net_ip => '10.0.0.1' }"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ describe 'swift::storage' do
|
|||||||
|
|
||||||
describe 'when required classes are specified' do
|
describe 'when required classes are specified' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'swift': swift_hash_suffix => 'changeme' }"
|
"class { 'swift': swift_hash_path_suffix => 'changeme' }"
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'when the local net ip is specified' do
|
describe 'when the local net ip is specified' do
|
||||||
|
@ -14,7 +14,7 @@ describe 'swift::storage::generic' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :pre_condition 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' }"
|
class { 'swift::storage': storage_local_net_ip => '10.0.0.1' }"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ describe 'swift::storage::node' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :pre_condition 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 => '127.0.0.1' }"
|
class { 'swift::storage': storage_local_net_ip => '127.0.0.1' }"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ describe 'swift::storage::server' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :pre_condition 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' }"
|
class { 'swift::storage': storage_local_net_ip => '10.0.0.1' }"
|
||||||
end
|
end
|
||||||
let :default_params do
|
let :default_params do
|
||||||
@ -123,7 +123,7 @@ describe 'swift::storage::server' do
|
|||||||
describe "when using swift_#{t}_config resource" do
|
describe "when using swift_#{t}_config resource" do
|
||||||
let :pre_condition 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' }
|
class { 'swift::storage': storage_local_net_ip => '10.0.0.1' }
|
||||||
swift_#{t}_config { 'foo/bar': value => 'foo' }
|
swift_#{t}_config { 'foo/bar': value => 'foo' }
|
||||||
"
|
"
|
||||||
|
@ -17,8 +17,8 @@ class { '::memcached':
|
|||||||
|
|
||||||
class { '::swift':
|
class { '::swift':
|
||||||
# not sure how I want to deal with this shared secret
|
# not sure how I want to deal with this shared secret
|
||||||
swift_hash_suffix => $swift_shared_secret,
|
swift_hash_path_suffix => $swift_shared_secret,
|
||||||
package_ensure => latest,
|
package_ensure => latest,
|
||||||
}
|
}
|
||||||
|
|
||||||
# === Configure Storage
|
# === Configure Storage
|
||||||
|
@ -124,8 +124,8 @@ node /swift-storage/ {
|
|||||||
|
|
||||||
class { '::swift':
|
class { '::swift':
|
||||||
# not sure how I want to deal with this shared secret
|
# not sure how I want to deal with this shared secret
|
||||||
swift_hash_suffix => $swift_shared_secret,
|
swift_hash_path_suffix => $swift_shared_secret,
|
||||||
package_ensure => latest,
|
package_ensure => latest,
|
||||||
}
|
}
|
||||||
|
|
||||||
# create xfs partitions on a loopback device and mount them
|
# create xfs partitions on a loopback device and mount them
|
||||||
@ -188,8 +188,8 @@ node /swift-proxy/ {
|
|||||||
|
|
||||||
class { '::swift':
|
class { '::swift':
|
||||||
# not sure how I want to deal with this shared secret
|
# not sure how I want to deal with this shared secret
|
||||||
swift_hash_suffix => $swift_shared_secret,
|
swift_hash_path_suffix => $swift_shared_secret,
|
||||||
package_ensure => latest,
|
package_ensure => latest,
|
||||||
}
|
}
|
||||||
|
|
||||||
# curl is only required so that I can run tests
|
# curl is only required so that I can run tests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user