From d00c069e25463e6e675b0cea9f625a6e78985744 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Sun, 3 Apr 2022 10:26:20 +0100 Subject: [PATCH] fix(gentoo): use `retry_options` to avoid spurious service failures Use the `retry_options` on Gentoo, similar to how its already being used across the state files for FreeBSD, since we're getting failures such as this one: * https://gitlab.com/myii/salt-formula/-/jobs/2285180374 --- salt/api.sls | 2 +- salt/master.sls | 2 +- salt/minion.sls | 2 +- salt/standalone.sls | 2 +- salt/syndic.sls | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/salt/api.sls b/salt/api.sls index bd85fb7..457b784 100644 --- a/salt/api.sls +++ b/salt/api.sls @@ -15,7 +15,7 @@ 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' %} + {%- if grains.os_family in ['FreeBSD', 'Gentoo'] %} - retry: {{ salt_settings.retry_options | json }} {%- endif %} - require: diff --git a/salt/master.sls b/salt/master.sls index 577bebc..af9d867 100644 --- a/salt/master.sls +++ b/salt/master.sls @@ -54,7 +54,7 @@ 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' %} + {%- if grains.os_family in ['FreeBSD', 'Gentoo'] %} - retry: {{ salt_settings.retry_options | json }} {%- endif %} - watch: diff --git a/salt/minion.sls b/salt/minion.sls index 1a72d9a..e1eb8b5 100644 --- a/salt/minion.sls +++ b/salt/minion.sls @@ -97,7 +97,7 @@ salt-minion: service.{{ salt_settings.minion_service_details.state }}: - enable: {{ salt_settings.minion_service_details.enabled }} - name: {{ salt_settings.minion_service }} - {%- if grains.os_family == 'FreeBSD' %} + {%- if grains.os_family in ['FreeBSD', 'Gentoo'] %} - retry: {{ salt_settings.retry_options | json }} {%- endif %} - watch: diff --git a/salt/standalone.sls b/salt/standalone.sls index a14f12b..344cd84 100644 --- a/salt/standalone.sls +++ b/salt/standalone.sls @@ -25,7 +25,7 @@ salt-minion-standalone: - enable: False {%- endif %} - name: {{ salt_settings.minion_service }} - {%- if grains.os_family == 'FreeBSD' %} + {%- if grains.os_family in ['FreeBSD', 'Gentoo'] %} - retry: {{ salt_settings.retry_options | json }} {%- endif %} - require: diff --git a/salt/syndic.sls b/salt/syndic.sls index d6d6875..bd142cf 100644 --- a/salt/syndic.sls +++ b/salt/syndic.sls @@ -18,7 +18,7 @@ salt-syndic: service.running: - enable: True - name: {{ salt_settings.syndic_service }} - {%- if grains.os_family == 'FreeBSD' %} + {%- if grains.os_family in ['FreeBSD', 'Gentoo'] %} - retry: {{ salt_settings.retry_options | json }} {%- endif %} - require: