Closed Bug 1672877 Opened 4 years ago Closed 4 years ago

project repo reset playbook is slow and causes vcsreplicator queue lag

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheehan, Assigned: sheehan)

Details

Attachments

(1 file)

Since vcsreplicator uses hg pull to transfer data around, the hgmo-reset-twig.yml playbook can be very slow to run and cause problems for others working on the project branches on hgmo.

Currently when we reset a twig (project branch) on hgmo by running the
Ansible playbook hgmo-reset-twig.yml, the repo is reset by creating
a new empty repo on hgssh and locally pulling from mozilla-central.
This creates an hg-repo-init-2 message in vcsreplicator so the repo
is created on hgweb, after which we run hg replicatesync to trigger
a full sync of the repo. This full sync causes all hgweb nodes to pull
from hgssh to gather the new data.

This process is slow, and causes the vcsreplicator queue for the project
repos to lag far behind. This triggers many alerts in #vcs on Slack,
and can cause issues for others working on project branches.

This commit updates the playbook to instead create a fresh clone of the
repo using stream clones on both hgssh and hgweb, speeding up the process
and working around the vcsreplicator queue lag. As a result of this change,
we also run the repo-permissions script on hgweb and earlier in the reset
process on hgssh. I used this script to resolve bug 1672465 without
running into the aforementioned problems.

Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/ddcc57002b72
ansible: use stream clones in project repo reset playbook r=zeid

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: