Enos: add additional guards before authentication (#2382)

* Enos: add additional guards before authentication

Previously, we would see failures when the ALB in front of a
cluster was alive and passing healthchecks, but the database behind
had not been initialized yet.  This adds a check with an unauth'd
call to `auth-methods list` to validate the DB is up before auth.
This commit is contained in:
Josh Brand authored and GitHub committed 2022-08-23 14:46:24 -04:00
1 parent 27e9f775be
commit 8c0efb9715
1 file changed
+2 -2
+2 -2
View File
@@ -21,8 +21,8 @@ function retry {
return 0
}
# make sure the ALB is up and passing healthchecks
retry 10 curl -s -o /dev/null ${BOUNDARY_ADDR}
# make sure boundary is connected to DB (unauthenticated endpoint)
retry 10 ${BOUNDARY_PATH}/boundary auth-methods list > /dev/null
export BP="${PASSWORD}"
${BOUNDARY_PATH}/boundary authenticate password -auth-method-id=${METHOD_ID} -login-name=${LOGIN_NAME} -password=env://BP -token-name=none -format=json -keyring-type=none