bitpoke / mysql-operator

Asynchronous MySQL Replication on Kubernetes using Percona Server and Openark's Orchestrator.
https://www.bitpoke.io/docs/mysql-operator/getting-started/
Apache License 2.0
993 stars 275 forks source link

why we need 'pre-shutdown-ha.sh' #914

Open huyiqiu opened 5 months ago

huyiqiu commented 5 months ago

Hi, I'm not sure why we need 'pre-shutdown-ha.sh' as a preStop hook, since orchestrator can perform auto-failover.

i set '--failover-before-shutdown=false' and kill master pod, the slave pod is promoted as new master, and everything looks fine. Did I miss something important?

drivebyer commented 2 months ago

When shrinking the size, the node that shrinks is the master role, and the preStop hook can perform failover operations.