Upgrade puppet-lint and fix metadata, parameter and style lint issues

This patch bump puppet-lint gem and add metadata and parameters checks.
Metadata lint issues (SPDX ID), missing parameters documentation and
syntaxe lint issues was also fixed in this patch

Doc for metadata syntax.
https://docs.puppetlabs.com/puppet/latest/reference/modules_publishing.html

Change-Id: Ia6bb3483b3ffdbeed60b58702a36e0c7b31ffb86
This commit is contained in:
Sebastien Badia
2015-03-23 18:11:23 +01:00
parent 15aa71f001
commit 77be0932fc
40 changed files with 433 additions and 127 deletions

View File

@@ -2,7 +2,10 @@ source 'https://rubygems.org'
group :development, :test do
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', '~> 0.3.2'
gem 'metadata-json-lint'
gem 'puppet-lint-param-docs'
gem 'puppet-lint', '~> 1.1'
gem 'rspec-puppet', '~> 1.0.1'
gem 'rake', '10.1.1'
gem 'rspec', '< 2.99'

View File

@@ -1,3 +1,23 @@
# == Class: swift::auth_file
#
# Create a RC credentials file for Swift v1 authentication
#
# === Parameters:
#
# [*admin_tenant*]
# (required) The name of the tenant used to authenticate
#
# [*admin_user*]
# (optional) The name of the user to create in keystone for use by the ironic services
# Defaults to 'admin'
#
# [*auth_url*]
# (optional) The authentication URL
# Defaults to 'http://127.0.0.1:5000/v2.0/'
#
# [*admin_password*]
# (required) The password for the swift user
#
class swift::auth_file (
$admin_tenant,
$admin_password,

View File

@@ -1,4 +1,70 @@
# == Class: swift::bench
#
# Configure swift-bench.conf for swift performance bench
#
# === Parameters:
#
# [*auth_url*]
# Defaults to 'http://localhost:8080/auth/v1.0'
#
# [*swift_user*]
# Defaults to 'test:tester'
#
# [*swift_key*]
# Defaults to 'testing'
#
# [*auth_version*]
# Defaults to '1.0'
#
# [*log_level*]
# Defaults to 'INFO'
#
# [*test_timeout*]
# Defaults to '10'
#
# [*put_concurrency*]
# (optional) Configure PUT concurrency
# Defaults to '10'
#
# [*get_concurrency*]
# (optional) Configure GET concurrency
# Defaults to '10',
#
# [*del_concurrency*]
# (optional) Configure DELETE concurrency
# Defaults to '10',
#
# [*lower_object_size*]
# If object_sources is not set and lower_object_size != upper_object_size,
# each PUT will randomly select an object size between the two values. Units
# are bytes.
# Defaults to '10'
#
# [*upper_object_size*]
# If object_sources is not set and lower_object_size != upper_object_size,
# each PUT will randomly select an object size between the two values. Units
# are bytes.
# Defaults to '10'
#
# [*object_size*]
# If object_sources is not set and lower_object_size == upper_object_size,
# every object PUT will contain this many bytes.
# Defaults to '1'
#
# [*num_objects*]
# Defaults to '1000'
#
# [*num_gets*]
# Defaults to '10000'
#
# [*num_containers*]
# Defaults to '20'
#
# [*delete*]
# Should swift-bench benchmark DELETEing the created objects and then delete
# all created containers?
# Defaults to 'yes'
#
class swift::bench (
$auth_url = 'http://localhost:8080/auth/v1.0',
$swift_user = 'test:tester',

View File

@@ -14,34 +14,44 @@
# [*auth_url*]
# String. The full URL to the authentication endpoint (eg. keystone)
# Optional. Defaults to '127.0.0.1'.
#
# [*auth_user*]
# String. The Swift username to use to run the tools.
# Optional. Defaults to 'dispersion'.
#
# [*auth_tenant*]
# String. The user's tenant/project.
# Optional. Defaults to 'services'.
#
# [*auth_pass*]
# String. The user's password.
# Optional. Defaults to 'dispersion_password'.
#
# [*auth_version*]
# String. The version to pass to the 'swift' command.
# Use '2.0' when using Keystone.
# Optional. Defaults to '2.0'
#
# [*endpoint_type*]
# String. The ability to choose which Swift endpoint to use.
# Optional. Defaults to 'publicURL'.
#
# [*swift_dir*]
# String. The path to swift configuration folder
# Optional. Defaults to '/etc/swift'.
#
# [*coverage*]
# Integer. The percentage of partitions to cover.
# Optional. Defaults to 1
#
# [*retries*]
# Integer. Number of retries.
# Optional. Defaults to 5.
#
# [*concurrency*]
# Integer. Process concurrency.
# Optional. Defaults to 25.
#
# [*dump_json*]
# 'yes' or 'no'. Should 'swift-dispersion-report' dump json results ?
# Optional. Defaults to no.
@@ -56,7 +66,6 @@
#
# Francois Charlier fcharlier@ploup.net
#
class swift::dispersion (
$auth_url = 'http://127.0.0.1:5000/v2.0/',
$auth_user = 'dispersion',

View File

@@ -1,6 +1,7 @@
# Install and configure base swift components
#
# == Parameters
#
# [*swift_hash_suffix*] string of text to be used
# as a salt when hashing to determine mappings in the ring.
# This file should be the same on every node in the cluster.
@@ -48,8 +49,8 @@ class swift(
File { owner => 'swift', group => 'swift', require => Package['swift'] }
file { '/home/swift':
ensure => directory,
mode => '0700',
ensure => directory,
mode => '0700',
}
file { '/etc/swift':
@@ -67,8 +68,8 @@ class swift(
}
file { '/etc/swift/swift.conf':
ensure => present,
mode => '0660',
ensure => present,
mode => '0660',
}
swift_config { 'swift-hash/swift_hash_path_suffix':

View File

@@ -5,8 +5,9 @@
#
# The user is given the admin role in the services tenant.
#
# === Parameters
# [*auth_user*]
# === Parameters:
#
# [*auth_name*]
# String. The name of the user.
# Optional. Defaults to 'swift'.
#
@@ -14,8 +15,64 @@
# String. The user's password.
# Optional. Defaults to 'swift_password'.
#
# [*port*]
# (Optional) Port for endpoint.
# Defaults to '8080'.
#
# [*public_port*]
# (Optional) Port for endpoint.
# Defaults to '8080'.
#
# [*tenant*]
# (Optional) The tenant to use for the swift service user
# Defaults to 'services'
#
# [*email*]
# (Optional) The email address for the swift service user
# Defaults to 'swift@localhost'
#
# [*region*]
# (Optional) The region in which to place the endpoints
# Defaults to 'RegionOne'
#
# [*operator_roles*]
# Array of strings. List of roles Swift considers as admin.
# (Optional) Array of strings. List of roles Swift considers as admin.
# Defaults to '['admin', 'SwiftOperator']'
#
# [*public_protocol*]
# (Optional) Protocol to use for the public endpoint. Can be http or https.
# Defaults to 'http'
#
# [*public_address*]
# (Optional) Public address for endpoint.
# Defaults to '127.0.0.1'.
#
# [*admin_protocol*]
# (Optional) Protocol for admin endpoints.
# Defaults to 'http'.
#
# [*admin_address*]
# (Optional) Admin address for endpoint.
# Defaults to '127.0.0.1'.
#
# [*internal_protocol*]
# Protocol for internal endpoints. Defaults to 'http'.
#
# [*internal_address*]
# (Optional) Internal address for endpoint.
# Defaults to '127.0.0.1'.
#
# [*configure_endpoint*]
# (optional) Whether to create the endpoint.
# Defaults to true
#
# [*configure_s3_endpoint*]
# (optional) Whether to create the S3 endpoint.
# Defaults to true
#
# [*endpoint_prefix*]
# (optional) The prefix endpoint, used for endpoint URL.
# Defaults to 'AUTH'
#
# [*service_name*]
# (optional) Name of the service.
@@ -86,7 +143,7 @@ class swift::keystone::auth(
internal_url => "${internal_protocol}://${real_internal_address}:${port}/v1/${endpoint_prefix}_%(tenant_id)s",
}
keystone::resource::service_identity { "swift_s3":
keystone::resource::service_identity { 'swift_s3':
configure_user => false,
configure_user_role => false,
configure_endpoint => $configure_s3_endpoint,
@@ -106,6 +163,6 @@ class swift::keystone::auth(
}
# Backward compatibility
Keystone_user["$auth_name"] -> Keystone_user_role["${auth_name}@${tenant}"]
Keystone_user[$auth_name] -> Keystone_user_role["${auth_name}@${tenant}"]
}

View File

@@ -17,11 +17,18 @@
# String. The user's password.
# Optional. Defaults to 'dispersion_password'.
#
# [*email*]
# (Optional) The email address for the swift service user
# Defaults to 'swift@localhost'
#
# [*tenant*]
# (Optional) The tenant to use for the swift service user
# Defaults to 'services'
#
# === Authors
#
# Francois Charlier fcharlier@ploup.net
#
class swift::keystone::dispersion(
$auth_user = 'dispersion',
$auth_pass = 'dispersion_password',

View File

@@ -1,3 +1,5 @@
# == Class: swift::params
#
class swift::params {
case $::osfamily {
'Debian': {

View File

@@ -37,6 +37,34 @@
# Has to be set to true for tempauth.
# Defaults to true.
#
# [*log_headers*]
# (optional) If True, log headers in each request
# Defaults to False.
#
# [*log_udp_host*]
# (optional) If not set, the UDP receiver for syslog is disabled.
# Defaults to an empty string
#
# [*log_udp_port*]
# (optional) Port value for UDP receiver, if enabled.
# Defaults to an empty string
#
# [*log_address*]
# (optional) Location where syslog sends the logs to.
# Defaults to '/dev/log'.
#
# [*log_level*]
# (optional) Log level.
# Defaults to 'INFO'.
#
# [*log_facility*]
# (optional) Log level
# Defaults to 'LOG_LOCAL1'.
#
# [*log_handoffs*]
# (optional) If True, the proxy will log whenever it has to failover to a handoff node
# Defaults to true.
#
# [*read_affinity*]
# (optional) Configures the read affinity of proxy-server.
# Defaults to undef.

View File

@@ -17,7 +17,6 @@
#
# Configure Swift Account Quotas
#
class swift::proxy::account_quotas() {
concat::fragment { 'swift_account_quotas':
target => '/etc/swift/proxy-server.conf',

View File

@@ -3,33 +3,63 @@
# for swift proxy
#
# == Parameters
# [admin_token] Keystone admin token that can serve as a shared secret
#
# [*admin_token*]
# Keystone admin token that can serve as a shared secret
# for authenticating. If this is choosen if is used instead of a user,tenant,password.
# Optional. Defaults to false.
# [admin_user] User used to authenticate service.
#
# [*admin_user*]
# User used to authenticate service.
# Optional. Defaults to 'swift'.
# [admin_tenant_name] Tenant used to authenticate service.
#
# [*admin_tenant_name*]
# Tenant used to authenticate service.
# Optional. Defaults to 'services'.
# [admin_password] Password used with user to authenticate service.
#
# [*admin_password*]
# Password used with user to authenticate service.
# Optional. Defaults to 'password'.
# [delay_auth_decision] Set to 1 to support token-less access (anonymous access,
# tempurl, ...)
#
# [*delay_auth_decision*]
# Set to 1 to support token-less access (anonymous access, tempurl, ...)
# Optional, Defaults to 0
# [auth_host] Host providing the keystone service API endpoint. Optional.
#
# [*auth_host*]
# Host providing the keystone service API endpoint. Optional.
# Defaults to 127.0.0.1
# [auth_port] Port where keystone service is listening. Optional.
#
# [*auth_port*]
# Port where keystone service is listening. Optional.
# Defaults to 3557.
# [auth_protocol] Protocol to use to communicate with keystone. Optional.
#
# [*auth_protocol*]
# Protocol to use to communicate with keystone. Optional.
# Defaults to https.
# [auth_admin_prefix] path part of the auth url. Optional.
#
# [*auth_admin_prefix*]
# Path part of the auth url. Optional.
# This allows admin auth URIs like http://host/keystone/admin/v2.0.
# Defaults to false for empty. It defined, should be a string with a leading '/' and no trailing '/'.
# [auth_uri] The public auth url to redirect unauthenticated requests.
#
# [*auth_uri*]
# The public auth url to redirect unauthenticated requests.
# Defaults to false to be expanded to '${auth_protocol}://${auth_host}:5000'.
# Should be set to your public keystone endpoint (without version).
# [signing_dir] The cache directory for signing certificates.
#
# [*identity_uri*]
# identity_uri points to the Keystone Admin service. This information is
# used by the middleware to actually query Keystone about the validity of the
# authentication tokens. It is not necessary to append any Keystone API version
# number to this URI.
# Defaults to false.
#
# [*signing_dir*]
# The cache directory for signing certificates.
# Defaults to '/var/cache/swift'
# [cache] the cache backend to use
#
# [*cache*]
# The cache backend to use
# Optional. Defaults to 'swift.cache'
#
# == Authors
@@ -40,7 +70,6 @@
#
# Copyright 2012 Puppetlabs Inc, unless otherwise noted.
#
class swift::proxy::authtoken(
$admin_user = 'swift',
$admin_tenant_name = 'services',

View File

@@ -37,7 +37,6 @@
# while its processing the request.
# Default to 60.
#
class swift::proxy::bulk(
$max_containers_per_extraction = '10000',
$max_failed_extractions = '1000',

View File

@@ -15,7 +15,6 @@
#
# Copyright 2012 eNovance licensing@enovance.com
#
class swift::proxy::catch_errors() {
concat::fragment { 'swift_catch_errors':

View File

@@ -5,6 +5,12 @@
#
# puppet-ceilometer (http://github.com/enovance/puppet-ceilometer)
#
# == Parameters
#
# [*ensure*]
# Enable or not ceilometer fragment
# Defaults to 'present'
#
# == Examples
#
# == Authors

View File

@@ -17,7 +17,6 @@
#
# Configure Swift Container Quotas
#
class swift::proxy::container_quotas() {
concat::fragment { 'swift_container_quotas':
target => '/etc/swift/proxy-server.conf',

View File

@@ -11,7 +11,6 @@
# cross_domain_policy value according to http://docs.openstack.org/developer/swift/crossdomain.html
# default: <allow-access-from domain="*" secure="false" />
#
class swift::proxy::crossdomain (
$cross_domain_policy = '<allow-access-from domain="*" secure="false" />',
) {

View File

@@ -15,7 +15,6 @@
#
# Copyright 2012 eNovance licensing@enovance.com
#
class swift::proxy::formpost() {
concat::fragment { 'swift-proxy-formpost':

View File

@@ -35,12 +35,11 @@
#
# Copyright 2014 UnitedStack licensing@unitedstack.com
#
class swift::proxy::gatekeeper(
$log_name = 'gatekeeper',
$log_facility = 'LOG_LOCAL0',
$log_level = 'INFO',
$log_headers = 'false',
$log_headers = false,
$log_address = '/dev/log'
) {

View File

@@ -2,21 +2,27 @@
# This class can be sed to manage keystone middleware for swift proxy
#
# == Parameters
# [operator_roles] a list of keystone roles a user must have to gain
# access to Swift.
# Optional. Defaults to ['admin', 'SwiftOperator']
#
# [*operator_roles*]
# (Optional) a list of keystone roles a user must have to gain access to Swift.
# Defaults to ['admin', 'SwiftOperator']
# Must be an array of strings
# Swift operator roles must be defined in swift::keystone::auth because
# keystone API access is usually not available on Swift proxy nodes.
# [is_admin] Set to true to allow users to set ACLs on their account.
# Optional. Defaults to true.
#
# [*is_admin*]
# (Optional) Set to true to allow users to set ACLs on their account.
# Defaults to true.
#
# [*reseller_prefix*]
# (Optional) The prefix used for reseller URL.
# Defaults to 'AUTH_'
#
# == Authors
#
# Dan Bode dan@puppetlabs.com
# Francois Charlier fcharlier@ploup.net
#
class swift::proxy::keystone(
$operator_roles = ['admin', 'SwiftOperator'],
$is_admin = true,

View File

@@ -1,21 +1,32 @@
# == Class: swift::proxy::ratelimit
#
# Configure swift ratelimit.
#
# See Swift's ratelimit documentation for more detail about the values.
#
# == Parameters
# [clock_accuracy] The accuracy of swift proxy servers' clocks.
# === Parameters
#
# [*clock_accuracy*]
# (optional) The accuracy of swift proxy servers' clocks.
# 1000 is 1ms max difference. No rate should be higher than this.
# Optional. Defaults to 1000
# [max_sleep_time_seconds] Time before the app returns a 498 response.
# Optional. Defaults to 60.
# [log_sleep_time_seconds] if >0, enables logging of sleeps longer than
# Defaults to 1000
#
# [*max_sleep_time_seconds*]
# (optional) Time before the app returns a 498 response.
# Defaults to 60.
#
# [*log_sleep_time_seconds*]
# (optional) if >0, enables logging of sleeps longer than
# the value.
# Optional. Defaults to 0.
# [rate_buffer_seconds] Time in second the rate counter can skip.
# Optional. Defaults to 5.
# [account_ratelimit] if >0, limits PUT and DELETE requests to containers
# Optional. Defaults to 0.
# Defaults to 0.
#
# [*rate_buffer_seconds*]
# (optional) Time in second the rate counter can skip.
# Defaults to 5.
#
# [*account_ratelimit*]
# (optional) if >0, limits PUT and DELETE requests to containers
# Defaults to 0.
#
# == Dependencies
#

View File

@@ -1,13 +1,20 @@
# == Class: swift::proxy::s3token
#
# Configure swift s3token.
#
# == Parameters
# [auth_host] the keystone host
# Optional. Defaults to 127.0.0.1
# [auth_port] the Keystone client API port
# Optional. Defaults to 5000
# [auth_protocol] http or https
# Optional. Defaults to http
# === Parameters
#
# [*auth_host*]
# (optional) The keystone host
# Defaults to 127.0.0.1
#
# [*auth_port*]
# (optional) The Keystone client API port
# Defaults to 5000
#
# [*auth_protocol*]
# (optional) http or https
# Defaults to http
#
# == Dependencies
#

View File

@@ -40,7 +40,6 @@
#
# Copyright 2014 UnitedStack licensing@unitedstack.com
#
class swift::proxy::slo (
$max_manifest_segments = '1000',
$max_manifest_size = '2097152',

View File

@@ -15,7 +15,6 @@
#
# Copyright 2012 eNovance licensing@enovance.com
#
class swift::proxy::staticweb() {
concat::fragment { 'swift-proxy-staticweb':

View File

@@ -1,5 +1,20 @@
# == Class: swift::proxy::swauth
#
# === Parameters:
#
# [*package_ensure*]
# The status of the python-swauth package.
# Defaults to 'present'
#
# [*swauth_endpoint*]
# [*swauth_super_admin_user*]
# (optional) The endpoint used to autenticate to Swauth WSGI.
# Defaults to '127.0.0.1'
#
# [*swauth_super_admin_key*]
# (optional) The Swauth WSGI filter admin key.
# Defaults to 'swauthkey'
#
#
class swift::proxy::swauth(
$swauth_endpoint = '127.0.0.1',
$swauth_super_admin_key = 'swauthkey',
@@ -7,8 +22,8 @@ class swift::proxy::swauth(
) {
package { 'python-swauth':
ensure => $package_ensure,
before => Package['swift-proxy'],
ensure => $package_ensure,
before => Package['swift-proxy'],
}
concat::fragment { 'swift_proxy_swauth':

View File

@@ -3,6 +3,12 @@
#
# == Dependencies
#
# == Parameters
#
# [*ensure*]
# Enable or not ceilometer fragment
# Defaults to 'present'
#
# == Examples
#
# == Authors

View File

@@ -1,3 +1,5 @@
# == class: swift::proxy::tempauth
#
class swift::proxy::tempauth() {
concat::fragment { 'swift-proxy-swauth':

View File

@@ -15,7 +15,6 @@
#
# Copyright 2012 eNovance licensing@enovance.com
#
class swift::proxy::tempurl() {
concat::fragment { 'swift-proxy-tempurl':

View File

@@ -37,9 +37,9 @@ define swift::ringbuilder::create(
validate_re($name, '^object|container|account$')
exec { "create_${name}":
command => "swift-ring-builder /etc/swift/${name}.builder create ${part_power} ${replicas} ${min_part_hours}",
path => ['/usr/bin'],
creates => "/etc/swift/${name}.builder",
command => "swift-ring-builder /etc/swift/${name}.builder create ${part_power} ${replicas} ${min_part_hours}",
path => ['/usr/bin'],
creates => "/etc/swift/${name}.builder",
}
}

View File

@@ -1,6 +1,15 @@
# == Class: swift::ringserver
#
# Used to create an rsync server to serve up the ring databases via rsync
#
# == Parameters
# === Parameters
#
# [*local_net_ip*]
# (required) ip address that the swift servers should bind to.
#
# [*max_connections*]
# (optional) maximum connections to rsync server
# Defaults to 5
#
# == Dependencies
#

View File

@@ -1,3 +1,5 @@
# == Define: swift::ringsync
#
define swift::ringsync(
$ring_server
) {

View File

@@ -35,18 +35,18 @@ class swift::storage::account(
}
service { 'swift-account-reaper':
ensure => $service_ensure,
name => $::swift::params::account_reaper_service_name,
enable => $enabled,
provider => $::swift::params::service_provider,
require => Package['swift-account'],
ensure => $service_ensure,
name => $::swift::params::account_reaper_service_name,
enable => $enabled,
provider => $::swift::params::service_provider,
require => Package['swift-account'],
}
service { 'swift-account-auditor':
ensure => $service_ensure,
name => $::swift::params::account_auditor_service_name,
enable => $enabled,
provider => $::swift::params::service_provider,
require => Package['swift-account'],
ensure => $service_ensure,
name => $::swift::params::account_auditor_service_name,
enable => $enabled,
provider => $::swift::params::service_provider,
require => Package['swift-account'],
}
}

View File

@@ -2,20 +2,49 @@
# configures all storage types
# on the same node
#
# [*storeage_local_net_ip*] ip address that the swift servers should
# [*storage_local_net_ip*] ip address that the swift servers should
# bind to. Required
#
# [*devices*] The path where the managed volumes can be found.
# This assumes that all servers use the same path.
# Optional. Defaults to /srv/node/
#
# [*object_port*] Port where object storage server should be hosted.
# Optional. Defaults to 6000.
#
# [*allow_versions*] Boolean to enable the versioning in swift container
# Optional. Default to false.
#
# [*container_port*] Port where the container storage server should be hosted.
# Optional. Defaults to 6001.
#
# [*account_port*] Port where the account storage server should be hosted.
# Optional. Defaults to 6002.
#
# [*object_pipeline*]
# (optional) Specify the object pipeline
# Defaults to undef
#
# [*container_pipeline*]
# (optional) Specify the container pipeline
# Defaults to undef
#
# [*allow_versions*]
# (optional) Enable/Disable object versioning feature
# Defaults to false
#
# [*mount_check*]
# (optional) Whether or not check if the devices are mounted
# to prevent accidentally writing to the root device
# Defaults to false
#
# [*account_pipeline*]
# (optional) Specify the account pipeline
# Defaults to undef
#
# [*log_facility*]
# (optional) Syslog log facility
# Defaults to 'LOG_LOCAL2'
#
class swift::storage::all(
$storage_local_net_ip,

View File

@@ -1,5 +1,6 @@
#
# === Parameters
#
# [*enabled*]
# (optional) Should the service be enabled.
# Defaults to true
@@ -39,19 +40,19 @@ class swift::storage::container(
}
service { 'swift-container-updater':
ensure => $service_ensure,
name => $::swift::params::container_updater_service_name,
enable => $enabled,
provider => $::swift::params::service_provider,
require => Package['swift-container'],
ensure => $service_ensure,
name => $::swift::params::container_updater_service_name,
enable => $enabled,
provider => $::swift::params::service_provider,
require => Package['swift-container'],
}
service { 'swift-container-auditor':
ensure => $service_ensure,
name => $::swift::params::container_auditor_service_name,
enable => $enabled,
provider => $::swift::params::service_provider,
require => Package['swift-container'],
ensure => $service_ensure,
name => $::swift::params::container_auditor_service_name,
enable => $enabled,
provider => $::swift::params::service_provider,
require => Package['swift-container'],
}
if $::operatingsystem == 'Ubuntu' {
@@ -65,10 +66,10 @@ class swift::storage::container(
target => '/lib/init/upstart-job',
}
service { 'swift-container-sync':
ensure => $service_ensure,
enable => $enabled,
provider => $::swift::params::service_provider,
require => File['/etc/init/swift-container-sync.conf', '/etc/init.d/swift-container-sync']
ensure => $service_ensure,
enable => $enabled,
provider => $::swift::params::service_provider,
require => File['/etc/init/swift-container-sync.conf', '/etc/init.d/swift-container-sync']
}
}
}

View File

@@ -31,7 +31,7 @@
# }
#
# TODO(yuxcer): maybe we can remove param $base_dir
#
define swift::storage::disk(
$base_dir = '/dev',
$mnt_base_dir = '/srv/node',
@@ -47,9 +47,9 @@ define swift::storage::disk(
}
exec { "create_partition_label-${name}":
command => "parted -s ${base_dir}/${name} mklabel gpt",
path => ['/usr/bin/', '/sbin','/bin'],
onlyif => ["test -b ${base_dir}/${name}","parted ${base_dir}/${name} print|tail -1|grep 'Error'"],
command => "parted -s ${base_dir}/${name} mklabel gpt",
path => ['/usr/bin/', '/sbin','/bin'],
onlyif => ["test -b ${base_dir}/${name}","parted ${base_dir}/${name} print|tail -1|grep 'Error'"],
}
swift::storage::xfs { $name:

View File

@@ -26,11 +26,11 @@ define swift::storage::ext4(
}
swift::storage::mount { $name:
device => $device,
mnt_base_dir => $mnt_base_dir,
subscribe => Exec["mkfs-${name}"],
loopback => $loopback,
fstype => 'ext4',
device => $device,
mnt_base_dir => $mnt_base_dir,
subscribe => Exec["mkfs-${name}"],
loopback => $loopback,
fstype => 'ext4',
}
}

View File

@@ -29,10 +29,10 @@ define swift::storage::loopback(
}
exec { "create_partition-${name}":
command => "dd if=/dev/zero of=${base_dir}/${name} bs=${byte_size} count=0 seek=${seek}",
path => ['/usr/bin/', '/bin'],
unless => "test -f ${base_dir}/${name}",
require => File[$base_dir],
command => "dd if=/dev/zero of=${base_dir}/${name} bs=${byte_size} count=0 seek=${seek}",
path => ['/usr/bin/', '/bin'],
unless => "test -f ${base_dir}/${name}",
require => File[$base_dir],
}
$storage_params = {

View File

@@ -30,8 +30,8 @@ define swift::storage::node(
config_file_path => 'object-server.conf',
}
ring_object_device { "${storage_local_net_ip}:60${name}0/${name}":
zone => $zone,
weight => $weight,
zone => $zone,
weight => $weight,
}
swift::storage::server { "60${name}1":
@@ -39,8 +39,8 @@ define swift::storage::node(
config_file_path => 'container-server.conf',
}
ring_container_device { "${storage_local_net_ip}:60${name}1/${name}":
zone => $zone,
weight => $weight,
zone => $zone,
weight => $weight,
}
swift::storage::server { "60${name}2":
@@ -48,8 +48,8 @@ define swift::storage::node(
config_file_path => 'account-server.conf',
}
ring_account_device { "${storage_local_net_ip}:60${name}2/${name}":
zone => $zone,
weight => $weight,
zone => $zone,
weight => $weight,
}
}

View File

@@ -35,18 +35,18 @@ class swift::storage::object(
}
service { 'swift-object-updater':
ensure => $service_ensure,
name => $::swift::params::object_updater_service_name,
enable => $enabled,
provider => $::swift::params::service_provider,
require => Package['swift-object'],
ensure => $service_ensure,
name => $::swift::params::object_updater_service_name,
enable => $enabled,
provider => $::swift::params::service_provider,
require => Package['swift-object'],
}
service { 'swift-object-auditor':
ensure => $service_ensure,
name => $::swift::params::object_auditor_service_name,
enable => $enabled,
provider => $::swift::params::service_provider,
require => Package['swift-object'],
ensure => $service_ensure,
name => $::swift::params::object_auditor_service_name,
enable => $enabled,
provider => $::swift::params::service_provider,
require => Package['swift-object'],
}
}

View File

@@ -50,10 +50,10 @@ define swift::storage::xfs(
}
swift::storage::mount { $name:
device => $target_device,
mnt_base_dir => $mnt_base_dir,
subscribe => Exec["mkfs-${name}"],
loopback => $loopback,
device => $target_device,
mnt_base_dir => $mnt_base_dir,
subscribe => Exec["mkfs-${name}"],
loopback => $loopback,
}
}

View File

@@ -3,7 +3,7 @@
"version": "5.0.0",
"author": "Puppet Labs and StackForge Contributors",
"summary": "Puppet module for OpenStack Swift",
"license": "Apache License 2.0",
"license": "Apache-2.0",
"source": "git://github.com/stackforge/puppet-swift.git",
"project_page": "https://launchpad.net/puppet-swift",
"issues_url": "https://bugs.launchpad.net/puppet-swift",