fuel-library/deployment/puppet/cluster/manifests/vrouter_ocf.pp
Sergey Vasilenko cd059d921c handle undefined values in cs_resource provider
for prevent passing to pacemaker commands, like:

    gateway=none gateway_metric=0 other_networks= iptables_comment= ns_iptables_start_rules=

Change-Id: Ic20e88c747a4674987e87e6318813166d94d2446
Closes-bug: #1487459
2015-08-21 19:40:38 +03:00

54 lines
1.1 KiB
Puppet

# == Class: cluster::vrouter_ocf
#
# Configure OCF service for vrouter managed by corosync/pacemaker
#
class cluster::vrouter_ocf (
$other_networks = false,
) {
$service_name = 'p_vrouter'
$primitive_type = 'ns_vrouter'
$complex_type = 'clone'
$ms_metadata = {
'interleave' => true,
}
$metadata = {
'migration-threshold' => '3',
'failure-timeout' => '120',
}
$parameters = {
'ns' => 'vrouter',
'other_networks' => "${other_networks}",
}
$operations = {
'monitor' => {
'interval' => '30',
'timeout' => '60'
},
'start' => {
'timeout' => '30'
},
'stop' => {
'timeout' => '60'
},
}
service { $service_name :
ensure => 'running',
enable => true,
hasstatus => true,
hasrestart => true,
provider => 'pacemaker',
}
pacemaker_wrappers::service { $service_name :
primitive_type => $primitive_type,
parameters => $parameters,
metadata => $metadata,
operations => $operations,
ms_metadata => $ms_metadata,
complex_type => $complex_type,
prefix => false,
}
}