Update initialize-gun.sh script with retries for vault component
Pipeline 503's have been alleviated so that is a lower priority as of now. The retries use the VAULT_RETRIES
environment variable so pipeline users can set this env variable to increase the number or retries if necessary.
The initialize-gun.sh script needs a few more retries for the following
Background
Vault will intermittently return 503's when the initialization script is run or the pipeline attempts to log in.
Example of missing the root key
URL: GET https://<root key url>
Code: 503. Raw Message:
upstream connect error or disconnect/reset before headers. reset reason: local reset
and when logging in
Error authenticating: Error making API request.
URL: PUT https://<vault notary admin login>
Code: 503. Raw Message:
upstream connect error or disconnect/reset before headers. reset reason: local reset
Error making API request.
URL: GET https://<root key url>
Code: 400. Errors:
and when pushing the targets key
URL: PUT https://<targets key url>
Code: 503. Raw Message:
upstream connect error or disconnect/reset before headers. reset reason: local reset
This behavior also affects the pipeline
https://repo1.dso.mil/dsop/opensource/mariadb/mariadb103/-/jobs/2637116
Edited by Kenneth Maguire