Skip to content

Commit

Permalink
fix: increase restart interval for systemd-resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
darora committed Aug 30, 2023
1 parent 1513817 commit cbb50aa
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ansible/files/systemd-resolved.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# the default is RestartSec=0. If the service fails to start because
# of a systemic issue (e.g. rare case when disk is full) it will
# quickly hit the burst limit (default of 5 failures within 10secs)
# and thereafter be placed in a failed state. By increasing the
# restart interval, we avoid that, and ensure that the service will be
# started back up once any underlying issues are resolved.
[Service]
RestartSec=3
13 changes: 13 additions & 0 deletions ansible/tasks/setup-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,19 @@
- update
- update-only

- name: create overrides dir
file:
state: directory
owner: root
group: root
path: /etc/systemd/system/systemd-resolved.service.d
mode: '0700'

- name: Custom systemd overrides for resolved
copy:
src: files/systemd-resolved.conf
dest: /etc/systemd/system/systemd-resolved.service.d/override.conf

- name: System - Create services.slice
template:
src: files/services.slice.j2
Expand Down
2 changes: 1 addition & 1 deletion common.vars.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
postgres-version = "15.1.0.115"
postgres-version = "15.1.0.116"

0 comments on commit cbb50aa

Please sign in to comment.