Closed Bug 968636 Opened 6 years ago Closed 5 years ago

set up a bzr server on a bugzilla community server


(Bugzilla ::, defect)

Not set





(Reporter: glob, Assigned: justdave)


(Blocks 1 open bug)


mozilla IT are very keen on decommissioning the bugzilla server (bug 967642).
we're moving to (bug 929685).

i would like to propose the hosting of gets moved onto a bugzilla community server, for both the bzr server and loggerhead.  as the bugzilla project are the only users of bzr at mozilla, i would also like for the existing domain to point to the community hosted server.

this provides the following benefits:

- removes the responsibility of the server from mozilla IT's plate
- guarantees the commit history of the will still be available after the git migration (some repos may prove problematic, especially extensions)
- ensures existing bugzilla sites can continue to upgrade using the establishes processes

ldap auth will need to be replaced with local accounts, but as the server should be in read-only mode we only need accounts for the git->bzr mirroring script, and another account for admin reasons.
This doesn't block the git migration; we can move bzr to a community server later.
No longer blocks: 929685
Blocks: 983209
No longer blocks: 983209
as per the bugzilla meeting, assigning to justdave.

we probably don't need loggerhead, which may simplify the deployment.
Assignee: website → justdave now exists.

Going to need the git-to-bzr mirror set up on this box before we can cut it over.
The script is here:

You can get fubar to send over the current crontab on
*/5 * * * * root /usr/bin/perl /root/bugzilla-git-migration/ --from-repo= --from-branch=4.0 --to-repo=/var/www/html/ --to-branch=4.0
*/5 * * * * root /usr/bin/perl /root/bugzilla-git-migration/ --from-repo= --from-branch=4.2 --to-repo=/var/www/html/ --to-branch=4.2
*/5 * * * * root /usr/bin/perl /root/bugzilla-git-migration/ --from-repo= --from-branch=4.4 --to-repo=/var/www/html/ --to-branch=4.4
*/5 * * * * root /usr/bin/perl /root/bugzilla-git-migration/ --from-repo= --from-branch=4.0 --to-repo=/var/www/html/ --to-branch=4.0
*/5 * * * * root /usr/bin/perl /root/bugzilla-git-migration/ --from-repo= --from-branch=4.2 --to-repo=/var/www/html/ --to-branch=4.2
*/5 * * * * root /usr/bin/perl /root/bugzilla-git-migration/ --from-repo= --from-branch=4.4 --to-repo=/var/www/html/ --to-branch=4.4
*/5 * * * * root /usr/bin/perl /root/bugzilla-git-migration/ --from-repo= --from-branch=master --to-repo=/var/www/html/ --to-branch=trunk
*/5 * * * * root /usr/bin/perl /root/bugzilla-git-migration/ --from-repo= --from-branch=master --to-repo=/var/www/html/ --to-branch=trunk
Note that I think you can drop trunk.  I really don't see the point in mirroring it anymore, since we have testing set up on Travis CI from GitHub, and we aren't mirroring any new releases over.
OK, the mirroring script and cron jobs are in place, but I'm not sure how to verify if it's working or not...
You could add trunk temporarily and verify that new commits show up.
Mirroring was set up for trunk and appeared to be working for a while (after git was upgraded to support a log option used by the mirroring script), but appears to have recently diverged from and master.  bzr.b.o has 9352 revisions, whereas bzr.m.o has 9363 revisions: revisions 9351-9353, 9355-9361, and 9363 appear to be missing from bzr.b.o.  These commits are confirmed on, so it appears to be a failure of the mirroring script on bzr.b.o.  justdave, did you see any errors?
Flags: needinfo?(justdave)
bzr: ERROR: Unrecognized bug mozilla:123278. Commit refused.
bzr: ERROR: Unrecognized bug mozilla:1093868. Commit refused.
bzr: ERROR: Unrecognized bug mozilla:1061226. Commit refused.
bzr: ERROR: Unrecognized bug mozilla:1143005. Commit refused.

Flags: needinfo?(justdave)
Those bugs do match up with missing commits on bzr.b.o.  Those bugs exist and are public.  Maybe there are network failures and bzr is giving an unhelpful error message?  What version of bzr is on there, and what version is on bzr.m.o?

In any case, the script shouldn't continue to mirror new revisions when one has failed.  I'll fix that in a separate bug.
Flags: needinfo?(justdave)
Would it make sense to just remove the commit check from the bzr commit hook? Since that would need to be getting done on the git side and nobody can directly commit to bzr anymore anyway?
Flags: needinfo?(justdave)
(In reply to Dave Miller [:justdave] ( from comment #12)
> Would it make sense to just remove the commit check from the bzr commit
> hook? Since that would need to be getting done on the git side and nobody
> can directly commit to bzr anymore anyway?

Next question is how do I do that? :)
Wait, this is due to the bug tracker not being defined at all in the bzr configuration on bzr.b.o.  The error is not particularly clear, but I found where it's being raised in the bzr code, and it's in response to a UnknownBugTrackerAbbreviation exception.  Glad they obfuscated that when the error is actually printed... anyway, we need the config file set up as it is on bzr.m.o (also see
what config does that go in?  The only bazaar.conf on bzr2.scl3 appears to be specific to loggerheadd, I can't find a locations.conf, and every repo has a branch.conf in it already which was included in the original data rsync.
I have no idea, having not set it up or ever used the server directly.  See link in comment 15 if you just want to set it up anew on bzr.b.o.
err, is it /root/.bazaar.conf:
email = Sync <>
bugzilla_mozilla_url =
That would be it.
Oh, sorry, I didn't know there was a bug about this or I would have commented sooner. I actually added /root/.bazaar/bazaar.conf file on bzr.b.o server with the lines from comment 18 (except email one) about three days ago when I grew tired of deleting the webmaster spam. :) So the new server should now support "--fixes mozilla:xx" switch used in the mirror script.

BTW, this configuration information was in page. Only in history now that it got switched to talk about git but luckily wiki has history diffing so I could dig it up from there. :)
justdave is now rsyncing the bzr repo back over from bzr.m.o, since we lost some earlier commits.  We should be good to go then, although at some point I want to fix the mirroring script so that it properly aborts if a commit fails.
I'm not sure there's anything left to do here unless Mark is using this as his reminder to fix that script so it aborts correctly when a commit fails.
There are blockers still open; I wouldn't say this is fully complete until we get a proper cert and redirect in place.
... although, for the purposes of decommissioning bzr.m.o, I think we can call this fixed.  I announced the switchover last week anyway.  I'm unblocking and resolving this; we can track the cert and the dependent redirect separately.
Closed: 5 years ago
No longer depends on: 1155525
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.