Files
puppet-swift/spec/defines/swift_storage_node_spec.rb
Christian Schwede f8d6c08334 Set concurrency to 1 for auditor/replicator/updater
Before this the default concurrency was set to $::processorcount, and
this resulted in environments where 24 auditors/replicators/reapers
processes were all using the same disk. This results in a high I/O load,
because every thread blocks the others.

These values are 1 by default in Swift. If one has many disks and a
powerful machine, a single-digit concurrency for auditors and
replicators might work fine; the reaper is most likely only running with
a concurrency of 1 in any case.

Let's set this to the default of 1; operators with a need to use a
higher value can easily override the defaults (and probably want to use
a value that is appropriate to their setup).

Closes-Bug: 1631359
Change-Id: I54a5d01e4bd357973e142274db79d119e9e46457
2016-10-07 15:03:40 +02:00

42 lines
902 B
Ruby

describe 'swift::storage::node' do
let :facts do
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian',
})
end
let :params do
{
:zone => "1",
:mnt_base_dir => '/srv/node'
}
end
let :title do
"1"
end
let :pre_condition do
"class { 'swift': swift_hash_path_suffix => 'foo' }
class { 'swift::storage': storage_local_net_ip => '127.0.0.1' }"
end
it {
is_expected.to contain_ring_object_device("127.0.0.1:6010/1")
is_expected.to contain_ring_container_device("127.0.0.1:6011/1")
is_expected.to contain_ring_account_device("127.0.0.1:6012/1")
}
context 'when zone is not a number' do
let(:title) { '1' }
let :params do
{ :zone => 'invalid',
:mnt_base_dir => '/srv/node' }
end
it_raises 'a Puppet::Error', /The zone parameter must be an integer/
end
end