Skip to content

Commit

Permalink
fix: add custom dnsConfig to all cronjobs
Browse files Browse the repository at this point in the history
This is an attempt to fix the problem where cronjobs intermittently fail
with getaddrinfo() error EAI_AGAIN. The problem appears to be that the
lookup times out due to dropped UDP packets.

The default for timeout is 5 seconds and attempts is 2 for both musl and
glibc. This change bumps the configured values to the maximum values for
musl: 60s timeout and 10 attempts.

For any custom cronjobs running glibc-based images the maximum values
are silently capped at half those values: 30s timeout and 5 attempts.

References:
https://git.musl-libc.org/cgit/musl/tree/src/network/resolvconf.c#n17
https://manpages.debian.org/buster/manpages/resolv.conf.5.en.html
  • Loading branch information
smlx committed Jul 29, 2022
1 parent 57c17a4 commit b3fe66e
Show file tree
Hide file tree
Showing 25 changed files with 150 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,10 @@ spec:
key: lagoon.sh/build
operator: Exists
{{- toYaml $.Values.tolerations | nindent 12 }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,10 @@ spec:
tolerations:
{{- toYaml $ | nindent 12 }}
{{- end }}
dnsConfig:
options:
- name: timeout
value: "60"
- name: attempts
value: "10"
{{- end }}

0 comments on commit b3fe66e

Please sign in to comment.