Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

Commit ab7514b

Browse files
authored
Merge pull request #563 from HotelsDotCom/etcd-cfn-signal-retry
Make cfn-signal more robust against image fetch failures
2 parents 5b9942b + 638042e commit ab7514b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

core/controlplane/config/templates/cloud-config-etcd

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,18 @@ coreos:
263263
command: start
264264
content: |
265265
[Unit]
266-
Requires={{.Etcd.SystemdUnitName}}
266+
Wants={{.Etcd.SystemdUnitName}}
267267
After={{.Etcd.SystemdUnitName}}
268268

269269
[Service]
270-
Type=oneshot
270+
Type=simple
271+
Restart=on-failure
272+
RestartSec=10
273+
271274
EnvironmentFile={{.EtcdNodeEnvFileName}}
272-
ExecStart=/opt/bin/cfn-signal
275+
ExecStartPre=/usr/bin/systemctl is-active {{.Etcd.SystemdUnitName}}
276+
ExecStartPre=/usr/bin/rkt fetch {{.AWSCliImage.Options}}{{.AWSCliImage.RktRepo}}
277+
ExecStart=-/opt/bin/cfn-signal
273278
{{end}}
274279

275280
{{if .SSHAuthorizedKeys}}

0 commit comments

Comments
 (0)