fuel-library/deployment/puppet/cobbler/templates/snippets/mcollective_conf.erb
Vladimir Sharshov 32f25307a6 Set max avaliable TTL for Mcollective
We use virtual machine snapshots for CI. When we
up it from snapshots, we get error:
"MCollective agents '<ID>' didn't respond within
the allotted time.", but node is online. Big TTL
in Mcollective should solve this problem.

Change-Id: Id3f2f5ddf26a9d31de214e9d5596a47f450b983f
Closes-Bug: #1316720
2014-05-08 07:44:30 +04:00

49 lines
1.3 KiB
Plaintext

#if $str($getVar('mco_auto_setup','')) == "1"
mkdir -p /etc/mcollective
cat <<EOCONF > /etc/mcollective/server.cfg
main_collective = mcollective
collectives = mcollective
libdir = /usr/libexec/mcollective
logfile = /var/log/mcollective.log
loglevel = debug
daemonize = 1
direct_addressing = 1
# Set huge value of ttl to avoid cases with unsyncronized time between nodes
# It means that ttl approximately equal to 50 days
ttl = 4294957
# Plugins
securityprovider = psk
plugin.psk = $mco_pskey
#if $str($getVar('mco_connector', 'stomp')) == "stomp"
connector = stomp
plugin.stomp.host = $mco_host
plugin.stomp.port = $mco_port
plugin.stomp.user = $mco_user
plugin.stomp.password = $mco_password
#else
connector = rabbitmq
plugin.rabbitmq.vhost = $mco_vhost
plugin.rabbitmq.pool.size = 1
plugin.rabbitmq.pool.1.host = $mco_host
plugin.rabbitmq.pool.1.port = $mco_port
plugin.rabbitmq.pool.1.user = $mco_user
plugin.rabbitmq.pool.1.password = $mco_password
plugin.rabbitmq.heartbeat_interval = 30
#end if
# Facts
factsource = yaml
plugin.yaml = /etc/mcollective/facts.yaml
EOCONF
#end if
#if $str($getVar('mco_enable', '')) == "1"
# turn on mcollective service after reboot and set priority to 81
sed -i /etc/rc.d/init.d/mcollective -e 's/\(# chkconfig:\s\+[-0-6]\+\) [0-9]\+ \([0-9]\+\)/\1 81 \2/'
/sbin/chkconfig mcollective on
#end if