Page MenuHomePhabricator

sre.mysql.clone: start replication on the target after the source
Closed, ResolvedPublic

Description

Right now when we clone a host the sequence (after copying the data) is:

  • start mariadb and replication on the source
  • wait until the source gets green
  • repool the source (which takes up to 1h)
  • start mariadb and replication on the target
  • wait for the target to get green
  • repool the target (if it applies).

This is not very optimal as we can start both at the same time, and then repool both at the same time (or if we want to, one at the time, but by the time the source has repooled, the target would have caught up with replication).

We want to rearrange it as:

  • start mariadb and replication on the source
  • start mariadb and replication on the target
  • wait until the source gets green
  • repool the source (which takes up to 1h)
  • wait for the target to get green
  • repool the target (if it applies).

Event Timeline

Marostegui triaged this task as Medium priority.Jan 26 2026, 4:30 PM
Marostegui moved this task from Triage to Ready on the DBA board.

Later on with T374026 we could also repool the two hosts at the same time.

Later on with T374026 we could also repool the two hosts at the same time.

Yeah - that can be a later iteration

Change #1233761 had a related patch set uploaded (by Federico Ceratto; author: Federico Ceratto):

[operations/cookbooks@master] clone: setup and start repl on target host early

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

Change #1233761 merged by Federico Ceratto:

[operations/cookbooks@master] clone: setup and start repl on target host early

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

After the merge this is resolved, pending testing. If there're issues, we can reopen

Thanks for fixing this quickly!