diff options
author | shuai chen <chenshuai@huawei.com> | 2015-12-24 08:57:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-12-24 08:57:32 +0000 |
commit | dc9d4399c9e68b8fc873387e4d4bc3499e21e304 (patch) | |
tree | 6cefe967c5d609db413c01d5269a19bd9123e69a /deploy/adapters/ansible/roles/mq/tasks | |
parent | 8143bfe61f0f6739818fa92c2646859faea813ec (diff) | |
parent | bc54b7f9a4c740cdccc3197686ac921ee8a2cc53 (diff) |
Merge "add retry when rabbitmq join failed"
Diffstat (limited to 'deploy/adapters/ansible/roles/mq/tasks')
-rw-r--r-- | deploy/adapters/ansible/roles/mq/tasks/rabbitmq_cluster.yml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/deploy/adapters/ansible/roles/mq/tasks/rabbitmq_cluster.yml b/deploy/adapters/ansible/roles/mq/tasks/rabbitmq_cluster.yml index 8b0ce9a9..0cae5298 100644 --- a/deploy/adapters/ansible/roles/mq/tasks/rabbitmq_cluster.yml +++ b/deploy/adapters/ansible/roles/mq/tasks/rabbitmq_cluster.yml @@ -2,8 +2,12 @@ - name: stop rabbitmq app shell: rabbitmqctl stop_app; sleep 3 -- name: join cluster - command: rabbitmqctl join_cluster rabbit@{{ haproxy_hosts.keys()[0] }} +- name: join cluster + shell: rabbitmqctl join_cluster rabbit@{{ haproxy_hosts.keys()[0] }} + register: join_result + until: join_result|success + retries: 20 + delay: 3 - name: start rabbitmq app - command: rabbitmqctl start_app + shell: rabbitmqctl start_app |