Page MenuHomePhabricator

Add lu_attachment_method column to localuser table
Closed, ResolvedPublic

Description

  1. ALTERs to run: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralAuth/+/773903/3/schema/mysql/patch-add-lu_attachment_method.sql
  2. Where to run those changes: centralauth database only
  3. When to run those changes: Up to DBA availability
  4. If the schema change is backwards compatible: Yes. All added fields have default values.
  5. If the schema change has been tested already on some of the test/beta wikis: Yes, tested on deployment-prep.
  6. If the data should be made available on the cloud services replicas and/or dumps: The content of the new column can be made public.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Ladsgroup moved this task from Triage to In progress on the DBA board.
Ladsgroup triaged this task as Medium priority.Apr 4 2022, 2:07 AM

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

[operations/software/schema-changes@master] Add add_lu_attachment_method_T305300.py

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

Change 776462 merged by jenkins-bot:

[operations/software/schema-changes@master] Add add_lu_attachment_method_T305300.py

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

Mentioned in SAL (#wikimedia-operations) [2022-04-07T09:02:01Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1181 (T305300)', diff saved to https://phabricator.wikimedia.org/P24221 and previous config saved to /var/cache/conftool/dbconfig/20220407-090201-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T09:34:12Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1181 (T305300)', diff saved to https://phabricator.wikimedia.org/P24224 and previous config saved to /var/cache/conftool/dbconfig/20220407-093412-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T10:19:28Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1181 (T305300)', diff saved to https://phabricator.wikimedia.org/P24234 and previous config saved to /var/cache/conftool/dbconfig/20220407-101928-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T10:19:37Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1174 (T305300)', diff saved to https://phabricator.wikimedia.org/P24235 and previous config saved to /var/cache/conftool/dbconfig/20220407-101936-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T11:19:51Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1174 (T305300)', diff saved to https://phabricator.wikimedia.org/P24239 and previous config saved to /var/cache/conftool/dbconfig/20220407-111950-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T12:05:07Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1174 (T305300)', diff saved to https://phabricator.wikimedia.org/P24242 and previous config saved to /var/cache/conftool/dbconfig/20220407-120507-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T12:05:15Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1127 (T305300)', diff saved to https://phabricator.wikimedia.org/P24243 and previous config saved to /var/cache/conftool/dbconfig/20220407-120514-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T13:05:29Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1127 (T305300)', diff saved to https://phabricator.wikimedia.org/P24244 and previous config saved to /var/cache/conftool/dbconfig/20220407-130529-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T13:50:44Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1127 (T305300)', diff saved to https://phabricator.wikimedia.org/P24247 and previous config saved to /var/cache/conftool/dbconfig/20220407-135044-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T13:50:53Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1170:3317 (T305300)', diff saved to https://phabricator.wikimedia.org/P24248 and previous config saved to /var/cache/conftool/dbconfig/20220407-135052-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T14:21:17Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1170:3317 (T305300)', diff saved to https://phabricator.wikimedia.org/P24249 and previous config saved to /var/cache/conftool/dbconfig/20220407-142117-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T15:06:32Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1170:3317 (T305300)', diff saved to https://phabricator.wikimedia.org/P24255 and previous config saved to /var/cache/conftool/dbconfig/20220407-150632-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T15:06:40Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1101:3317 (T305300)', diff saved to https://phabricator.wikimedia.org/P24256 and previous config saved to /var/cache/conftool/dbconfig/20220407-150640-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T15:39:06Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1101:3317 (T305300)', diff saved to https://phabricator.wikimedia.org/P24257 and previous config saved to /var/cache/conftool/dbconfig/20220407-153905-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T16:24:23Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1101:3317 (T305300)', diff saved to https://phabricator.wikimedia.org/P24260 and previous config saved to /var/cache/conftool/dbconfig/20220407-162421-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T16:24:38Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1098:3317 (T305300)', diff saved to https://phabricator.wikimedia.org/P24261 and previous config saved to /var/cache/conftool/dbconfig/20220407-162430-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T16:25:37Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1098:3317 (T305300)', diff saved to https://phabricator.wikimedia.org/P24262 and previous config saved to /var/cache/conftool/dbconfig/20220407-162537-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T17:10:52Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1098:3317 (T305300)', diff saved to https://phabricator.wikimedia.org/P24265 and previous config saved to /var/cache/conftool/dbconfig/20220407-171052-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T17:11:06Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1158 (T305300)', diff saved to https://phabricator.wikimedia.org/P24266 and previous config saved to /var/cache/conftool/dbconfig/20220407-171105-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T17:12:12Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1158 (T305300)', diff saved to https://phabricator.wikimedia.org/P24267 and previous config saved to /var/cache/conftool/dbconfig/20220407-171211-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-07T17:57:30Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1158 (T305300)', diff saved to https://phabricator.wikimedia.org/P24270 and previous config saved to /var/cache/conftool/dbconfig/20220407-175730-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-08T07:47:24Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1174 (T305300)', diff saved to https://phabricator.wikimedia.org/P24280 and previous config saved to /var/cache/conftool/dbconfig/20220408-074723-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-08T07:48:30Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1174 (T305300)', diff saved to https://phabricator.wikimedia.org/P24281 and previous config saved to /var/cache/conftool/dbconfig/20220408-074829-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-08T08:33:46Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1174 (T305300)', diff saved to https://phabricator.wikimedia.org/P24284 and previous config saved to /var/cache/conftool/dbconfig/20220408-083345-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-08T08:33:53Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1127 (T305300)', diff saved to https://phabricator.wikimedia.org/P24285 and previous config saved to /var/cache/conftool/dbconfig/20220408-083353-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-08T09:09:44Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1127 (T305300)', diff saved to https://phabricator.wikimedia.org/P24287 and previous config saved to /var/cache/conftool/dbconfig/20220408-090943-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2022-04-08T09:54:59Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1127 (T305300)', diff saved to https://phabricator.wikimedia.org/P24293 and previous config saved to /var/cache/conftool/dbconfig/20220408-095458-ladsgroup.json

Barring master, this is done. I will try to see if I can get it done on Monday or we have to do a master switchover.

If the table isn't super used it should be fine to be run on the master. If not, it will just fail with a timeout

honestly, I'm 99% sure it will fail on master, there is a new record someone create a user in any wiki. It's written a lot.

Just give it a try with the usual options I use for masters

Old s7 master (db1136) done

Maintenance_bot moved this task from In progress to Done on the DBA board.

Change 804694 had a related patch set uploaded (by Zabe; author: Zabe):

[operations/puppet@production] maintain-views.yaml: Allow selecting lu_attachment_method

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

Change 804694 merged by Ladsgroup:

[operations/puppet@production] maintain-views.yaml: Allow selecting lu_attachment_method

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

FWIW I rebuilt all cloud views everywhere.

FWIW I rebuilt all cloud views everywhere.

Hmm, it does not show up for me.

MariaDB [centralauth_p]> desc localuser;
+-----------------------+-----------------------------------------------------------------+------+-----+---------+-------+
| Field                 | Type                                                            | Null | Key | Default | Extra |
+-----------------------+-----------------------------------------------------------------+------+-----+---------+-------+
| lu_wiki               | varbinary(255)                                                  | NO   |     |         |       |
| lu_name               | varbinary(255)                                                  | NO   |     |         |       |
| lu_attached_timestamp | binary(14)                                                      | YES  |     | NULL    |       |
| lu_attached_method    | enum('primary','empty','mail','password','admin','new','login') | YES  |     | NULL    |       |
| lu_local_id           | int(10) unsigned                                                | YES  |     | NULL    |       |
| lu_global_id          | int(10) unsigned                                                | YES  |     | NULL    |       |
+-----------------------+-----------------------------------------------------------------+------+-----+---------+-------+
6 rows in set (0.002 sec)

MariaDB [centralauth_p]>

The views are in fact broken:

root@clouddb1021.eqiad.wmnet[centralauth_p]> select * from localuser;
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

@Zabe On some hosts it does work:

root@clouddb1014.eqiad.wmnet[centralauth_p]> select lu_attached_method from localuser limit 1;
+--------------------+
| lu_attached_method |
+--------------------+
| primary            |
+--------------------+
1 row in set (0.001 sec)
root@clouddb1018.eqiad.wmnet[centralauth_p]> select lu_attached_method from localuser limit 1;
+--------------------+
| lu_attached_method |
+--------------------+
| primary            |
+--------------------+
1 row in set (0.002 sec)

The views are in fact broken:

root@clouddb1021.eqiad.wmnet[centralauth_p]> select * from localuser;
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

I have fixed this on clouddb1021:

root@clouddb1021.eqiad.wmnet[centralauth_p]> select lu_attached_method from localuser limit 1;
+--------------------+
| lu_attached_method |
+--------------------+
| primary            |
+--------------------+
1 row in set (0.002 sec)

Na, that's not the new column.

MariaDB [centralauth_p]> select lu_attachment_method from localuser limit 1;
ERROR 1054 (42S22): Unknown column 'lu_attachment_method' in 'field list'
MariaDB [centralauth_p]>

(Note that I am talking about lu_attachment_method and not lu_attached_method)

Mentioned in SAL (#wikimedia-operations) [2022-07-04T15:29:31Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1161 (T305300)', diff saved to https://phabricator.wikimedia.org/P30781 and previous config saved to /var/cache/conftool/dbconfig/20220704-152931-ladsgroup.json