Update ring creation defaults

Updates the defaults to ring creation to use
replica of 3 and min part hours of 24.

These are the defaults recommended by the swift
documentation.
This commit is contained in:
Dan Bode 2012-03-02 20:03:36 -08:00
parent 5083e19bc4
commit 0e7cb86dcd
3 changed files with 10 additions and 12 deletions

View File

@ -8,18 +8,16 @@
# [*part_power*] Number of partitions in the ring. (specified as the power of 2) # [*part_power*] Number of partitions in the ring. (specified as the power of 2)
# Optional. Defaults to 18 (2^18) # Optional. Defaults to 18 (2^18)
# [*replicas] Number of replicas to store. # [*replicas] Number of replicas to store.
# Optional. Defaults to 5 # Optional. Defaults to 3
# TODO should it default to 3?
# [*min_part_hours*] Time before a partition can be moved. # [*min_part_hours*] Time before a partition can be moved.
# Optional. Defaults to 1. # Optional. Defaults to 24.
# TODO should it be 24?
# #
# == Examples # == Examples
# #
# swift::ringbuilder::create { 'account': # swift::ringbuilder::create { 'account':
# part_power => 19, # part_power => 19,
# replicas => 3, # replicas => 5,
# min_part_hours => 24, # min_part_hours => 1,
# } # }
# #
# == Authors # == Authors
@ -32,8 +30,8 @@
# #
define swift::ringbuilder::create( define swift::ringbuilder::create(
$part_power = 18, $part_power = 18,
$replicas = 5, $replicas = 3,
$min_part_hours = 1 $min_part_hours = 24
) { ) {
validate_re($name, '^object|container|account$') validate_re($name, '^object|container|account$')

View File

@ -29,8 +29,8 @@ describe 'swift::ringbuilder' do
['object', 'account', 'container'].each do |type| ['object', 'account', 'container'].each do |type|
it { should contain_swift__ringbuilder__create(type).with( it { should contain_swift__ringbuilder__create(type).with(
:part_power => '18', :part_power => '18',
:replicas => '5', :replicas => '3',
:min_part_hours => '1' :min_part_hours => '24'
)} )}
end end
end end

View File

@ -3,8 +3,8 @@ describe 'swift::ringbuilder::create' do
let :default_params do let :default_params do
{:part_power => 18, {:part_power => 18,
:replicas => 5, :replicas => 3,
:min_part_hours => 1} :min_part_hours => 24}
end end
describe 'with allowed titles' do describe 'with allowed titles' do