Page MenuHomePhabricator

"Currently active MediaWiki versions:" broken on noc/conf
Closed, ResolvedPublic

Description

Not sure exactly when it broke (definitely earlier this week)... But Currently active MediaWiki versions: is showing no versions on https://noc.wikimedia.org/conf/

Seems to work fine when run interactively on deploy1001

reedy@deploy1001:/srv/mediawiki-staging/docroot/noc/conf$ php index.php | grep "Currently active"
<p>Currently active MediaWiki versions: 1.35.0-wmf.1</p>

Event Timeline

Current implementation:

<p>Currently active MediaWiki versions: <?php
        echo str_replace( ' ', ', ', exec( '/usr/bin/scap wikiversions-inuse' ) );
?></p>
<hr>

I'm guessing the exec for /usr/bin/scap wikiversions-inuse has broken with some PHP7 related migration?

jijiki triaged this task as Medium priority.
jijiki added a project: serviceops.
jijiki added a project: User-jijiki.

Current implementation:

<p>Currently active MediaWiki versions: <?php
        echo str_replace( ' ', ', ', exec( '/usr/bin/scap wikiversions-inuse' ) );
?></p>
<hr>

I'm guessing the exec for /usr/bin/scap wikiversions-inuse has broken with some PHP7 related migration?

This function's all python FWIW. Just reads the wikiversions.json file.

thcipriani@mwmaint1002:~$ scap wikiversions-inuse
1.35.0-wmf.1 1.35.0-wmf.2
thcipriani@mwmaint1002:~$ php -a
Interactive mode enabled

php > echo str_replace( ' ', ', ', exec( '/usr/bin/scap wikiversions-inuse' ) );
1.35.0-wmf.1, 1.35.0-wmf.2

I thought maybe it was user-permission or working-directory related. But, looks like not.. As www-data and from a different directory, it also works fine via CLI:

mwmaint1002$ sudo -u www-data php /srv/mediawiki/docroot/noc/conf/index.php  | grep -A2 'ersions:'
<p>Currently active MediaWiki versions: 1.35.0-wmf.1, 1.35.0-wmf.2</p>

Change 651241 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[operations/mediawiki-config@master] noc: Fix "Currently active MediaWiki versions"

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

Change 651241 merged by jenkins-bot:
[operations/mediawiki-config@master] noc: Fix "Currently active MediaWiki versions"

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

Mentioned in SAL (#wikimedia-operations) [2020-12-21T23:20:31Z] <legoktm@deploy1001> Synchronized docroot/noc/conf/index.php: noc: Fix "Currently active MediaWiki versions" (T235338) (duration: 00m 54s)

Legoktm claimed this task.
Legoktm added a subscriber: jijiki.