Page MenuHomePhabricator

foreachwiki on beta does not include en_rtlwiki
Closed, ResolvedPublic

Description

foreachwiki has:

if hostname --domain | grep -q wmflabs ; then
    ALL_DBLIST="$MEDIAWIKI_STAGING_DIR/dblists/all-labs.dblist"
else
    ALL_DBLIST="$MEDIAWIKI_STAGING_DIR/dblists/all.dblist"
fi

However hostname --domain is deployment-prep.eqiad1.wikimedia.cloud, it doesn't include wmflabs. So all.dblist is used. Then in expanddblist:

#!/usr/bin/php
<?php
include "/srv/mediawiki/multiversion/MWWikiversions.php";
chdir( "/srv/mediawiki" );
foreach ( MWWikiversions::evalDbListExpression( "all-labs & " .$argv[1] ) as $wiki ) {

So it takes the intersection of the input DB list and all-labs. This excludes wikis that are in all-labs.dblist but not all.dblist. There is only one such wiki, it is en_rtlwiki.

So when you run a maintenance script on beta with foreachwiki, it runs the script on all beta wikis except en_rtlwiki.

Event Timeline

Change 1010590 had a related patch set uploaded (by Ahmon Dancy; author: Ahmon Dancy):

[operations/puppet@production] modules/scap/files/foreachwiki: Fix check for beta cluster

https://gerrit.wikimedia.org/r/1010590

Change 941479 had a related patch set uploaded (by Krinkle; author: root):

[operations/puppet@production] [BETA HACK] scap: foreachwikiindblist: always filter for all-labs

https://gerrit.wikimedia.org/r/941479

Change 941479 abandoned by Krinkle:

[operations/puppet@production] [BETA HACK] scap: foreachwikiindblist: always filter for all-labs

Reason:

Abandon this 3-year old live hack with https://gerrit.wikimedia.org/r/1010590

https://gerrit.wikimedia.org/r/941479

Mentioned in SAL (#wikimedia-releng) [2024-03-13T22:06:35Z] <Krinkle> krinkle@deployment-puppetmaster04 Remove live hack from 2021 https://gerrit.wikimedia.org/r/941479, T357877

Change 1010590 merged by Dzahn:

[operations/puppet@production] modules/scap/files/foreachwiki: Fix check for beta cluster

https://gerrit.wikimedia.org/r/1010590

dancy claimed this task.
dancy moved this task from Backlog to Done on the Release-Engineering-Team (Now this 🫠) board.
dancy@deployment-mwmaint02:~$ foreachwiki sql.php </dev/null | grep en_rtlwiki
en_rtlwiki