Page MenuHomePhabricator

View 'centralauth_p.localuser' references invalid table/column/rights to use them
Closed, ResolvedPublic

Description

MariaDB [centralauth_p]> select * from localuser limit 1;
ERROR 1356 (HY000): View 'centralauth_p.localuser' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
MariaDB [centralauth_p]>

Details

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Zabe triaged this task as High priority.Mar 25 2022, 6:54 PM

I think this is just a missed rebuild of the localuser view as part of T301674: Recreate views for globaluser table.

Yeah, before https://gerrit.wikimedia.org/r/c/operations/puppet/+/760953/3/modules/profile/templates/wmcs/db/wikireplicas/maintain-views.yaml the localuser table was checking for gu_hidden='', but since the gu_hidden column has been removed, this no longer works.

Yes, the views need to be recreated with those columns removed

This probably requires some more expertise eyes from WMCS. I have tried to recreate the view but the following keeps appearing despite of not showing up on maintain-views config

and `centralauth`.`globaluser`.`gu_hidden` = ''`

This probably requires some more expertise eyes from WMCS. I have tried to recreate the view but the following keeps appearing despite of not showing up on maintain-views config

and `centralauth`.`globaluser`.`gu_hidden` = ''`

I'm not sure how that could happen other than by a stale /etc/maintain-views.yaml on the host where you are running /usr/local/sbin/maintain-views. That part of the where clause was removed by @Zabe in rOPUP74aa414272b6: wmcs: stop accessing gu_hidden in maintain-views.

bd808 moved this task from ToolsDB to Wiki replicas on the Data-Services board.

Stalktoy is still down due to this error (see, for example https://meta.toolforge.org/stalktoy/OwenBlacker).

Is there an ETA for a fix being released?

This also breaks Event Metrics. Has anyone other than @Marostegui attempted to rebuild the view? Or could we try again? :)

I'm actually doing it for another reason right now. It'll be done soon.

It seems it's fixed now?

root@clouddb1018:s7[centralauth_p]> select * from localuser limit 1;
+---------+----------------------+-----------------------+--------------------+-------------+--------------+
| lu_wiki | lu_name              | lu_attached_timestamp | lu_attached_method | lu_local_id | lu_global_id |
+---------+----------------------+-----------------------+--------------------+-------------+--------------+
| aawiki  | ! lash.rubberea.com! | 20130411192301        | primary            |          34 |     16773808 |
+---------+----------------------+-----------------------+--------------------+-------------+--------------+
1 row in set (0.002 sec)

It's not pooled yet, I'll pool it soon.

Change 789308 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[operations/puppet@production] dbproxy: Repool clouddb10(17|18|19|20)

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

Change 789308 merged by Ladsgroup:

[operations/puppet@production] dbproxy: Repool clouddb10(17|18|19|20)

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

Ladsgroup claimed this task.
Ladsgroup moved this task from Triage to Done on the DBA board.

Looks like stalktoy is working now, as a result — someone should presumably remove the “it’s broken” banner

@OwenBlacker Yep, I removed the banner earlier today.