diff --git a/ansible/main.yml b/ansible/main.yml index 977befe..83b1b20 100644 --- a/ansible/main.yml +++ b/ansible/main.yml @@ -6,6 +6,8 @@ tags: origin-cert - role: infra-role-geth tags: geth + - role: geth-peer-fix + tags: geth-peer-fix - role: faucet tags: faucet diff --git a/ansible/roles/geth-peer-fix/README.md b/ansible/roles/geth-peer-fix/README.md new file mode 100644 index 0000000..5a79725 --- /dev/null +++ b/ansible/roles/geth-peer-fix/README.md @@ -0,0 +1,5 @@ +# Description + +This tiny role simply adds a cronjob to restart the geth container on faucet master host daily to avoid the `no suitable peers available` error which keeps messing with the faucet API. + +For more details read: https://github.com/status-im/infra-faucet/issues/1 diff --git a/ansible/roles/geth-peer-fix/tasks/main.yml b/ansible/roles/geth-peer-fix/tasks/main.yml new file mode 100644 index 0000000..5751ee1 --- /dev/null +++ b/ansible/roles/geth-peer-fix/tasks/main.yml @@ -0,0 +1,7 @@ +--- +# This an UGLY way of "fixing" the `no suitable peers available` error +- name: Add cronjob to restart geth container + cron: + name: 'HACK: Restart {{ geth_cont_name }} to avoid peers errors' + job: 'docker restart {{ geth_cont_name }}' + special_time: 'daily'