Page MenuHomePhabricator

pawikisource_p.page table not available
Closed, ResolvedPublic

Description

The SQL command via Quary:

SELECT COUNT(*) from pawikisource_p.page;

reports

Error
SELECT command denied to user 's52788'@'10.64.37.14' for table 'page'

See https://quarry.wmflabs.org/query/22537
The table used to be accessible, eg in https://quarry.wmflabs.org/query/21247 which worked some time ago and now fails (unless pawikisource_p is commented out).

Any hints?

Event Timeline

Ankry updated the task description. (Show Details)

It seems to me that something is wrong with database permissions after labs switched to new replica database servers.

$ sql --cluster web pawikisource
(u3518@pawikisource.web.db.svc.eqiad.wmflabs) [pawikisource_p]> select count(*) from page;
+----------+
| count(*) |
+----------+
|      986 |
+----------+
1 row in set (0.00 sec)
$ sql --cluster analytics pawikisource
ERROR 1044 (42000): Access denied for user 'u3518'@'%' to database 'pawikisource_p'

It looks like the grants are messed up on the 10.64.37.14 host.

I tried running sudo maintain-views --databases pawikisource --debug --replace-all, but that does not seem to have fixed things.

madhuvishy claimed this task.
madhuvishy subscribed.

I've fixed the grants for pawikisource_p now.

On investigating I found that labsdb1009 had missing grants for the labsdbuser user for pawikisource_p and wbwikimedia_p. I fixed both by running, on labsdb1009

MariaDB [(none)]> GRANT SELECT, SHOW VIEW ON `pawikisource\_p`.* TO 'labsdbuser';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> GRANT SELECT, SHOW VIEW ON `wbwikimedia\_p`.* TO 'labsdbuser';
Query OK, 0 rows affected (0.00 sec)

The original query forked and executed successfully here https://quarry.wmflabs.org/query/22644.