Skip to content

Commit

Permalink
fix(freebsd): use retry_options to avoid spurious service failures
Browse files Browse the repository at this point in the history
Use the `retry_options` already being used for the Salt minion service,
since we're getting failures such as this one:

* https://github.com/myii/salt-formula/runs/2415072504

This is made worse by the fact that GitHub Actions cannot re-run a
single job (at the current time).
  • Loading branch information
myii committed Apr 23, 2021
1 parent 0e96047 commit 698b7ea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions salt/api.sls
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ salt-api:
service.{{ salt_settings.api_service_details.state }}:
- enable: {{ salt_settings.api_service_details.enabled }}
- name: {{ salt_settings.api_service }}
{%- if grains.os_family == 'FreeBSD' %}
- retry: {{ salt_settings.retry_options | json }}
{%- endif %}
- require:
- service: {{ salt_settings.master_service }}
- watch:
Expand Down
3 changes: 3 additions & 0 deletions salt/master.sls
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ salt-master:
service.{{ salt_settings.master_service_details.state }}:
- enable: {{ salt_settings.master_service_details.enabled }}
- name: {{ salt_settings.master_service }}
{%- if grains.os_family == 'FreeBSD' %}
- retry: {{ salt_settings.retry_options | json }}
{%- endif %}
- watch:
{%- if grains.kernel|lower == 'darwin' %}
- file: salt-master-macos
Expand Down
3 changes: 3 additions & 0 deletions salt/standalone.sls
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ salt-minion-standalone:
- enable: False
{%- endif %}
- name: {{ salt_settings.minion_service }}
{%- if grains.os_family == 'FreeBSD' %}
- retry: {{ salt_settings.retry_options | json }}
{%- endif %}
- require:
{% if salt_settings.install_packages %}
- pkg: salt-minion-standalone
Expand Down
3 changes: 3 additions & 0 deletions salt/syndic.sls
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ salt-syndic:
service.running:
- enable: True
- name: {{ salt_settings.syndic_service }}
{%- if grains.os_family == 'FreeBSD' %}
- retry: {{ salt_settings.retry_options | json }}
{%- endif %}
- require:
- service: salt-master
- watch:
Expand Down

0 comments on commit 698b7ea

Please sign in to comment.