Skip to content

Commit 32b84e7

Browse files
committedAug 4, 2022
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 <gabrioux@redhat.com> (cherry picked from commit 041435e) (cherry picked from commit b634fb1)
1 parent 593325e commit 32b84e7

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed
 

‎infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -565,11 +565,17 @@
565565
serial: 1
566566
become: true
567567
pre_tasks:
568+
- name: check for ceph rbd mirror services
569+
command: systemctl show --no-pager --property=Id --state=enabled ceph-rbd-mirror@* # noqa 303
570+
changed_when: false
571+
register: rbdmirror_services
572+
568573
- name: stop non-containerized ceph rbd mirror(s)
569574
service:
570-
name: "ceph-rbd-mirror@rbd-mirror.{{ ansible_facts['hostname'] }}"
575+
name: "{{ item.split('=')[1] }}"
571576
state: stopped
572577
enabled: no
578+
loop: "{{ rbdmirror_services.stdout_lines }}"
573579

574580
- name: remove old systemd unit files
575581
file:

‎roles/ceph-common/vars/main.yml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ debian_ceph_pkgs:
99
- "{{ (ceph_test | bool) | ternary('ceph-test', 'ceph-common') }}"
1010
- "{{ (rgw_group_name in group_names) | ternary('radosgw', 'ceph-common') }}"
1111
- "{{ ((ceph_repository == 'rhcs') and (client_group_name in group_names)) | ternary('ceph-fuse', 'ceph-common') }}"
12+
- "{{ (rbdmirror_group_name in group_names) | ternary('ceph-base', 'ceph-common') }}"
1213

1314
redhat_ceph_pkgs:
1415
- "{{ (ceph_test | bool) | ternary('ceph-test', 'ceph-common') }}"
@@ -18,6 +19,7 @@ redhat_ceph_pkgs:
1819
- "{{ (client_group_name in group_names) | ternary('ceph-fuse', 'ceph-common') }}"
1920
- "{{ (client_group_name in group_names) | ternary('ceph-base', 'ceph-common') }}"
2021
- "{{ (rgw_group_name in group_names) | ternary('ceph-radosgw', 'ceph-common') }}"
22+
- "{{ (rbdmirror_group_name in group_names) | ternary('ceph-base', 'ceph-common') }}"
2123

2224
suse_ceph_pkgs:
2325
- "{{ (ceph_test | bool) | ternary('ceph-test', 'ceph-common') }}"
@@ -27,3 +29,4 @@ suse_ceph_pkgs:
2729
- "{{ (client_group_name in group_names) | ternary('ceph-fuse', 'ceph-common') }}"
2830
- "{{ (client_group_name in group_names) | ternary('ceph-base', 'ceph-common') }}"
2931
- "{{ (rgw_group_name in group_names) | ternary('ceph-radosgw', 'ceph-common') }}"
32+
- "{{ (rbdmirror_group_name in group_names) | ternary('ceph-base', 'ceph-common') }}"

‎roles/ceph-rbd-mirror/tasks/configure_mirroring.yml

+7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
run_once: true
1818
no_log: "{{ no_log_on_ceph_key_tasks }}"
1919

20+
- name: ensure /var/lib/ceph/bootstrap-rbd-mirror exists
21+
file:
22+
path: /var/lib/ceph/bootstrap-rbd-mirror
23+
state: directory
24+
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
25+
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
26+
2027
- name: copy ceph key(s)
2128
copy:
2229
dest: "/var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring"

0 commit comments

Comments
 (0)
Please sign in to comment.