Skip to content

Functional testing: Tier B — Failover test with ProxySQL hook validation #44

@renecannao

Description

@renecannao

Tier B: Failover Test

Using the Tier A infrastructure, test actual failover and validate ProxySQL hooks work end-to-end.

Pre-requisites

Failover Tests

  • Kill master: Stop the MySQL master container
  • Detection: Orchestrator detects DeadMaster within configured interval
  • Recovery: Orchestrator promotes one of the replicas to master
  • ProxySQL pre-hook: Old master set to OFFLINE_SOFT in ProxySQL (verify via SELECT * FROM runtime_mysql_servers)
  • ProxySQL post-hook: New master appears in writer hostgroup 10 (verify via SELECT * FROM runtime_mysql_servers)
  • ProxySQL runtime: LOAD MYSQL SERVERS TO RUNTIME was executed (traffic routes to new master)
  • Traffic validation: Queries through ProxySQL (port 6033) reach the new master
  • Replication: Remaining replica replicates from the new master

Graceful Takeover Test

  • Graceful takeover: Run orchestrator -c graceful-master-takeover to switch master to a specific replica
  • ProxySQL updated: Writer hostgroup points to new master after graceful takeover
  • No downtime: Traffic through ProxySQL continues during graceful takeover

Recovery Audit

  • Recovery log: /api/v2/recoveries shows the recovery event
  • Audit trail: Orchestrator audit table records all steps

Findings

(To be updated as tests run)

Bugs Found

(To be updated — each bug gets its own issue)

Depends on #43 (Tier A). Prerequisite for #45 (Tier C).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions