From: Dimitri Savineau Date: Mon, 22 Jul 2019 20:58:40 +0000 (-0400) Subject: ceph-osd: check container engine rc for pools X-Git-Tag: v4.0.0rc14~42 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=36e18e20d140201c553239e0b51a12e51ebffcbf;p=ceph-ansible.git ceph-osd: check container engine rc for pools When creating OpenStack pools, we only check if the return code from the pool list command isn't 0 (ie: if it doesn't exist). In that case, the return code will be 2. That's why the next condition is rc != 0 for the pool creation. But in containerized deployment, the return code could be different if there's a failure on the container engine command (like container not running). In that case, the return code could but either 1 (docker) or 125 (podman) so we should fail at this point and not in the next tasks. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1732157 Signed-off-by: Dimitri Savineau (cherry picked from commit d549fffdd24d21661b64b31bda20b4e8c6aa82b6) --- diff --git a/roles/ceph-osd/tasks/openstack_config.yml b/roles/ceph-osd/tasks/openstack_config.yml index 9a0a8db84..fee91095d 100644 --- a/roles/ceph-osd/tasks/openstack_config.yml +++ b/roles/ceph-osd/tasks/openstack_config.yml @@ -20,7 +20,8 @@ with_items: "{{ openstack_pools | unique }}" register: created_pools delegate_to: "{{ groups[mon_group_name][0] }}" - failed_when: false + failed_when: created_pools.rc in [1, 125] + changed_when: false - name: create openstack pool(s) command: >