autopilotpattern / wordpress

A robust and highly-scalable implementation of WordPress in Docker using the Autopilot Pattern

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Track mysql-primary in ContainerPilot's backends

misterbisson opened this issue · comments

The backends stanza in WordPress' containerpilot.json tracks mysql, nfs, and memcached, but doesn't track mysql-primary. This has not been a problem so far because electing a new mysql-primary has so far always changed the pool or mysql instances. That assumption has been safe so far, but it doesn't seem like one we need to enshrine here.

I've now confirmed this is not just a theoretical issue, but a real bug. After scaling down from four MySQL instances to three, where the one instance Docker Compose chose to kill off was the MySQL primary, WordPress didn't detect the replacement primary.