From cdee9f01194eff27e6b6bf66ab436cecdd482dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 5 Nov 2018 17:14:31 +0100 Subject: [PATCH] rbd-mirror: use the new rbd-mirror key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of using the old rbd key let's use the new rbr-mirror key to bootstrap the rbd -mirror daemon. Signed-off-by: Sébastien Han --- roles/ceph-mon/tasks/docker/copy_configs.yml | 1 + roles/ceph-rbd-mirror/tasks/common.yml | 4 ++-- roles/ceph-rbd-mirror/tasks/pre_requisite.yml | 8 +++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/roles/ceph-mon/tasks/docker/copy_configs.yml b/roles/ceph-mon/tasks/docker/copy_configs.yml index 304d04371..f5a5fa917 100644 --- a/roles/ceph-mon/tasks/docker/copy_configs.yml +++ b/roles/ceph-mon/tasks/docker/copy_configs.yml @@ -8,6 +8,7 @@ - /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring - /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring - /var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring + - /var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring - name: stat for ceph config and keys stat: diff --git a/roles/ceph-rbd-mirror/tasks/common.yml b/roles/ceph-rbd-mirror/tasks/common.yml index 3750e2d06..ca168ab19 100644 --- a/roles/ceph-rbd-mirror/tasks/common.yml +++ b/roles/ceph-rbd-mirror/tasks/common.yml @@ -1,8 +1,8 @@ --- - name: copy rbd-mirror bootstrap key copy: - src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring" - dest: "/var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring" + src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring" + dest: "/var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring" owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}" group: "{{ ceph_uid if containerized_deployment else 'ceph' }}" mode: "{{ ceph_keyring_permissions }}" diff --git a/roles/ceph-rbd-mirror/tasks/pre_requisite.yml b/roles/ceph-rbd-mirror/tasks/pre_requisite.yml index 29f917b89..5a0486a72 100644 --- a/roles/ceph-rbd-mirror/tasks/pre_requisite.yml +++ b/roles/ceph-rbd-mirror/tasks/pre_requisite.yml @@ -9,7 +9,13 @@ - package-install - name: create rbd-mirror keyring - command: ceph --cluster {{ cluster }} --name client.bootstrap-rbd --keyring /var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring auth get-or-create client.rbd-mirror.{{ ansible_hostname }} mon 'profile rbd' osd 'profile rbd' -o /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring + command: > + ceph --cluster {{ cluster }} + --name client.bootstrap-rbd-mirror + --keyring /var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring + auth get-or-create client.rbd-mirror.{{ ansible_hostname }} + mon 'profile rbd' osd 'profile rbd' + -o /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring args: creates: /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring changed_when: false