
This commit aims to avoid duplication error when the ringserver and the storage node are on the same machine. For example when using loopback devices. Change-Id: Ic09af5d3a706d1a59c3fee7689b373d0a4de4e80
43 lines
840 B
Puppet
43 lines
840 B
Puppet
# Used to create an rsync server to serve up the ring databases via rsync
|
|
#
|
|
# == Parameters
|
|
#
|
|
# == Dependencies
|
|
#
|
|
# Class['swift']
|
|
#
|
|
# == Examples
|
|
#
|
|
# == Authors
|
|
#
|
|
# Dan Bode dan@puppetlabs.com
|
|
#
|
|
# == Copyright
|
|
#
|
|
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
|
|
#
|
|
class swift::ringserver(
|
|
$local_net_ip,
|
|
$max_connections = 5
|
|
) {
|
|
|
|
Class['ringbuilder'] -> Class['swift::ringserver']
|
|
|
|
if !defined(Class['rsync::server']) {
|
|
class { 'rsync::server':
|
|
use_xinetd => true,
|
|
address => $local_net_ip,
|
|
use_chroot => 'no',
|
|
}
|
|
}
|
|
|
|
rsync::server::module { 'swift_server':
|
|
path => '/etc/swift',
|
|
lock_file => '/var/lock/swift_server.lock',
|
|
uid => 'swift',
|
|
gid => 'swift',
|
|
max_connections => $max_connections,
|
|
read_only => true,
|
|
}
|
|
}
|