]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
switch_to_containers: fix umount ceph partitions
authorDimitri Savineau <dsavinea@redhat.com>
Wed, 27 Nov 2019 16:27:09 +0000 (11:27 -0500)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 3 Dec 2019 14:58:36 +0000 (15:58 +0100)
commita325ff61e87ecddd19564e63e2a7acd19afcec10
tree98ce31c49a99c815442e420508d1fbd8de852859
parent1e7fd9fe36d220ed56cfec889d885384c54373a2
switch_to_containers: fix umount ceph partitions

When a container is already running on a non containerized node then the
umount ceph partition task is skipped.
This is due to the container ps command which always returns 0 even if
the filter matches nothing.

We should run the umount task when:
1/ the container command is failing (not installed) : rc != 0
2/ the container command reports running ceph-osd containers : rc == 0

Also we should not fail on the ceph directory listing.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1616159
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 39cfe0aa65ddd96458ba9d0a031d801efbb0d394)
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml