switch2containers: do not stop ceph.target in osd play

`ceph.target` should be disabled only. Otherwise, in collocation
scenario you stop other collocated services in the OSD play which isn't
what we want to do. Each daemon has its corresponding play for managing
the transition to container.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1901865

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/6088/head
Guillaume Abrioux 2020-11-26 10:11:36 +01:00 committed by Dimitri Savineau
parent eb452d35bc
commit 0b05620597
1 changed files with 6 additions and 1 deletions

View File

@ -238,7 +238,7 @@
- name: collect running osds - name: collect running osds
shell: | shell: |
set -o pipefail; set -o pipefail;
systemctl list-units | grep -E "loaded * active" | grep -Eo 'ceph-osd@[0-9]+.service|ceph-volume|ceph\.target' systemctl list-units | grep -E "loaded * active" | grep -Eo 'ceph-osd@[0-9]+.service|ceph-volume'
register: running_osds register: running_osds
changed_when: false changed_when: false
failed_when: false failed_when: false
@ -259,6 +259,11 @@
with_items: "{{ running_osds.stdout_lines | default([]) }}" with_items: "{{ running_osds.stdout_lines | default([]) }}"
when: running_osds != [] when: running_osds != []
- name: disable ceph.target
systemd:
name: ceph.target
enabled: no
- name: remove old ceph-osd systemd units - name: remove old ceph-osd systemd units
file: file:
path: "{{ item }}" path: "{{ item }}"