Page MenuHomePhabricator

tools.tools-info has problem connecting to database
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
Error connection to database

What should have happened instead?:
There should not be.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
Seems similar to T105911

Event Timeline

Per https://toolsadmin.wikimedia.org/tools/id/tools-info maintainers are @Ladsgroup, @MusikAnimal, and Hedonil.

The app is failing to connect to the "meta_p" database on host "s5.labsdb". This is basically badly out of date code/configuration. We still support a number of *.labsdb DNS aliases, but these have been deprecated since 2017. A copy of the "meta_p" database used to be available on every wiki replica server, but since https://wikitech.wikimedia.org/wiki/News/Wiki_Replicas_2020_Redesign (~April 2021) this table has only be available on the "s7" replicas. Updating the code/configuration to connect to the host "meta.analytics.db.svc.wikimedia.cloud" when selecting the "meta_p" database would be the most modern solution.

bd808 claimed this task.

I updated the tool's $HOME/public_html/index.php to use hostnames like "s7.analytics.db.svc.wikimedia.cloud" and use the "meta.analytics.db.svc.wikimedia.cloud" service name when connecting to "meta_p" to ensure that it finds the correct server. While I was poking I also updated the navigation to include s8 and to no longer assume that the same databases are present on s1-s5.

Basically everything about this tool is outdated at this point, so I would recommend anyone who is using it find other sources of information.

Hedonil (the original author) has been inactive for years. I requested to become a maintainer of this tool solely to setup the redirect from https://tools-info.toolforge.org/optimizer.py to https://sql-optimizer.toolforge.org. I otherwise agree with bd808, no one should rely on tools-info right now as it is very outdated. I guess we could wipe out everything and make all requests (other than /optimizer.py) redirect to https://noc.wikimedia.org/db.php. Would that make sense, now that the Toolforge replicas mimic production?

Hedonil (the original author) has been inactive for years. I requested to become a maintainer of this tool solely to setup the redirect from https://tools-info.toolforge.org/optimizer.py to https://sql-optimizer.toolforge.org. I otherwise agree with bd808, no one should rely on tools-info right now as it is very outdated. I guess we could wipe out everything and make all requests (other than /optimizer.py) redirect to https://noc.wikimedia.org/db.php. Would that make sense, now that the Toolforge replicas mimic production?

If nobody is actually taking care of the tool, it seems reasonable to just shut it down. I'll leave that decision to the maintainers however.

There's quite a lot of functions provided by this tool could not be replaced by others, like explorer, schemas for creating dumps. btw, I entered that URL following by https://wikitech.wikimedia.org/wiki/Help:MySQL_queries, so maybe a good start is to update the docs.

There's quite a lot of functions provided by this tool could not be replaced by others, like explorer, schemas for creating dumps. btw, I entered that URL following by https://wikitech.wikimedia.org/wiki/Help:MySQL_queries, so maybe a good start is to update the docs.

Considering how many people leave credentials world-readable on Toolforge (by accident/negligence/ignorance/etc.), I don't really see a need for a web-based file browser. Anyone that into Toolforge I assume will have an account of their own anyway.

https://tools-info.toolforge.org/schemas.php?schema=enwiki does not list the indexing that's available on Toolforge, nor does it know about specialized views, but the latter may be fixable by a simple re-run of the dump script. SQL Optimizer has a schema browser, so we have that, assuming no one truly needs the raw SQL to create the tables. SQL Optimizer doesn't list the indexes but it does let you know about them if it detects your query should probably use one. I'm not sure how to gather the indexing info programmatically without admin access, but if there's a way to do it, I'm happy to surface that in the schema browser in SQL Optimizer.

There's quite a lot of functions provided by this tool could not be replaced by others, like explorer,

Can you help me understand the value of this directory listing function? It doesn't actually act as a file browser. It only shows file names/sizes.

schemas for creating dumps.

That dump says "Last updated: October 24 2016 02:24:53." which to me means that the URL existing is less than useless. It is actively giving out ancient data and there are obviously users who do not understand that.

btw, I entered that URL following by https://wikitech.wikimedia.org/wiki/Help:MySQL_queries, so maybe a good start is to update the docs.

Yup. We always have more work to do on updating docs. I made a few edits, but I didn't get rid of all links to https://tools-info.toolforge.org/?listmetap yet.

I genuinely have no memory of being added to this tool but given that I'm maintainer of around 40 tools, at this point I gave up on tracking and help on maintaining anything that I'm asked for. Seems you got this covered, is there anything else you want me to help with?