]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
cephadm_adopt: fix ceph-crash migration
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 28 Apr 2021 13:11:25 +0000 (15:11 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 29 Apr 2021 05:14:44 +0000 (07:14 +0200)
ceph-ansible leaves a ceph-crash container in containerized deployment.
It means we end up with 2 ceph-crash containers running after the
migration playbook is complete.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1954614
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 22c18e82f0340bcc63bba7f124cda8e04874b30b)

infrastructure-playbooks/cephadm-adopt.yml

index 84833513faac4fb822ac67bdafc4527bab0dacac..67bbf996df3ea44133c188f1729918c57d9e3d42 100644 (file)
 
     - name: stop and disable ceph-crash systemd service
       service:
-        name: ceph-crash
+        name: "{{ 'ceph-crash@' + ansible_facts['hostname'] if containerized_deployment | bool else 'ceph-crash.service' }}"
         state: stopped
         enabled: false
       failed_when: false
-      when: not containerized_deployment | bool
 
     - name: update the placement of ceph-crash hosts
       command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply crash --placement='label:ceph'"