Page MenuHomePhabricator

[scap] Add support for a global mutex to keep multiple masters from clobbering each other
Open, MediumPublic

Description

I can imagine a few scenarios where lack of locking/coordination among deployers could cause this to go horribly wrong.

For one thing, a sync from mira could clobber any in progress work that is being done on tin (and vise-versa)

We currently avoid conflicting deployment work by following a schedule and manually checking for other logged in users on tin, as well as coordinating via IRC, however, none of these methods are ideal and the checking for other logged in users bit is easily defeated when there are two deployment servers.

Shouldn't we create some sort of flag / mutex that must be obtained on both servers before beginning deployment work, and is then released at the end of a sync?

Event Timeline

bd808 raised the priority of this task from to Medium.
bd808 updated the task description. (Show Details)
bd808 added a project: Deployments.
bd808 added subscribers: bd808, mmodell.

We might be able to use the new etcd infrastructure for this. Ideally we would setup something that not only keeps multiple masters from running a sync operation at the same time but also keeps multiple deployers from messing with the state of /srv/mediawiki-staging concurrently (on the same host and cross-master).