Skip to content

fix(proxysql): resync satellites stuck on core DNS - #193

Open
sideshowbandana wants to merge 1 commit into
mainfrom
kyle.barton/2026-09-02/satellite-unstick-core-dns
Open

sideshowbandana wants to merge 1 commit into
mainfrom
kyle.barton/2026-09-02/satellite-unstick-core-dns

Conversation

@sideshowbandana

Copy link
Copy Markdown
Contributor

Summary

  • Count stale proxysql-core Service DNS peers in GetMissingCorePods so SatelliteResync reloads proxysql_servers from config.
  • This is the agent-side fix for satellites stuck after a full core replace.

Test plan

  • Unit tests for GetMissingCorePods / SatelliteResync
  • After release, confirm fetch-from-peer proxysql-core:6032 logs recover via resync without manual SQL

Satellites that keep hostname proxysql-core after a core rotation never counted as missing, so the existing resync path never ran. Count that DNS peer when last_check_ms is stale so we reload proxysql_servers from config.

**Potential Risk**
Satellites may reload proxysql_servers more often when the DNS peer is stale (~30s). Reload is the same path ops use by hand. A bug in the SQL could skip legitimate IP-core missing detection.

Worst Case Incident: SEV-3

**AI Usage**
Cursor agent implemented from the approved plan; reviewer should check the stats query and sqlmock.

**Testing Strategy**
go test ./internal/proxysql/ -count=1 -run 'TestGetMissingCorePods|TestSatelliteResync'
@sideshowbandana
sideshowbandana requested a review from a team as a code owner September 2, 2026 16:40
@sideshowbandana

Copy link
Copy Markdown
Contributor Author

Verify that this is actually a change that we want and need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant