Version 2.2.0: Health checks sur nœud passif avec notifications
All checks were successful
Tests et Vérifications / Tests unitaires BATS (push) Successful in 14s
Tests et Vérifications / Vérification ShellCheck (push) Successful in 7s
Tests et Vérifications / Vérification syntaxe Bash (push) Successful in 3s
Tests et Vérifications / Résumé des tests (push) Successful in 1s
All checks were successful
Tests et Vérifications / Tests unitaires BATS (push) Successful in 14s
Tests et Vérifications / Vérification ShellCheck (push) Successful in 7s
Tests et Vérifications / Vérification syntaxe Bash (push) Successful in 3s
Tests et Vérifications / Résumé des tests (push) Successful in 1s
- Vérification santé pools même sur nœud passif - Notifications en cas de pool dégradé sur passif - Détection proactive avant failover - Pas de migration si nœud passif (juste alerte)
This commit is contained in:
parent
d5a0429d2c
commit
263c1a0556
1 changed files with 18 additions and 1 deletions
|
|
@ -24,7 +24,7 @@
|
|||
set -euo pipefail
|
||||
|
||||
# Configuration
|
||||
SCRIPT_VERSION="2.1.0"
|
||||
SCRIPT_VERSION="2.2.0"
|
||||
REPO_URL="https://forgejo.tellserv.fr/Tellsanguis/zfs-sync-nfs-ha"
|
||||
SCRIPT_URL="${REPO_URL}/raw/branch/main/zfs-nfs-replica.sh"
|
||||
SCRIPT_PATH="${BASH_SOURCE[0]}"
|
||||
|
|
@ -1297,6 +1297,23 @@ log "info" "Pools configurés: ${ZPOOLS[*]}"
|
|||
# Triple vérification de sécurité
|
||||
if ! verify_lxc_is_active; then
|
||||
log "info" "Le LXC ${CTID} n'est pas actif sur ce nœud. Pas de réplication nécessaire."
|
||||
|
||||
# Vérification de santé des pools sur nœud passif
|
||||
log "info" "Vérification de santé des pools (nœud passif)"
|
||||
PASSIVE_HEALTH_FAILED=false
|
||||
for pool in "${ZPOOLS[@]}"; do
|
||||
if ! verify_pool_health "$pool"; then
|
||||
log "warning" "⚠ Pool ${pool} en mauvaise santé sur nœud PASSIF"
|
||||
send_notification "error" "Pool dégradé sur nœud passif" \
|
||||
"Pool: ${pool}\nNœud: ${LOCAL_NODE}\nStatut: PASSIF\n\nLe pool est dégradé mais ce nœud est passif. Vérifier l'état du matériel avant un éventuel failover."
|
||||
PASSIVE_HEALTH_FAILED=true
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$PASSIVE_HEALTH_FAILED" == "false" ]]; then
|
||||
log "info" "✓ Tous les pools sont en bonne santé (nœud passif)"
|
||||
fi
|
||||
|
||||
# Configurer Sanoid en mode passif
|
||||
configure_sanoid "passive"
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue