fc406a5291
* Specify static file name for ulimits rather than using OCF_OCF_RESKEY_binary as it may be specified with full path * Move OCF resource from openstack to claster resource for consistancy as it contains most of our OCF scripts Change-Id: Ibe740d8aa1d0613997868194fe7154bda145f55b Closes-Bug: 1405657 Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
81 lines
2.1 KiB
Puppet
81 lines
2.1 KiB
Puppet
# == Class: pacemaker_wrappers::rabbitmq
|
|
#
|
|
# Overrides rabbitmq service provider as a pacemaker
|
|
#
|
|
# TODO(bogdando) that one just an example of Pacemaker service
|
|
# provider wrapper implementation and should be moved to openstack_extra
|
|
# and params should be described
|
|
#
|
|
|
|
class pacemaker_wrappers::rabbitmq (
|
|
$primitive_type = 'rabbitmq-server',
|
|
$service_name = $::rabbitmq::service_name,
|
|
$port = $::rabbitmq::port,
|
|
$debug = false,
|
|
$ocf_script_file = 'cluster/ocf/rabbitmq',
|
|
$command_timeout = '',
|
|
$erlang_cookie = 'EOKOWXQREETZSHFNTPEY',
|
|
) inherits ::rabbitmq::service {
|
|
|
|
$parameters = {
|
|
'node_port' => $port,
|
|
'debug' => $debug,
|
|
'command_timeout' => $command_timeout,
|
|
'erlang_cookie' => $erlang_cookie,
|
|
}
|
|
|
|
$metadata = {
|
|
'migration-threshold' => 'INFINITY',
|
|
'failure-timeout' => '360s'
|
|
}
|
|
|
|
$ms_metadata = {
|
|
'notify' => 'true',
|
|
# We shouldn't enable ordered start for parallel start of RA.
|
|
'ordered' => 'false',
|
|
'interleave' => 'true',
|
|
'master-max' => '1',
|
|
'master-node-max' => '1',
|
|
'target-role' => 'Master'
|
|
}
|
|
|
|
$operations = {
|
|
'monitor' => {
|
|
'interval' => '30',
|
|
'timeout' => '60'
|
|
},
|
|
'monitor:Master' => { # name:role
|
|
'role' => 'Master',
|
|
# should be non-intercectable with interval from ordinary monitor
|
|
'interval' => '27',
|
|
'timeout' => '60'
|
|
},
|
|
'start' => {
|
|
'timeout' => '360'
|
|
},
|
|
'stop' => {
|
|
'timeout' => '60'
|
|
},
|
|
'promote' => {
|
|
'timeout' => '120'
|
|
},
|
|
'demote' => {
|
|
'timeout' => '60'
|
|
},
|
|
'notify' => {
|
|
'timeout' => '180'
|
|
},
|
|
}
|
|
|
|
pacemaker_wrappers::service { $service_name :
|
|
primitive_type => $primitive_type,
|
|
complex_type => 'master',
|
|
metadata => $metadata,
|
|
ms_metadata => $ms_metadata,
|
|
operations => $operations,
|
|
parameters => $parameters,
|
|
ocf_script_file => $ocf_script_file,
|
|
}
|
|
Service[$service_name] -> Rabbitmq_user <||>
|
|
}
|