Page MenuHomePhabricator

sre.mysql.sanitize-wiki: --check-only is confusing
Closed, ResolvedPublic

Description

When running:

[16:41:33] marostegui@cumin1003:~$ sudo cookbook sre.mysql.sanitize-wiki -t T415031 --wiki kajwiki --check-only

The ouput is very confusing, especially this part:

[cookbooks.sre.mysql.sanitize_wiki.check_priv] Check private data on sanitarium
Running '/usr/local/sbin/check_private_data.py -S /run/mysqld/mysqld.s5.sock' on db1154.eqiad.wmnet
----- OUTPUT of '/usr/local/sbin/...d/mysqld.s5.sock' -----
-- Non-public databases that are present:
-- Non-public tables that are present:
-- Unfiltered columns that are present:
================
100.0% (1/1) success ratio (>= 100.0% threshold) for command: '/usr/local/sbin/...d/mysqld.s5.sock'.
100.0% (1/1) success ratio (>= 100.0% threshold) of nodes successfully executed all commands.
==> Proceed with dropping private data?
Type "go" to proceed or "abort" to interrupt the execution
> go
User input is: "go"
[cookbooks.sre.mysql.sanitize_wiki.drop_privdata] Drop private data
Running '/usr/local/sbin/check_private_data.py -S /run/mysqld/mysqld.s5.sock | /usr/local/bin/mysql -S /run/mysqld/mysqld.s5.sock' on db1154.eqiad.wmnet
----- OUTPUT of '/usr/local/sbin/...d/mysqld.s5.sock' -----
================
100.0% (1/1) success ratio (>= 100.0% threshold) for command: '/usr/local/sbin/...d/mysqld.s5.sock'.
100.0% (1/1) success ratio (>= 100.0% threshold) of nodes successfully executed all commands.
[cookbooks.sre.mysql.sanitize_wiki.check] Check private data on clouddb
Running '/usr/local/sbin/check_private_data.py -S /run/mysqld/mysqld.s5.sock' on an-redacteddb1001.eqiad.wmnet,clouddb[1016,1020].eqiad.wmnet
===== NODE GROUP =====
(3) an-redacteddb1001.eqiad.wmnet,clouddb[1016,1020].eqiad.wmnet
----- OUTPUT of '/usr/local/sbin/...d/mysqld.s5.sock' -----
-- Non-public databases that are present:
-- Non-public tables that are present:
-- Unfiltered columns that are present:
================
100.0% (3/3) success ratio (>= 100.0% threshold) for command: '/usr/local/sbin/...d/mysqld.s5.sock'.
100.0% (3/3) success ratio (>= 100.0% threshold) of nodes successfully executed all commands.
Sanitization completed for all wikis
Released lock for key /spicerack/locks/cookbooks/sre.mysql.sanitize-wiki:s5: {'concurrency': 1, 'created': '2026-01-26 16:41:43.008720', 'owner': 'marostegui@cumin1003 [3761256]', 'ttl': 3600}

Is it really dropping data? it is not supposed to do it and of course it shouldn't mention that in the ouput.
According to the doc at: https://wikitech.wikimedia.org/wiki/MariaDB/PII#Sanitize_the_Wiki_Data

--check-only          Only perform checks without making changes (default: False)

Event Timeline

Marostegui moved this task from Triage to Ready on the DBA board.

Change #1239346 had a related patch set uploaded (by Marostegui; author: Marostegui):

[operations/cookbooks@master] sre.mysql.sanitize-wiki: Fix --check-only still dropping private data

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

Change #1239346 merged by Marostegui:

[operations/cookbooks@master] sre.mysql.sanitize-wiki: Fix --check-only still dropping private data

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

Merged - I will double check it works as expected once we get a new wiki creation request.