Page MenuHomePhabricator

Hide the value of gb_address column in public replicas if gb_autoblock_parent_id is not null
Closed, ResolvedPublic2 Estimated Story Points

Description

The gb_address should be hidden from public replicas if the value of the gb_autoblock_parent_id column is not null. This is to ensure that the IP that was autoblocked is not visible, in a similar way that the bt_address column is hidden if bt_auto is set to 1.

This probably involves updating https://gerrit.wikimedia.org/g/operations/puppet/+/de042c8e3894b03f9b28b42a391d4d1e0c30e0d2/modules/profile/templates/wmcs/db/wikireplicas/maintain-views.yaml to have a custom view.

Acceptance critera
  • Ensure that the gb_address column is hidden from public replicas when the gb_autoblock_parent_id column is not null

Event Timeline

Change #1073430 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[operations/puppet@production] [WikiReplicas] Hide autoblock targets in the globalblocks table

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

This requires a change to the wiki replicas view definition. I'm happy to apply the patch to the wiki replicas hosts after it's merged, but I would like to have explicit approval from Data-Persistence and Data-Engineering before merging that patch.

The process for this kind of change is a bit blurry. The table at https://wikitech.wikimedia.org/wiki/Portal:Data_Services/Admin/Wiki_Replicas#Who_admins_what suggests the Data-Engineering team is responsible but I'm not sure if that's up-to-date.

@Ladsgroup can you provide a +1 for Data-Persistence ?
@joanna_borun @BTullis can you help me finding someone who can +1 it for Data-Engineering ?

@Ladsgroup can you provide a +1 for Data-Persistence ?

BTW Amir is out until the 30th according to the calendar.

One issue is gb_address in replica will no longer have an index, which will significantly degrade labs users querying such column. In related block_target table, we introduced alternative views that has indexes on IP address column and does not included autoblocks. However, existing tools needs to switched to new views since we introduced a breaking change.

P.S. Personally I think alternative views are hacks, not a proper permanent solution (which should be proper tables, instead of views, for sanitized copies of databases). However such long-term solution is clearly out of scope of this task.

Change #1073430 merged by FNegri:

[operations/puppet@production] [WikiReplicas] Hide autoblock targets in the globalblocks table

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

Cookbook cookbooks.sre.wikireplicas.update-views run by fnegri: Started updating wiki replica views

Cookbook cookbooks.sre.wikireplicas.update-views started by fnegri executed with errors:

  • an-redacteddb1001.eqiad.wmnet (FAIL)
    • Ran Puppet agent
    • The maintain-views run failed, see OUTPUT of 'maintain-views ...' above for details

Cookbook cookbooks.sre.wikireplicas.update-views run by fnegri: Started updating wiki replica views

Cookbook cookbooks.sre.wikireplicas.update-views started by fnegri executed with errors:

  • an-redacteddb1001.eqiad.wmnet (FAIL)
    • Ran Puppet agent
    • The maintain-views run failed, see OUTPUT of 'maintain-views ...' above for details

Cookbook cookbooks.sre.wikireplicas.update-views run by fnegri: Started updating wiki replica views

Cookbook cookbooks.sre.wikireplicas.update-views started by fnegri executed with errors:

  • an-redacteddb1001.eqiad.wmnet (FAIL)
    • Ran Puppet agent
    • The maintain-views run failed, see OUTPUT of 'maintain-views ...' above for details

The cookbook is failing for a bunch of different reasons that should be investigated separately, I'm trying to find an incantation that works for this task.

The cookbook is failing for a bunch of different reasons that should be investigated separately, I'm trying to find an incantation that works for this task.

Thanks. Fingers crossed you can find a way to get this through.

Cookbook cookbooks.sre.wikireplicas.update-views run by fnegri: Started updating wiki replica views

Cookbook cookbooks.sre.wikireplicas.update-views started by fnegri completed:

  • an-redacteddb1001.eqiad.wmnet (PASS)
    • Ran Puppet agent
    • Ran 'maintain-views --replace-all --auto-depool --databases centralauth'
  • clouddb1017.eqiad.wmnet (PASS)
    • Ran Puppet agent
    • Ran 'maintain-views --replace-all --auto-depool --databases centralauth'
  • clouddb1018.eqiad.wmnet (PASS)
    • Ran Puppet agent
    • Ran 'maintain-views --replace-all --auto-depool --databases centralauth'
  • clouddb1019.eqiad.wmnet (PASS)
    • Ran Puppet agent
    • Ran 'maintain-views --replace-all --auto-depool --databases centralauth'
  • clouddb1020.eqiad.wmnet (PASS)
    • Ran Puppet agent
    • Ran 'maintain-views --replace-all --auto-depool --databases centralauth'
  • clouddb1013.eqiad.wmnet (PASS)
    • Ran Puppet agent
    • Ran 'maintain-views --replace-all --auto-depool --databases centralauth'
  • clouddb1014.eqiad.wmnet (PASS)
    • Ran Puppet agent
    • Ran 'maintain-views --replace-all --auto-depool --databases centralauth'
  • clouddb1015.eqiad.wmnet (PASS)
    • Ran Puppet agent
    • Ran 'maintain-views --replace-all --auto-depool --databases centralauth'
  • clouddb1016.eqiad.wmnet (PASS)
    • Ran Puppet agent
    • Ran 'maintain-views --replace-all --auto-depool --databases centralauth'

Cookbook cookbooks.sre.wikireplicas.update-views run by fnegri: Started updating wiki replica views

Cookbook cookbooks.sre.wikireplicas.update-views started by fnegri executed with errors:

Cookbook cookbooks.sre.wikireplicas.update-views run by fnegri: Started updating wiki replica views

Cookbook cookbooks.sre.wikireplicas.update-views started by fnegri executed with errors:

  • an-redacteddb1001.eqiad.wmnet (FAIL)
    • Ran Puppet agent
    • The maintain-views run failed, see OUTPUT of 'maintain-views ...' above for details

Cookbook cookbooks.sre.wikireplicas.update-views run by fnegri: Started updating wiki replica views

Cookbook cookbooks.sre.wikireplicas.update-views started by fnegri executed with errors:

  • an-redacteddb1001.eqiad.wmnet (FAIL)
    • Ran Puppet agent
    • The maintain-views run failed, see OUTPUT of 'maintain-views ...' above for details
fnegri claimed this task.
fnegri triaged this task as High priority.

This task is Resolved, as the view change has been applied to all wiki replicas hosts (an-redacteddb1001 and clouddb10[13-20]*).

The table globalblocks only exists in two databases: centralauth (s7) and labswiki (s6). I was not able to update the view in labswiki because of a bug in the maintain-views script: T375780: maintain-views fails on labswiki

However, I checked and the globalblocks table in the labswiki db is empty, so the view cannot expose any private info. The private info we want to hide is stored in the centralauth database.

However, I checked and the globalblocks table in the labswiki db is empty

Related: T375783: Please drop globalblocks table from labswiki