]> 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)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 9 Mar 2020 19:01:34 +0000 (15:01 -0400)
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>
roles/ceph-infra/tasks/configure_firewall.yml

index 13c6b074f5f417dada2562071d954b875de144be..a5fab7e4a6150e0f28fb37bbfe0a4cfe443c46c9 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: