Add optional/ephemeral volume notation for restore resilience
Introduce x-optional-volumes for beacon sidecars (prysm, nimbus, lighthouse, teku, lodestar) that are checkpoint-sync capable and rebuild state quickly. Mark reth sockets volumes as ephemeral (runtime IPC artifacts). Script changes: - volume-utils.sh: add is_optional_volume_key() function - restore-volumes.sh: tolerate missing optional/ephemeral volume archives - clone-backup.sh: skip missing optional/ephemeral volumes gracefully - list-restorable.sh: only require archives for non-optional persistent volumes This fixes the de-25 ethereum prysm incident (entire 1.1T restore failed due to missing prysm archive) and arc-testnet reth sockets restore loops. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -13,6 +13,20 @@
|
||||
|
||||
dir="$(dirname "$0")"
|
||||
source "$dir/volume-utils.sh"
|
||||
|
||||
# Get required persistent volume keys (all volumes minus ephemeral minus optional)
|
||||
get_required_volume_keys() {
|
||||
local compose_file=$1
|
||||
local key
|
||||
|
||||
while IFS= read -r key; do
|
||||
[[ -z "$key" ]] && continue
|
||||
# Skip if ephemeral or optional
|
||||
if ! is_ephemeral_volume_key "$key" "$compose_file" && ! is_optional_volume_key "$key" "$compose_file"; then
|
||||
echo "$key"
|
||||
fi
|
||||
done < <(get_volume_keys "$compose_file")
|
||||
}
|
||||
registry_file="${dir}/compose_registry.json"
|
||||
backup_dir="/backup"
|
||||
|
||||
@@ -115,12 +129,14 @@ while IFS= read -r entry; do
|
||||
continue
|
||||
fi
|
||||
|
||||
# Check each volume for backup file
|
||||
# Check each required volume for backup file
|
||||
all_backups_exist=true
|
||||
missing_volumes=()
|
||||
backup_info=()
|
||||
|
||||
while IFS= read -r volume; do
|
||||
# Get required persistent volumes (excluding ephemeral and optional)
|
||||
# Use process substitution to avoid subshell issues
|
||||
while IFS= read -r volume < <(get_required_volume_keys "$compose_path"); do
|
||||
volume_name="rpc_${volume}"
|
||||
# jwt/secrets volumes are regenerated at create-node — never backed up by
|
||||
# design, so they must not gate restorability (kept plasma marked
|
||||
|
||||
Reference in New Issue
Block a user