Skip to content

Commit

Permalink
non master nodes should wait for master rabbit to come up
Browse files Browse the repository at this point in the history
Change-Id: I72f6073ae8f0026f1f87c219f95e4c14d67aa938
Closes-Bug: #1695662
(cherry picked from commit 31b0045)
(cherry picked from commit 803ffcf)
  • Loading branch information
Dheeraj Gautam committed Sep 6, 2017
1 parent 170aa38 commit c0bc476
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
5 changes: 3 additions & 2 deletions contrail/environment/modules/contrail/manifests/rabbitmq.pp
Expand Up @@ -84,9 +84,10 @@
} ->

class {'::contrail::verify_rabbitmq':
master => $master,
master => $master,
host_control_ip => $host_control_ip,
amqp_ip_list => $amqp_ip_list
amqp_ip_list => $amqp_ip_list,
amqp_name_list => $amqp_name_list
}
contain ::contrail::verify_rabbitmq
contain ::contrail::add_etc_hosts
Expand Down
Expand Up @@ -2,8 +2,19 @@
$contrail_logoutput = $::contrail::params::contrail_logoutput,
$master,
$host_control_ip,
$amqp_ip_list
$amqp_ip_list,
$amqp_name_list
) {
if ($master == 'no') {
$master_node = $amqp_name_list[0]
notify{"master_node => $master_node":;}

exec {'check if first rabbitmq node is up':
command => "rabbitmqctl -n rabbit@${master_node}ctrl cluster_status",
provider => shell,
logoutput => true
} -> File['/etc/contrail/form_rmq_cluster.sh']
}
file { '/etc/contrail/form_rmq_cluster.sh' :
mode => '0755',
group => root,
Expand Down

0 comments on commit c0bc476

Please sign in to comment.