From a4b3885ac9ff74c93ab1b2aaf0074554327dd232 Mon Sep 17 00:00:00 2001 From: Huamin Chen Date: Mon, 8 Feb 2016 17:23:37 +0000 Subject: [PATCH] allow multiple mon containers to reach quorum Signed-off-by: Huamin Chen --- roles/ceph-mon/tasks/ceph_keys.yml | 6 +++++- roles/ceph-mon/tasks/docker/main.yml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/ceph-mon/tasks/ceph_keys.yml b/roles/ceph-mon/tasks/ceph_keys.yml index f5eba729b..00c716895 100644 --- a/roles/ceph-mon/tasks/ceph_keys.yml +++ b/roles/ceph-mon/tasks/ceph_keys.yml @@ -15,6 +15,8 @@ not mon_containerized_deployment and groups[restapi_group_name] is defined +- debug: msg="host {{ inventory_hostname }} last {{ groups.mons|last }}" + - name: create ceph rest api keyring when mon is containerized command: docker exec {{ ansible_hostname }} ceph auth get-or-create client.restapi osd 'allow *' mon 'allow *' -o /etc/ceph/ceph.client.restapi.keyring args: @@ -23,7 +25,9 @@ when: cephx and mon_containerized_deployment and - groups[restapi_group_name] is defined + groups[restapi_group_name] is defined and + inventory_hostname == groups.mons|last + - include: openstack_config.yml when: openstack_config diff --git a/roles/ceph-mon/tasks/docker/main.yml b/roles/ceph-mon/tasks/docker/main.yml index e1965301f..c5d82070f 100644 --- a/roles/ceph-mon/tasks/docker/main.yml +++ b/roles/ceph-mon/tasks/docker/main.yml @@ -25,4 +25,4 @@ when: inventory_hostname == groups.mons[0] - include: fetch_configs.yml - include: start_docker_monitor.yml -- include: ../ceph_keys.yml +- include: ../ceph_keys.yml \ No newline at end of file -- 2.39.5