Page MenuHomePhabricator

IP information could not be retrieved
Closed, ResolvedPublicBUG REPORT

Description

Today, IP information cannot display any content, and the message "IP information could not be retrieved" is displayed.

This problem occurs in enwiki, zhwiki, and commonswiki. (Maybe all wiki)


CI for IPInfo fails with:

16:13:50 There was 1 failure:
16:13:50 
16:13:50 1) MediaWiki\IPInfo\Test\Unit\Rest\Handler\IPInfoHandlerTest::testValidateBodyParams with data set "token parameter" (MediaWiki\Rest\RequestData Object (...), array('kittens'))
16:13:50 Failed asserting that two arrays are identical.
16:13:50 --- Expected
16:13:50 +++ Actual
16:13:50 @@ @@
16:13:50 -Array &0 (
16:13:50 -    'token' => 'kittens'
16:13:50 -)
16:13:50 +Array &0 ()

Event Timeline

Josve05a changed the subtype of this task from "Task" to "Bug Report".Jul 19 2024, 2:50 PM
JJMC89 added subscribers: Dzahn, JJMC89.

I wonder if the puppet changes for T370436 did it. cc @Dzahn

Maybe it's the CrowdStrike incident/outage?
https://en.wikipedia.org/wiki/2024_CrowdStrike_incident

Same here, I can't access it either.

@JJMC89 No, I don't see a relation there.

That change merely gives the option to skip pulling geoip data from puppetmasters but the default stayed TRUE. You had to specifically set a Hiera key to disable it.

I also compiled that on the entire class AND ran puppet manually on a bunch of appservers. It was no change anywhere.

Finally the geoIP databases are there as always on the puppetmaster and on a random appserver I double checked.

As suggested in T363118#9734804 I looked at the browser console and I noticed that this request returns a 403.

https://en.wikipedia.org/w/rest.php/ipinfo/v0/revision/1220150524?dataContext=infobox&language=en

errorKey	"rest-badtoken"
messageTranslations	
en	"The <var>token</var> parameter is required unless using a CSRF-safe authentication method."
httpCode	403
httpReason	"Forbidden"
kostajh triaged this task as High priority.Jul 20 2024, 8:28 PM
kostajh subscribed.

Perhaps related to some REST framework refactoring in core.

The tests seem to correctly diagnose this error: https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php74-noselenium/27499/console

Perhaps we need to add IP Info into the gate, so it would block CI and then be fixed before it reached wikis?

I suspect the fix is to move the handler definition code into a ::getBodyParamSettings definition.

Change #1055652 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[integration/config@master] zuul: Add IPInfo to gate

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

Change #1055655 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/IPInfo@master] IPInfoHandler: Override getBodyValidator

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

Change #1055655 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] IPInfoHandler: Move token param definition to getBodyParamSettings

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

Change #1055771 had a related patch set uploaded (by STran; author: Kosta Harlan):

[mediawiki/extensions/IPInfo@wmf/1.43.0-wmf.14] IPInfoHandler: Move token param definition to getBodyParamSettings

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

Change #1055771 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@wmf/1.43.0-wmf.14] IPInfoHandler: Move token param definition to getBodyParamSettings

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

Mentioned in SAL (#wikimedia-operations) [2024-07-22T07:23:22Z] <stran@deploy1002> Started scap sync-world: Backport for [[gerrit:1055771|IPInfoHandler: Move token param definition to getBodyParamSettings (T370500)]]

Mentioned in SAL (#wikimedia-operations) [2024-07-22T07:25:44Z] <stran@deploy1002> stran: Backport for [[gerrit:1055771|IPInfoHandler: Move token param definition to getBodyParamSettings (T370500)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-07-22T07:35:40Z] <stran@deploy1002> Finished scap: Backport for [[gerrit:1055771|IPInfoHandler: Move token param definition to getBodyParamSettings (T370500)]] (duration: 12m 18s)

Change #1055652 merged by jenkins-bot:

[integration/config@master] zuul: Add IPInfo to gate

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

We deployed a fix— subscribers, could you please confirm if the IP Info tool is working for you?

I am no longer seeing the issue.