Merge lp:~mwhudson/launchpad/puller-proxy-argh into lp:launchpad/db-devel

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~mwhudson/launchpad/puller-proxy-argh
Merge into: lp:launchpad/db-devel
Diff against target: 20 lines
1 file modified
scripts/mirror-branch.py (+3/-0)
To merge this branch: bzr merge lp:~mwhudson/launchpad/puller-proxy-argh
Reviewer Review Type Date Requested Status
Brad Crittenden (community) release-critical Approve
Tim Penhey (community) Approve
Review via email: mp+12327@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Hi,

Literally a few minutes before rollout I realized that we had a problem with the puller: pulling MIRRORED branches must have $http_proxy set, but pulling IMPORTED branches must not. This was previously handled by setting or not the environment variable in the crontab but now we only have one crontab entry for pulling all branches so this won't work. The option I went for is a hack in the mirror-branch.py script. It's been working on production so far, so let's make sure a re-rollout doesn't obliterate it :)

Cheers,
mwh

Revision history for this message
Tim Penhey (thumper) wrote :

On Thu, 24 Sep 2009 17:05:23 Michael Hudson wrote:
> Michael Hudson has proposed merging
> lp:~mwhudson/launchpad/puller-proxy-argh into lp:launchpad.
>
> Requested reviews:
> Canonical Launchpad Engineering (launchpad)
>
>
> Hi,
>
> Literally a few minutes before rollout I realized that we had a problem
> with the puller: pulling MIRRORED branches must have $http_proxy set, but
> pulling IMPORTED branches must not. This was previously handled by
> setting or not the environment variable in the crontab but now we only
> have one crontab entry for pulling all branches so this won't work. The
> option I went for is a hack in the mirror-branch.py script. It's been
> working on production so far, so let's make sure a re-rollout doesn't
> obliterate it :)
>
>
> Cheers,
> mwh
>

Looks reasonable :-)

  merge approved

review: Approve
Revision history for this message
Brad Crittenden (bac) :
review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/mirror-branch.py'
2--- scripts/mirror-branch.py 2009-07-23 02:33:14 +0000
3+++ scripts/mirror-branch.py 2009-09-24 05:05:22 +0000
4@@ -32,6 +32,7 @@
5
6 import _pythonpath
7 from optparse import OptionParser
8+import os
9 import resource
10 import sys
11
12@@ -81,6 +82,8 @@
13 branch_type_name, oops_prefix, default_stacked_on_url) = arguments
14
15 branch_type = BranchType.items[branch_type_name]
16+ if branch_type == BranchType.IMPORTED and 'http_proxy' in os.environ:
17+ del os.environ['http_proxy']
18 section_name = 'supermirror_%s_puller' % branch_type_map[branch_type]
19 globalErrorUtility.configure(section_name)
20 shut_up_deprecation_warning()

Subscribers

People subscribed via source and target branches

to status/vote changes: