mirror of
https://github.com/taylanbakircioglu/haproxy-openmanager.git
synced 2026-09-23 19:06:25 +00:00
001b467e42
CRITICAL BUG FIX: Rejected bulk import entities were marked APPLIED ROOT CAUSE: - Bulk import versions (bulk-import-*) don't match entity-ID regex - Final cleanup incorrectly marked all PENDING entities as APPLIED - 594 entities (56 FE + 55 BE + 483 SRV) corrupted in production SOLUTION: 1. Detect bulk import versions (bulk-import-*, restore-*) 2. Extract entity IDs from metadata bulk_snapshots 3. Verify rollback deleted entities (should be 0 remaining) 4. If rollback failed, force DELETE entities 5. Skip final cleanup for bulk import (entities already handled) IMPACT: - Prevents data corruption on rejected bulk imports - Detects and auto-fixes failed rollbacks - Maintains data integrity for multi-entity operations - Preserves existing orphan cleanup for single-entity changes TESTING: - Bulk import + reject: Entities deleted (not APPLIED) - Normal entity + reject: Status updated to APPLIED (rollback) - Orphan entities: Cleaned only if safe (no bulk versions) Ref: demo-cluster bulk-import-1763450049 issue