From a3d36df02564d2301a0b51e5d63ea5ffb8ae6968 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Mon, 9 Sep 2019 14:18:49 -0400 Subject: [PATCH] rbd-mirror: Use the rbd mirror client keyring The admin keyring isn't present by default on the rbd mirror nodes so the rbd commands related to the mirroring confguration will fail. Instead we can use the rbd mirror client keyring. Signed-off-by: Dimitri Savineau --- roles/ceph-rbd-mirror/tasks/configure_mirroring.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/ceph-rbd-mirror/tasks/configure_mirroring.yml b/roles/ceph-rbd-mirror/tasks/configure_mirroring.yml index 677c43d84..36256ccc2 100644 --- a/roles/ceph-rbd-mirror/tasks/configure_mirroring.yml +++ b/roles/ceph-rbd-mirror/tasks/configure_mirroring.yml @@ -1,9 +1,9 @@ --- - name: enable mirroring on the pool - command: "{{ container_exec_cmd | default('') }} rbd --cluster {{ cluster }} mirror pool enable {{ ceph_rbd_mirror_pool }} {{ ceph_rbd_mirror_mode }}" + command: "{{ container_exec_cmd | default('') }} rbd --cluster {{ cluster }} --keyring /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring --name client.rbd-mirror.{{ ansible_hostname }} mirror pool enable {{ ceph_rbd_mirror_pool }} {{ ceph_rbd_mirror_mode }}" changed_when: false - name: add a mirroring peer - command: "{{ container_exec_cmd | default('') }} rbd --cluster {{ cluster }} mirror pool peer add {{ ceph_rbd_mirror_pool }} {{ ceph_rbd_mirror_remote_user }}@{{ ceph_rbd_mirror_remote_cluster }}" + command: "{{ container_exec_cmd | default('') }} rbd --cluster {{ cluster }} --keyring /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring --name client.rbd-mirror.{{ ansible_hostname }} mirror pool peer add {{ ceph_rbd_mirror_pool }} {{ ceph_rbd_mirror_remote_user }}@{{ ceph_rbd_mirror_remote_cluster }}" changed_when: false failed_when: false -- 2.39.5