fixed syntax by puppet-lint

Change-Id: I739186518398928f47fa63b4c687dca8f19e02b9
This commit is contained in:
Andrey Pavlov 2016-08-05 16:44:55 +03:00
parent a9e89dec39
commit f2138fe7dd
14 changed files with 233 additions and 233 deletions

View File

@ -16,7 +16,7 @@ if $scaleio['metadata']['enabled'] {
true => $scaleio['gateway_ip'],
default => hiera('management_vip')
}
class {'scaleio_openstack::cinder':
class {'::scaleio_openstack::cinder':
ensure => present,
gateway_user => $::gateway_user,
gateway_password => $scaleio['password'],

View File

@ -37,7 +37,7 @@ define storage_pool_ensure(
$rmcache_passthrough_pools,
$rmcache_cached_pools,
) {
$parsed_pool_name = split($title, ":")
$parsed_pool_name = split($title, ':')
$protection_domain = $parsed_pool_name[0]
$sp_name = $parsed_pool_name[1]
if $::scaleio_storage_pools and $::scaleio_storage_pools != '' {
@ -128,7 +128,7 @@ define sds_ensure(
fail("TODO: behaviour changed: address becomes comma-separated list ${storage_ips} or ${mgmt_ips}, so it is needed to add the generation of ip roles")
}
if $mgmt_ips == $storage_ips {
$sds_ips = "${storage_ips}"
$sds_ips = $storage_ips
$sds_ip_roles = 'all'
}
else {
@ -235,13 +235,13 @@ if $scaleio['metadata']['enabled'] {
$standby_ips = delete($mdm_ip_array, $mdm_ip_array[0])
if $mdm_count < 3 or $tb_count == 1 {
$cluster_mode = 3
$slave_names = join(values_at($standby_ips, "0-0"), ',')
$tb_names = join(values_at($tb_ip_array, "0-0"), ',')
$slave_names = join(values_at($standby_ips, '0-0'), ',')
$tb_names = join(values_at($tb_ip_array, '0-0'), ',')
} else {
$cluster_mode = 5
# incase of switch 3 to 5 nodes add only standby mdm/tb
$to_add_slaves = difference(values_at($standby_ips, "0-1"), intersection(values_at($standby_ips, "0-1"), split($::scaleio_mdm_ips, ',')))
$to_add_tb = difference(values_at($tb_ip_array, "0-1"), intersection(values_at($tb_ip_array, "0-1"), split($::scaleio_tb_ips, ',')))
$to_add_slaves = difference(values_at($standby_ips, '0-1'), intersection(values_at($standby_ips, '0-1'), split($::scaleio_mdm_ips, ',')))
$to_add_tb = difference(values_at($tb_ip_array, '0-1'), intersection(values_at($tb_ip_array, '0-1'), split($::scaleio_tb_ips, ',')))
$slave_names = join($to_add_slaves, ',')
$tb_names = join($to_add_tb, ',')
}
@ -414,7 +414,7 @@ if $scaleio['metadata']['enabled'] {
file_line {'SCALEIO_mdm_ips':
ensure => present,
path => '/etc/environment',
match => "^SCALEIO_mdm_ips=",
match => '^SCALEIO_mdm_ips=',
line => "SCALEIO_mdm_ips=${::managers_ips}",
} ->
# forbid requesting sdc/sds from discovery facters,
@ -423,8 +423,8 @@ if $scaleio['metadata']['enabled'] {
file_line {'SCALEIO_discovery_allowed':
ensure => present,
path => '/etc/environment',
match => "^SCALEIO_discovery_allowed=",
line => "SCALEIO_discovery_allowed=no",
match => '^SCALEIO_discovery_allowed=',
line => 'SCALEIO_discovery_allowed=no',
}
} else {

View File

@ -14,19 +14,19 @@ if $scaleio['metadata']['enabled'] {
file_line {'SCALEIO_mdm_ips':
ensure => present,
path => '/etc/environment',
match => "^SCALEIO_mdm_ips=",
match => '^SCALEIO_mdm_ips=',
line => "SCALEIO_mdm_ips=${discovered_mdms_ips}",
} ->
file_line {'SCALEIO_managers_ips':
ensure => present,
path => '/etc/environment',
match => "^SCALEIO_managers_ips=",
match => '^SCALEIO_managers_ips=',
line => "SCALEIO_managers_ips=${discovered_managers_ips}",
} ->
file_line {'SCALEIO_tb_ips':
ensure => present,
path => '/etc/environment',
match => "^SCALEIO_tb_ips=",
match => '^SCALEIO_tb_ips=',
line => "SCALEIO_tb_ips=${discovered_tbs_ips}",
}
} else {

View File

@ -19,10 +19,10 @@ if $scaleio['metadata']['enabled'] {
# can be found for example in astute docker container during deloyment) should be set to high values.
# It'll be invoked only if /tmp/scaleio_debug file exists on particular node and you can use
# "touch /tmp/go" when you're ready to resume.
exec { "Wait on debug interrupt: use touch /tmp/go to resume":
exec { 'Wait on debug interrupt: use touch /tmp/go to resume':
command => "bash -c 'while [ ! -f /tmp/go ]; do :; done'",
path => [ '/bin/' ],
onlyif => "ls /tmp/scaleio_debug",
onlyif => 'ls /tmp/scaleio_debug',
}
case $::osfamily {
'RedHat': {

View File

@ -12,7 +12,7 @@ if $scaleio['metadata']['enabled'] {
}
Haproxy::Service { use_include => true }
Haproxy::Balancermember { use_include => true }
class {'scaleio::gateway_server':
class {'::scaleio::gateway_server':
ensure => 'present',
mdm_ips => $::managers_ips,
password => $scaleio['password'],

View File

@ -6,8 +6,8 @@ if $scaleio['metadata']['enabled'] {
$node_ips = split($::ip_address_array, ',')
if ! empty(intersection(split($::controller_ips, ','), $node_ips))
{
notify {"Mdm server installation": } ->
class {'scaleio::mdm_server':
notify {'Mdm server installation': } ->
class {'::scaleio::mdm_server':
ensure => 'present',
}
} else {

View File

@ -31,7 +31,7 @@ if $scaleio['metadata']['enabled'] {
}
$password = $scaleio['password']
notify {"Controller server is_manager=${is_manager} master_mdm_name=${master_mdm_name} master_ip=${master_ip}": } ->
class {'scaleio::mdm_server':
class {'::scaleio::mdm_server':
ensure => 'present',
is_manager => $is_manager,
master_mdm_name => $master_mdm_name,
@ -52,7 +52,7 @@ if $scaleio['metadata']['enabled'] {
file_line {'Append a SCALEIO_mdm_password line to /etc/environment':
ensure => present,
path => '/etc/environment',
match => "^SCALEIO_mdm_password=",
match => '^SCALEIO_mdm_password=',
line => "SCALEIO_mdm_password=${password}",
}
}

View File

@ -16,7 +16,7 @@ if $scaleio['metadata']['enabled'] {
true => $scaleio['gateway_ip'],
default => hiera('management_vip')
}
class {'scaleio_openstack::nova':
class {'::scaleio_openstack::nova':
ensure => present,
gateway_user => $::gateway_user,
gateway_password => $scaleio['password'],

View File

@ -89,19 +89,19 @@ if $scaleio['metadata']['enabled'] {
file_line {'SCALEIO_mdm_ips':
ensure => present,
path => '/etc/environment',
match => "^SCALEIO_mdm_ips=",
match => '^SCALEIO_mdm_ips=',
line => "SCALEIO_mdm_ips=${mdms_present_str}",
} ->
file_line {'SCALEIO_managers_ips':
ensure => present,
path => '/etc/environment',
match => "^SCALEIO_managers_ips=",
match => '^SCALEIO_managers_ips=',
line => "SCALEIO_managers_ips=${new_mdms_ips}",
} ->
file_line {'SCALEIO_tb_ips':
ensure => present,
path => '/etc/environment',
match => "^SCALEIO_tb_ips=",
match => '^SCALEIO_tb_ips=',
line => "SCALEIO_tb_ips=${new_tb_ips}",
}
# only primary-controller needs discovery of sds/sdc
@ -109,8 +109,8 @@ if $scaleio['metadata']['enabled'] {
file_line {'SCALEIO_discovery_allowed':
ensure => present,
path => '/etc/environment',
match => "^SCALEIO_discovery_allowed=",
line => "SCALEIO_discovery_allowed=yes",
match => '^SCALEIO_discovery_allowed=',
line => 'SCALEIO_discovery_allowed=yes',
require => File_line['SCALEIO_tb_ips']
}
}

View File

@ -6,7 +6,7 @@ if $scaleio['metadata']['enabled'] {
if ! $::controller_ips {
fail('Empty Controller IPs configuration')
}
class {'scaleio::sdc_server':
class {'::scaleio::sdc_server':
ensure => 'present',
mdm_ip => $::controller_ips,
}

View File

@ -2,7 +2,7 @@
$scaleio = hiera('scaleio')
if $scaleio['metadata']['enabled'] {
class {'scaleio::sdc_server':
class {'::scaleio::sdc_server':
ensure => 'present',
mdm_ip => undef,
}

View File

@ -46,7 +46,7 @@ if $scaleio['metadata']['enabled'] {
sds_device_cleanup {$devices:
before => Class['Scaleio::Sds_server']
} ->
class {'scaleio::sds_server':
class {'::scaleio::sds_server':
ensure => 'present',
xcache => $use_xcache,
}
@ -77,15 +77,15 @@ if $scaleio['metadata']['enabled'] {
$sds_config = {
"${sds_name}" => {
'devices' => {
'tier1' => "${tier1_devices}",
'tier2' => "${tier2_devices}",
'tier3' => "${tier3_devices}",
'tier1' => $tier1_devices,
'tier2' => $tier2_devices,
'tier3' => $tier3_devices,
},
'rfcache_devices' => "${rfcache_devices}",
'rfcache_devices' => $rfcache_devices,
}
}
# convert hash to string and add escaping of qoutes
$sds_config_str = regsubst(regsubst(inline_template('<%= @sds_config.to_s %>'), '=>', ":", 'G'), '"', '\"', 'G')
$sds_config_str = regsubst(regsubst(inline_template('<%= @sds_config.to_s %>'), '=>', ':', 'G'), '"', '\"', 'G')
$galera_host = hiera('management_vip')
$mysql_opts = hiera('mysql')
$mysql_password = $mysql_opts['root_password']
@ -94,7 +94,7 @@ if $scaleio['metadata']['enabled'] {
$table_query = 'CREATE TABLE IF NOT EXISTS sds (name VARCHAR(64), PRIMARY KEY(name), value TEXT(1024))'
$update_query = "INSERT INTO sds (name, value) VALUES ('${sds_name}', '${sds_config_str}') ON DUPLICATE KEY UPDATE value='${sds_config_str}'"
$sql_query = "${sql_connect} -e \"${db_query}; ${table_query}; ${update_query};\""
class {'scaleio::sds_server':
class {'::scaleio::sds_server':
ensure => 'present',
xcache => $use_xcache,
} ->