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:
1 parent
27e9f775be
commit
8c0efb9715
1 file changed
+2
-2
@@ -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
|
||||
Reference in new issue
Block a user