autopilotpattern / wordpress

A robust and highly-scalable implementation of WordPress in Docker using the Autopilot Pattern
GNU General Public License v2.0
158 stars 41 forks source link

Track mysql-primary in ContainerPilot's backends #38

Closed misterbisson closed 7 years ago

misterbisson commented 7 years ago

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.

misterbisson commented 7 years ago

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.

misterbisson commented 7 years ago

Fixed in https://github.com/autopilotpattern/wordpress/pull/45 and released in https://github.com/autopilotpattern/wordpress/releases/tag/4.7.3-r4.0.0