Page MenuHomePhabricator

Create a database for Striker test instance
Closed, ResolvedPublic

Description

Hi. The database for toolsadmin.wikimedia.org (aka Striker) is hosted on m5. We're planning to set up a second Striker installation for usage on the Toolforge testing deployment (toolsbeta), and need a second database for that. I assume m5 would be a logical place for that as well.

  • QPS: Occasional bursts of few queries as a small number of humans sometimes use the site.
  • Size: (An estimation is fine) I'd guess a double-digit number of megabytes.
  • DB Name: striker_toolsbeta
  • User: striker_toolsbeta / striker_toolsbeta_admin
  • Accessed from server (s): cloudweb1003/4 (via the proxies)
  • Backup Policy: Needed? Frequency? This is test data that's mostly non-canonical so strictly speaking it doesn't need to be backed up, but I believe you're taking some backups for the entire section which would include this database?
  • Grants needed: same as the current striker/striker_admin users but on the new database

Event Timeline

Change #1018408 had a related patch set uploaded (by Arnaudb; author: Arnaudb):

[operations/puppet@production] mariadb: create new account and database on m5 for striker_toolsbeta

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

ABran-WMF changed the task status from Open to In Progress.Wed, Apr 10, 9:24 AM
ABran-WMF claimed this task.
ABran-WMF triaged this task as Medium priority.
ABran-WMF subscribed.

Database has been created, account and admin account SQL passwords are in your mwmaint1002 homedir under /home/taavi/.super.secret.pw.txt and puppet has been updated here: https://gerrit.wikimedia.org/r/1018408

please let us know there is any issue!

Change #1018408 merged by Arnaudb:

[operations/puppet@production] mariadb: create new account and database on m5 for striker_toolsbeta

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

Thank you @ABran-WMF! Both of the credentials work fine.

Would it be possible to change the default character set and collation to utf8mb4 and utf8mb4_general_ci respectively? Those are what the main striker database uses and I'm seeing some issues that look like character set issues.

Never mind, the admin user had enough permissions so I could do ALTER DATABASE striker_toolsbeta CHARACTER SET utf8mb4; myself.

ABran-WMF reassigned this task from ABran-WMF to jcrespo.

Change #1019069 had a related patch set uploaded (by Jcrespo; author: Jcrespo):

[operations/puppet@production] dbbackups: Add striker_toolsbeta to the list of m5 backups

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

There is some issues on the already provided user grants. I don't think we should create databases with underscores or percentage signs on the name- but if we have to do it, let's use the proper escaping on grants to avoid things like this:

root@dbprov1002:~$ mysql -h db1217.eqiad.wmnet -P 3325 -u dump -p strikerAtoolsbeta
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 13675862
Server version: 10.6.14-MariaDB-log MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql:dump@db1217.eqiad.wmnet [strikerAtoolsbeta]> show tables;
Empty set (0.001 sec)

See my patch for an example. This has caused security issues in the past, that's why I would advocate against allowing those in the first place.

Change #1019069 merged by Jcrespo:

[operations/puppet@production] dbbackups: Add striker_toolsbeta to the list of m5 backups

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

jcrespo moved this task from Triage to Done on the Data-Persistence-Backup board.
jcrespo subscribed.

Please see my last comment. Other than that, my work is done.

Oops - sorry about that. If you prefer a version without underscores, from my side it's totally fine to rename the database or just drop it and re-create the tables with a new name. Up to you.

No need. I just wanted to warn the DBAs- althought you may find it interesting, as the last issue was with wikireplicas. No need to change anything at the moment (actual data and name), but the current grants providing access.

@taavi would you be OK to drop & recreate that db so we discard the underscore?

Sure, just let me know what the new name is so I can update the app config.

@taavi would you be OK to drop & recreate that db so we discard the underscore?

The grants need to be updated too

Change #1020709 had a related patch set uploaded (by Arnaudb; author: Arnaudb):

[operations/puppet@production] mariadb: removes underscore on striker database name

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

@taavi you can replace all occurrences of striker_toolsbeta by strikertoolsbeta (i.e. striker_toolsbeta_adminstrikertoolsbeta_admin). I've also updated credentials in the previous location
@jcrespo database has been properly renamed, good catch!

Change #1021407 had a related patch set uploaded (by Majavah; author: Majavah):

[operations/puppet@production] hieradata: Update striker_toolsbeta database name

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

Change #1021407 merged by Majavah:

[operations/puppet@production] hieradata: Update striker_toolsbeta database name

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

I'm closing this @taavi, feel free to ping me if you run in any trouble!