Commit 42146ceb authored by Vitaly Lipatov's avatar Vitaly Lipatov

route-update: skip gw-* dirs in orphan cleanup (owned by route-health)

route-health.sh creates gw-* state directories for per-gateway health tracking inside .state/routes.d/GROUP/. route-update.sh was incorrectly treating them as orphaned list-state and deleting them every run. Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 634c1412
......@@ -719,6 +719,8 @@ cleanup_state()
for list_state in "$sdir"/*/ ; do
[ -d "$list_state" ] || continue
local lname=$(basename "$list_state")
# Skip gw-* dirs (owned by route-health.sh)
case "$lname" in gw-*) continue ;; esac
if [ ! -f "$routes_dir/$name/${lname}.list" ] ; then
# Check if list moved to another group (don't flush shared table)
local moved_to=$(find -L "$routes_dir" -maxdepth 2 -name "${lname}.list" -type f 2>/dev/null | head -1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment