Dan Prince d384093080 Set config_file_path in storage::node.
This change makes it so that storage::node sets config_file_path
for each of the services correctly. Previously this would cause
swift config file fragments to get written to
/etc/swift/<service>/600?.conf instead of /etc/swift/<service>.conf.

Fixes config issues for me on Fedora when using swift::storage::node.

Change-Id: I8d0ce87a545af805e24c5594b437483f9b479c9d
2013-04-12 08:05:48 -04:00

54 lines
1.3 KiB
Puppet

#
# Builds out a default storage node
# a storage node is a device that contains
# a storage endpoint for account, container, and object
# on the same mount point
#
define swift::storage::node(
$mnt_base_dir,
$zone,
$weight = 1,
$owner = 'swift',
$group = 'swift',
$max_connections = 25,
$storage_local_net_ip = '127.0.0.1',
$manage_ring = true
) {
Swift::Storage::Server {
storage_local_net_ip => $storage_local_net_ip,
devices => $mnt_base_dir,
max_connections => $max_connections,
owner => $owner,
group => $group,
}
swift::storage::server { "60${name}0":
type => 'object',
config_file_path => 'object-server.conf',
}
ring_object_device { "${storage_local_net_ip}:60${name}0/$name":
zone => $zone,
weight => $weight,
}
swift::storage::server { "60${name}1":
type => 'container',
config_file_path => 'container-server.conf',
}
ring_container_device { "${storage_local_net_ip}:60${name}1/$name":
zone => $zone,
weight => $weight,
}
swift::storage::server { "60${name}2":
type => 'account',
config_file_path => 'account-server.conf',
}
ring_account_device { "${storage_local_net_ip}:60${name}2/$name":
zone => $zone,
weight => $weight,
}
}