Skip to content

Commit 737dadb

Browse files
authored
Merge pull request #764 from cultuurnet/feature/health_check_uitpas
Adds lock file check to health check
2 parents 7d9e75f + 2188f66 commit 737dadb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

templates/uitpas/api/deployment/service_healthcheck.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
HEALTH_URL="http://localhost:<%= @http_port_base %>/uitid/rest/uitpas/health"
44
CARDSYSTEM_HEALTH_URL="http://localhost:<%= @http_port_base %>/uitid/rest/cardsystem/login"
5+
# If Puppet is running, and possibily a deploy, we skip the health check to avoid false negatives
6+
[ -f /opt/puppetlabs/puppet/cache/state/agent_catalog_run.lock ] && return 0
57
/usr/bin/test $(/usr/bin/curl -s -o /dev/null $HEALTH_URL -w "%{http_code}") -eq 200 || return 1
68
/usr/bin/test $(/usr/bin/curl -s -o /dev/null $CARDSYSTEM_HEALTH_URL -w "%{http_code}") -eq 200
79

0 commit comments

Comments
 (0)