rbd-mirror: use the new rbd-mirror key

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 <seb@redhat.com>
pull/3311/head
Sébastien Han 2018-11-05 17:14:31 +01:00 committed by mergify[bot]
parent 17883e09ba
commit cdee9f0119
3 changed files with 10 additions and 3 deletions

View File

@ -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:

View File

@ -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 }}"

View File

@ -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