Retry additional TLS transport failures
Homelab Main / validate (push) Waiting to run Details
Homelab Main / running-update (push) Blocked by required conditions Details
Homelab Main / debian-ops (push) Blocked by required conditions Details

This commit is contained in:
juvenal.diaz 2026-10-30 23:28:21 -06:00
parent 52f4365aeb
commit e9a38b2a12
1 changed files with 3 additions and 3 deletions

View File

@ -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