Page MenuHomePhabricator

Need snapshot of 'reviewdb' on spare machine to test gerrit schema upgrades
Closed, ResolvedPublic

Description

In service of T70271: Upgrade gerrit to 2.12, we need to test the upgrade path on actual production data. 'reviewdb' lives on m2. Per IRC, let's take a snapshot from the slave, copy it over to $SPARE_MACHINE and point the installation on lead point at that.

Event Timeline

demon raised the priority of this task from Medium to Unbreak Now!.Jul 8 2016, 3:27 PM

Because of {T139669}

jcrespo moved this task from Triage to In progress on the DBA board.

Actually, reviewdb lives on m2, I believe since 2012:

alex@alex-laptop:~$ ssh gerrit gerrit gsql
Welcome to Gerrit Code Review 2.8.1-4-ga1048ce
(MySQL 5.5.5-10.0.15-MariaDB-log)

Type '\h' for help.  Type '\r' to clear the buffer.

gerrit> select @@hostname;
 @@hostname
 ----------
 db1020
(1 row; 0 ms)

That's the m2 master server.

Yes, I didn't even read the description, I am copying from m2-master. I had already dropped old version that used to be on m1.

root@db1042:~$ my reviewdb -e "SHOW TABLES"
+-----------------------------+
| Tables_in_reviewdb          |
+-----------------------------+
| account_diff_preferences    |
| account_external_ids        |
| account_group_by_id         |
| account_group_by_id_aud     |
| account_group_id            |
| account_group_members       |
| account_group_members_audit |
| account_group_names         |
| account_groups              |
| account_id                  |
| account_patch_reviews       |
| account_project_watches     |
| account_ssh_keys            |
| accounts                    |
| change_id                   |
| change_message_id           |
| change_messages             |
| changes                     |
| patch_comments              |
| patch_set_ancestors         |
| patch_set_approvals         |
| patch_sets                  |
| schema_version              |
| starred_changes             |
| submodule_subscriptions     |
| system_config               |
| tracking_ids                |
+-----------------------------+

This is a static copy from production at 160708 16:04:31 with the same privileges. Please make sure *you do not test on m2-master*.

If it has any issues, it can be returned to its original state easily.