From cca694aa8b6e430b4f3fd328100077efb587aabe Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 1 Aug 2022 20:18:50 +0200 Subject: [PATCH] rbd-mirror: follow up on recent rbd-mirror refactor - ensure /var/lib/ceph/bootstrap-rbd-mirror exists - always install ceph-base on rbdmirror nodes (otherwise, ceph-crash isn't present) Signed-off-by: Guillaume Abrioux --- roles/ceph-common/vars/main.yml | 3 +++ roles/ceph-rbd-mirror/tasks/configure_mirroring.yml | 7 +++++++ roles/ceph-rbd-mirror/tasks/main.yml | 8 -------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/roles/ceph-common/vars/main.yml b/roles/ceph-common/vars/main.yml index 1f51b204a..edfafdfe1 100644 --- a/roles/ceph-common/vars/main.yml +++ b/roles/ceph-common/vars/main.yml @@ -10,6 +10,7 @@ debian_ceph_pkgs: - "{{ (ceph_test | bool) | ternary('ceph-test', 'ceph-common') }}" - "{{ (rgw_group_name in group_names) | ternary('radosgw', 'ceph-common') }}" - "{{ ((ceph_repository == 'rhcs') and (client_group_name in group_names)) | ternary('ceph-fuse', 'ceph-common') }}" + - "{{ (rbdmirror_group_name in group_names) | ternary('ceph-base', 'ceph-common') }}" redhat_ceph_pkgs: - "{{ (ceph_test | bool) | ternary('ceph-test', 'ceph-common') }}" @@ -20,6 +21,7 @@ redhat_ceph_pkgs: - "{{ (client_group_name in group_names) | ternary('ceph-fuse', 'ceph-common') }}" - "{{ (client_group_name in group_names) | ternary('ceph-base', 'ceph-common') }}" - "{{ (rgw_group_name in group_names) | ternary('ceph-radosgw', 'ceph-common') }}" + - "{{ (rbdmirror_group_name in group_names) | ternary('ceph-base', 'ceph-common') }}" suse_ceph_pkgs: - "{{ (ceph_test | bool) | ternary('ceph-test', 'ceph-common') }}" @@ -30,3 +32,4 @@ suse_ceph_pkgs: - "{{ (client_group_name in group_names) | ternary('ceph-fuse', 'ceph-common') }}" - "{{ (client_group_name in group_names) | ternary('ceph-base', 'ceph-common') }}" - "{{ (rgw_group_name in group_names) | ternary('ceph-radosgw', 'ceph-common') }}" + - "{{ (rbdmirror_group_name in group_names) | ternary('ceph-base', 'ceph-common') }}" diff --git a/roles/ceph-rbd-mirror/tasks/configure_mirroring.yml b/roles/ceph-rbd-mirror/tasks/configure_mirroring.yml index 4c323df8d..de547a786 100644 --- a/roles/ceph-rbd-mirror/tasks/configure_mirroring.yml +++ b/roles/ceph-rbd-mirror/tasks/configure_mirroring.yml @@ -17,6 +17,13 @@ run_once: true no_log: "{{ no_log_on_ceph_key_tasks }}" + - name: ensure /var/lib/ceph/bootstrap-rbd-mirror exists + file: + path: /var/lib/ceph/bootstrap-rbd-mirror + state: directory + owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}" + group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}" + - name: copy ceph key(s) copy: dest: "/var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring" diff --git a/roles/ceph-rbd-mirror/tasks/main.yml b/roles/ceph-rbd-mirror/tasks/main.yml index 9c6011c10..6af2a8358 100644 --- a/roles/ceph-rbd-mirror/tasks/main.yml +++ b/roles/ceph-rbd-mirror/tasks/main.yml @@ -4,14 +4,6 @@ - not containerized_deployment | bool - ceph_rbd_mirror_remote_user is defined block: - - name: install dependencies - package: - name: rbd-mirror - state: present - register: result - until: result is succeeded - tags: package-install - - name: ensure systemd service override directory exists file: state: directory