Skip to content

Commit 1106072

Browse files
committed
Add startup check on the server container
Differenciate the startup check from the health check: the startup can start for ever with a potential database reindexing (bsc#1263157)
1 parent 963a0ff commit 1106072

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

mgradm/shared/templates/serviceTemplate.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ ExecStart=/bin/sh -c '/usr/bin/podman run \
6767
--secret {{ .AdminUserSecret }},type=env,target=ADMIN_USER \
6868
--secret {{ .AdminPassSecret }},type=env,target=ADMIN_PASS \
6969
{{- end }}
70-
--health-on-failure=none \
70+
--health-on-failure=stop \
71+
--health-cmd=/usr/bin/healthcheck.sh \
72+
--health-startup-cmd=/usr/bin/startup-check.sh \
73+
--health-startup-interval=10s \
7174
${PODMAN_EXTRA_ARGS} ${UYUNI_IMAGE}'
7275
7376
ExecStop=-/usr/bin/podman exec \

mgradm/shared/templates/templates_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ ExecStart=/bin/sh -c '/usr/bin/podman run \
139139
--secret uyuni-scc-pass,type=env,target=SCC_PASS \
140140
--secret uyuni-admin-user,type=env,target=ADMIN_USER \
141141
--secret uyuni-admin-pass,type=env,target=ADMIN_PASS \
142-
--health-on-failure=none \
142+
--health-on-failure=stop \
143+
--health-cmd=/usr/bin/healthcheck.sh \
144+
--health-startup-cmd=/usr/bin/startup-check.sh \
145+
--health-startup-interval=10s \
143146
${PODMAN_EXTRA_ARGS} ${UYUNI_IMAGE}'
144147
145148
ExecStop=-/usr/bin/podman exec \
@@ -216,7 +219,10 @@ ExecStart=/bin/sh -c '/usr/bin/podman run \
216219
--secret cert-secret,type=mount,target=/etc/pki/tls.crt \
217220
--secret key-secret,type=mount,target=/etc/pki/tls.key \
218221
--secret db-ca-secret,type=mount,target=/etc/pki/db-ca.crt \
219-
--health-on-failure=none \
222+
--health-on-failure=stop \
223+
--health-cmd=/usr/bin/healthcheck.sh \
224+
--health-startup-cmd=/usr/bin/startup-check.sh \
225+
--health-startup-interval=10s \
220226
${PODMAN_EXTRA_ARGS} ${UYUNI_IMAGE}'
221227
222228
ExecStop=-/usr/bin/podman exec \
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Use a startup check with no limit for the main server container
2+
(bsc#1263157)

0 commit comments

Comments
 (0)