Skip to content

Commit

Permalink
update: fix ceph-crash stop task
Browse files Browse the repository at this point in the history
This is a workaround for an issue in ansible.
When trying to stop/mask/disable this service in one task, the stop
didn't actually happen, the task doesn't fail but for some reason the
container is still present and running.
Then the task starting the service in the role ceph-crash fails because
it can't start the container since it's already running with the same
name.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
  • Loading branch information
guits committed May 4, 2021
1 parent 8f87754 commit 3db1ea7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions infrastructure-playbooks/rolling_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,14 @@
systemd:
name: "{{ 'ceph-crash@' + ansible_facts['hostname'] if containerized_deployment | bool else 'ceph-crash.service' }}"
state: stopped

# it needs to be done in a separate task otherwise the stop just before doesn't work.
- name: mask and disable the ceph-crash service
systemd:
name: "{{ 'ceph-crash@' + ansible_facts['hostname'] if containerized_deployment | bool else 'ceph-crash.service' }}"
enabled: no
masked: yes

- import_role:
name: ceph-defaults
- import_role:
Expand Down

0 comments on commit 3db1ea7

Please sign in to comment.