Page MenuHomePhabricator

Make "linter" table available on Labs
Closed, ResolvedPublic

Description

As part of the deployment of MediaWiki-extensions-Linter to Wikimedia wikis, can the underlying table be made available on labs? It doesn't contain any non-private data, and was explicitly OK'd by the security team: T148583#2854927.

Details

Related Gerrit Patches:
operations/puppet : productionCreate view for "linter" table on Labs

Event Timeline

Legoktm created this task.Mar 16 2017, 7:19 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 16 2017, 7:19 AM
bd808 added a project: DBA.Mar 26 2017, 8:24 PM
bd808 moved this task from Triage to Backlog on the Cloud-Services board.
bd808 added a subscriber: bd808.
> describe linter;
+---------------+------------------+------+-----+---------+----------------+
| Field         | Type             | Null | Key | Default | Extra          |
+---------------+------------------+------+-----+---------+----------------+
| linter_id     | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| linter_page   | int(10) unsigned | NO   | MUL | NULL    |                |
| linter_cat    | int(10) unsigned | NO   | MUL | NULL    |                |
| linter_start  | int(10) unsigned | NO   |     | NULL    |                |
| linter_end    | int(10) unsigned | NO   |     | NULL    |                |
| linter_params | blob             | NO   |     | NULL    |                |
+---------------+------------------+------+-----+---------+----------------+
6 rows in set (0.00 sec)

Consent given in T148583#2854927 by Security. There is nothing here that references a user so there should not be any concern by WMF-Legal.

We need a check from the DBA's to ensure that the table is being replicated and then an addition to https://phabricator.wikimedia.org/diffusion/OPUP/browse/production/modules/role/templates/labs/db/views/maintain-views.yaml to expose the table.

bd808 moved this task from Backlog to Database on the Cloud-Services board.Mar 26 2017, 8:34 PM

The table is already replicated to labs, we'd only need the view to be created.

mysql:root@localhost [enwiki]> select @@hostname;
+------------+
| @@hostname |
+------------+
| labsdb1001 |
+------------+
1 row in set (0.00 sec)

mysql:root@localhost [enwiki]> show tables like 'linter';
+---------------------------+
| Tables_in_enwiki (linter) |
+---------------------------+
| linter                    |
+---------------------------+
1 row in set (0.00 sec)
mysql:root@localhost [enwiki]> select @@hostname;
+------------+
| @@hostname |
+------------+
| labsdb1009 |
+------------+
1 row in set (0.00 sec)

mysql:root@localhost [enwiki]> show tables like 'linter';
+---------------------------+
| Tables_in_enwiki (linter) |
+---------------------------+
| linter                    |
+---------------------------+
1 row in set (0.00 sec)

Change 348201 had a related patch set uploaded (by Legoktm):
[operations/puppet@production] Create view for "linter" table on Labs

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

Change 348201 merged by Andrew Bogott:
[operations/puppet@production] Create view for "linter" table on Labs

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

Andrew added a subscriber: Andrew.Apr 27 2017, 5:51 PM

I merged the puppet change. Next we need to update things with

maintain-views  --all-databases --table linter --debug --replace-all

on labsdb1001, 1003, 1009, 1010, 1011

However, there's a bug of some sort that requires intervention from the dbas: pymysql.err.OperationalError: (1044, "Access denied for user 'maintainviews'@'localhost' to database 'dtywiki_p'")

so, waiting for them to be available.

This is now available on all db hosts except for 1001, which is misbehaving.

Andrew closed this task as Resolved.May 9 2017, 3:15 PM

Now fixed on 1001 as well.