]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
infra: add retries/until on firewalld start task
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 9 Mar 2020 09:40:54 +0000 (10:40 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 12 Mar 2020 20:48:20 +0000 (21:48 +0100)
This commit make that task retrying 5 times to start the service
firewalld to avoid failure like following:

```
TASK [ceph-infra : start firewalld] ********************************************
task path: /home/jenkins-build/build/workspace/ceph-ansible-prs-centos-container-purge/roles/ceph-infra/tasks/configure_firewall.yml:22
Monday 09 March 2020  08:58:48 +0000 (0:00:00.963)       0:02:16.457 **********
fatal: [osd4]: FAILED! => changed=false
  msg: |-
    Unable to enable service firewalld: Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service.
    Created symlink from /etc/systemd/system/multi-user.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service.
    Failed to execute operation: Connection reset by peer
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b3d943fe9f1edc2f62af5c147997ef8378c82d84)

roles/ceph-infra/tasks/configure_firewall.yml

index 0acf5bbd6cfd32270c44ac45f62c99e1fe9d2973..3d566b73b272b255d1e76c664cf39e4ab0a6a1eb 100644 (file)
         name: firewalld
         state: started
         enabled: yes
+      register: result
+      retries: 5
+      delay: 3
+      until: result is succeeded
 
     - name: open ceph networks on monitor
       firewalld: