commit
fa96238977
@ -33,7 +33,7 @@ define swift::storage::generic(
|
|||||||
# sorry its so ugly :(
|
# sorry its so ugly :(
|
||||||
name => inline_template("<%= scope.lookupvar('::swift::params::${name}_package_name') %>"),
|
name => inline_template("<%= scope.lookupvar('::swift::params::${name}_package_name') %>"),
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
before => Service["swift-${name}"],
|
before => Service["swift-${name}", "swift-${name}-replicator"],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/swift/${name}-server/":
|
file { "/etc/swift/${name}-server/":
|
||||||
|
@ -26,27 +26,24 @@ define swift::storage::node(
|
|||||||
swift::storage::server { "60${name}0":
|
swift::storage::server { "60${name}0":
|
||||||
type => 'object',
|
type => 'object',
|
||||||
}
|
}
|
||||||
ring_object_device { "${storage_local_net_ip}:60${name}0":
|
ring_object_device { "${storage_local_net_ip}:60${name}0/$name":
|
||||||
zone => $zone,
|
zone => $zone,
|
||||||
device_name => $name,
|
|
||||||
weight => $weight,
|
weight => $weight,
|
||||||
}
|
}
|
||||||
|
|
||||||
swift::storage::server { "60${name}1":
|
swift::storage::server { "60${name}1":
|
||||||
type => 'container',
|
type => 'container',
|
||||||
}
|
}
|
||||||
ring_container_device { "${storage_local_net_ip}:60${name}1":
|
ring_container_device { "${storage_local_net_ip}:60${name}1/$name":
|
||||||
zone => $zone,
|
zone => $zone,
|
||||||
device_name => $name,
|
|
||||||
weight => $weight,
|
weight => $weight,
|
||||||
}
|
}
|
||||||
|
|
||||||
swift::storage::server { "60${name}2":
|
swift::storage::server { "60${name}2":
|
||||||
type => 'account',
|
type => 'account',
|
||||||
}
|
}
|
||||||
ring_account_device { "${storage_local_net_ip}:60${name}2":
|
ring_account_device { "${storage_local_net_ip}:60${name}2/$name":
|
||||||
zone => $zone,
|
zone => $zone,
|
||||||
device_name => $name,
|
|
||||||
weight => $weight,
|
weight => $weight,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ define swift::storage::server(
|
|||||||
|
|
||||||
$bind_port = $name
|
$bind_port = $name
|
||||||
|
|
||||||
rsync::server::module { "${type}":
|
rsync::server::module { "${type}_${name}":
|
||||||
path => $devices,
|
path => $devices,
|
||||||
lock_file => "/var/lock/${type}.lock",
|
lock_file => "/var/lock/${type}.lock",
|
||||||
uid => $owner,
|
uid => $owner,
|
||||||
@ -51,7 +51,7 @@ define swift::storage::server(
|
|||||||
concat { "/etc/swift/${config_file_path}":
|
concat { "/etc/swift/${config_file_path}":
|
||||||
owner => $owner,
|
owner => $owner,
|
||||||
group => $group,
|
group => $group,
|
||||||
notify => Service["swift-${type}"],
|
notify => Service["swift-${type}", "swift-${type}-replicator"],
|
||||||
mode => 640,
|
mode => 640,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ describe 'swift::storage::server' do
|
|||||||
req_params
|
req_params
|
||||||
end
|
end
|
||||||
|
|
||||||
it { should contain_rsync__server__module("#{t}").with(
|
it { should contain_rsync__server__module("#{t}_8000").with(
|
||||||
:path => '/srv/node',
|
:path => '/srv/node',
|
||||||
:lock_file => "/var/lock/#{t}.lock",
|
:lock_file => "/var/lock/#{t}.lock",
|
||||||
:uid => 'swift',
|
:uid => 'swift',
|
||||||
|
Loading…
Reference in New Issue
Block a user