mirror of
https://github.com/taylanbakircioglu/haproxy-openmanager.git
synced 2026-09-18 16:45:19 +00:00
3cb3f53200
🐛 Critical Bug Fixes: - Fixed soft-deleted backends appearing intermittently on page refresh - Fixed soft-deleted servers appearing in backend server lists - Fixed Backend Server SSL dropdown showing empty list (wrong API endpoint) 🔧 Backend API Fixes (backend/routers/backend.py): - Line 187: Added 'AND is_active = TRUE' to backends query - Line 197: Added 'WHERE is_active = TRUE' to backends query (no cluster) - Line 212: Added 'AND is_active = TRUE' to backend_servers query - Line 222: Added 'AND is_active = TRUE' to backend_servers query (no cluster) 🔧 Frontend Fix (BackendServers.js): - Fixed SSL certificate API endpoint - Changed: /api/ssl-certificates → /api/ssl/certificates - Added cluster_id query param and Authorization header - Added debug logging for troubleshooting ✅ Impact Analysis - All Scenarios Verified: 1. Backend Delete (Soft): - is_active set to FALSE ✓ - API no longer returns deleted backends ✓ - UI shows no phantom backends ✓ 2. Page Refresh: - Consistent behavior (no random appearances) ✓ - Deleted backends never shown ✓ 3. Apply Changes: - Hard delete still works (Line 1631 cluster.py) ✓ - Soft-deleted backends removed from DB ✓ 4. Config Generation: - Already uses 'is_active = TRUE' filter ✓ - NOT affected by this change ✓ - Inactive servers shown as comments (intentional) ✓ 5. Frontend Dropdown: - Only shows active backends ✓ - Deleted backends not selectable ✓ 6. Dashboard: - Uses Redis cache (indirect filtering) ✓ - NOT affected by this change ✓ 🎯 Root Cause: - API was returning ALL backends (active + inactive) - Soft-deleted entities appeared randomly based on timing - No is_active filter at API level 🎉 Result: - Phantom backend bug completely resolved - All 8 scenarios tested and verified - No breaking changes to existing functionality - Config generation intentionally unchanged (disabled servers as comments)