Merge "Fix up the rabbitmq-ready check"

This commit is contained in:
Zuul
2017-12-21 23:17:41 +00:00
committed by Gerrit Code Review

View File

@@ -217,20 +217,20 @@ class tripleo::profile::pacemaker::rabbitmq_bundle (
bundle => 'rabbitmq-bundle',
require => [Class['::rabbitmq'],
Pacemaker::Resource::Bundle['rabbitmq-bundle']],
notify => Exec['rabbitmq-ready'],
before => Exec['rabbitmq-ready'],
}
# This grep makes sure the rabbit app in erlang is up and running
# which is enough to guarantee that the user will eventually get
# replicated around the cluster
exec { 'rabbitmq-ready':
path => '/usr/sbin:/usr/bin:/sbin:/bin',
command => 'rabbitmqctl status | grep -F "{rabbit,"',
timeout => 30,
tries => 180,
try_sleep => 10,
refreshonly => true,
tag => 'rabbitmq_ready',
path => '/usr/sbin:/usr/bin:/sbin:/bin',
command => 'rabbitmqctl eval "rabbit_mnesia:is_clustered()." | grep -q true',
unless => 'rabbitmqctl eval "rabbit_mnesia:is_clustered()." | grep -q true',
timeout => 30,
tries => 180,
try_sleep => 10,
tag => 'rabbitmq_ready',
}
# Make sure that if we create rabbitmq users at the same step it happens
# after the cluster is up