Retry additional TLS transport failures
This commit is contained in:
parent
52f4365aeb
commit
e9a38b2a12
|
|
@ -470,7 +470,7 @@ platform_import_with_retry() {
|
|||
local address="$1" import_id="$2"
|
||||
local max_attempts="${LAB_TOFU_K8S_IMPORT_RETRIES:-3}"
|
||||
local attempt=1 status output_file current_addresses
|
||||
local transport_errors='tls: bad record MAC|TLS handshake timeout|unexpected EOF|unexpected error when reading response body|connection reset by peer|context deadline exceeded|i/o timeout|connection refused|server is currently unable'
|
||||
local transport_errors='tls: bad record MAC|tls: received record with version|tls: first record does not look like a TLS handshake|TLS handshake timeout|unexpected EOF|unexpected error when reading response body|connection reset by peer|context deadline exceeded|i/o timeout|connection refused|server is currently unable'
|
||||
|
||||
if ! [[ "${max_attempts}" =~ ^[1-9][0-9]*$ ]]; then
|
||||
echo "LAB_TOFU_K8S_IMPORT_RETRIES must be a positive integer." >&2
|
||||
|
|
@ -876,7 +876,7 @@ tofu_apply_with_kubernetes_retry() {
|
|||
local retry_sleep="${LAB_TOFU_K8S_APPLY_RETRY_SLEEP_SECONDS:-30}"
|
||||
local refresh_fallback="${LAB_TOFU_K8S_REFRESH_FALSE_FALLBACK:-true}"
|
||||
local refresh_fallback_attempts="${LAB_TOFU_K8S_REFRESH_FALSE_RETRIES:-${LAB_TOFU_K8S_APPLY_RETRIES:-3}}"
|
||||
local retry_error_pattern='cannot get OpenAPI|failed get OpenAPI spec|context deadline exceeded|TLS handshake timeout|connection refused|unexpected EOF|server is currently unable|bad record MAC|failed to query with labels|unexpected error when reading response body|unable to build kubernetes objects from release manifest|another operation .* is in progress|already exists'
|
||||
local retry_error_pattern='cannot get OpenAPI|failed get OpenAPI spec|context deadline exceeded|TLS handshake timeout|connection refused|unexpected EOF|server is currently unable|bad record MAC|received record with version|first record does not look like a TLS handshake|failed to query with labels|unexpected error when reading response body|unable to build kubernetes objects from release manifest|another operation .* is in progress|already exists'
|
||||
local attempt=1
|
||||
local status=0
|
||||
local output_file
|
||||
|
|
@ -1079,7 +1079,7 @@ tofu_plan_with_kubernetes_retry() {
|
|||
shift
|
||||
local max_attempts="${LAB_TOFU_K8S_PLAN_RETRIES:-3}"
|
||||
local attempt=1 status output_file
|
||||
local retry_error_pattern='tls: bad record MAC|TLS handshake timeout|unexpected EOF|unexpected error when reading response body|connection reset by peer|context deadline exceeded|i/o timeout|connection refused|server is currently unable|failed to query with labels'
|
||||
local retry_error_pattern='tls: bad record MAC|tls: received record with version|tls: first record does not look like a TLS handshake|TLS handshake timeout|unexpected EOF|unexpected error when reading response body|connection reset by peer|context deadline exceeded|i/o timeout|connection refused|server is currently unable|failed to query with labels'
|
||||
|
||||
if ! [[ "${max_attempts}" =~ ^[1-9][0-9]*$ ]]; then
|
||||
echo "LAB_TOFU_K8S_PLAN_RETRIES must be a positive integer." >&2
|
||||
|
|
|
|||
Loading…
Reference in New Issue