[Engineering] MediaWiki `scap clean`

Bryan Davis bd808 at wikimedia.org
Tue Apr 4 21:17:10 UTC 2017


On Tue, Apr 4, 2017 at 2:13 PM, Chad Horohoe <chorohoe at wikimedia.org> wrote:
> `scap cleanup 1.29.0-wmf.4`
>
> This does a couple of things
> 1) Prunes old wmf/* branches from Gerrit (yay finally automated cleanup!)
> 2) Prunes the directory from /srv/mediawiki-staging/* on the active master
> 3) Prunes the directory from /srv/mediawiki/* on all apaches (masters,
> debug, etc)
> 4) Prunes the junk l10nupdate cache files (/var/cache/l10nupdate/*) that
> were **never** being cleaned up before
>
> (4) especially has bit us in the past with causing tin/mira to run out of
> disk space. Additionally, you may see a --keep-static option. This is for
> soon-to-be-dead branches where we only care about static assets
> (CSS/JS/images/etc) but the PHP is not being executed. --keep-static will
> prune the non-static assets, clean the l10nupdate cache, and still keep the
> branch intact (we go from ~4.4GB -> ~30MB when we go static-only!)
>
> Basically, a branch gets `scap clean` run twice: once when it goes out of
> service with --keep-static, and a second time a few weeks later when we
> really don't want it anymore.

w00t! Yet another reason that Chad is my hero. I half-assed automated
a tiny bit of this when I was running the train, but left all of the
hard parts in a giant list of 'do this manually' on-wiki.

Bryan
-- 
Bryan Davis              Wikimedia Foundation    <bd808 at wikimedia.org>
[[m:User:BDavis_(WMF)]]  Sr Software Engineer            Boise, ID USA
irc: bd808                                        v:415.839.6885 x6855



More information about the Engineering mailing list