dl-ubuntu-test-iso doesn't work behind a non-transparent proxy

Bug #512691 reported by NeilGreenwood
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tools used by the Ubuntu QA Team
Fix Released
Medium
Unassigned
ubuntu-qa-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When trying to use dl-ubuntu-test-iso behind a proxy server, I get the following error:

$ ./dl-ubuntu-test-iso --flavor ubuntu --release lucid --arch i386 --arch amd64
Syncing lucid ubuntu desktop i386
Traceback (most recent call last):
  File "./dl-ubuntu-test-iso", line 544, in <module>
    main()
  File "./dl-ubuntu-test-iso", line 541, in main
    iso_download(wanted, config)
  File "./dl-ubuntu-test-iso", line 394, in iso_download
    available, msg = get_status(uri, config.host)
  File "./dl-ubuntu-test-iso", line 196, in get_status
    conn.request("HEAD", uri)
  File "/usr/lib/python2.6/httplib.py", line 898, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.6/httplib.py", line 935, in _send_request
    self.endheaders()
  File "/usr/lib/python2.6/httplib.py", line 892, in endheaders
    self._send_output()
  File "/usr/lib/python2.6/httplib.py", line 764, in _send_output
    self.send(msg)
  File "/usr/lib/python2.6/httplib.py", line 723, in send
    self.connect()
  File "/usr/lib/python2.6/httplib.py", line 704, in connect
    self.timeout)
  File "/usr/lib/python2.6/socket.py", line 514, in create_connection
    raise error, msg
socket.error: [Errno 110] Connection timed out

I think there should be an option to enter details of the proxy server, or it should pick it up automatically from the http_proxy environment variable.

I'm running karmic, and revision 286 of the script.

Steve Beattie (sbeattie)
Changed in ubuntu-qa-tools:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
NeilGreenwood (neil-greenwood) wrote :

I did a bit of research, and it looks like a 'simple' fix would be to use urllib instead of httplib. However, I'm only just learning Python, so I don't know enough at the moment to do it myself.

Revision history for this message
Steve Beattie (sbeattie) wrote :

Right, the reason httplib is used in some places is because urllib2 doesn't appear to provide an obvious interface to do an HTTP HEAD request in order to get whether or not a file exists on the server without pulling down the whole thing. That said, I've come up with a way that I think is working, but it would be nice to get verification from someone actually using a proxy. Can someone please test the version in https://code.launchpad.net/~ubuntu-bugcontrol/ubuntu-qa-tools/master , revision 334 or newer? Thanks!

Revision history for this message
Steve Beattie (sbeattie) wrote :

Oh yes, one other thing to add; I haven't futzed around with getting rsync proxying to work, so if you need to use a proxy, then you should make sure you're using zsync to download.

Thanks!

Changed in ubuntu-qa-tools:
status: Confirmed → Fix Committed
Revision history for this message
NeilGreenwood (neil-greenwood) wrote : Re: [Bug 512691] Re: dl-ubuntu-test-iso doesn't work behind a non-transparent proxy

On 12 April 2010 08:42, Steve Beattie <email address hidden> wrote:
> Right, the reason httplib is used in some places is because urllib2
> doesn't appear to provide an obvious interface to do an HTTP HEAD
> request in order to get whether or not a file exists on the server
> without pulling down the whole thing. That said, I've come up with a way
> that I think is working, but it would be nice to get verification from
> someone actually using a proxy. Can someone please test the version in
> https://code.launchpad.net/~ubuntu-bugcontrol/ubuntu-qa-tools/master ,
> revision 334 or newer? Thanks!
>
> --
> dl-ubuntu-test-iso doesn't work behind a non-transparent proxy
> https://bugs.launchpad.net/bugs/512691
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Testing revision 340, I got the following:

$ ./dl-ubuntu-test-iso
Traceback (most recent call last):
  File "./dl-ubuntu-test-iso", line 615, in <module>
    main()
  File "./dl-ubuntu-test-iso", line 604, in main
    update_release()
  File "./dl-ubuntu-test-iso", line 78, in update_release
    lp_release = get_devel_release()
  File "./dl-ubuntu-test-iso", line 66, in get_devel_release
    launchpad = Launchpad.login_anonymously("Ubuntu QA iso downloader", "edge")
AttributeError: type object 'Launchpad' has no attribute 'login_anonymously'

Revision history for this message
NeilGreenwood (neil-greenwood) wrote :

On 13 April 2010 09:18, Neil Greenwood <email address hidden> wrote:
> On 12 April 2010 08:42, Steve Beattie <email address hidden> wrote:
>> Right, the reason httplib is used in some places is because urllib2
>> doesn't appear to provide an obvious interface to do an HTTP HEAD
>> request in order to get whether or not a file exists on the server
>> without pulling down the whole thing. That said, I've come up with a way
>> that I think is working, but it would be nice to get verification from
>> someone actually using a proxy. Can someone please test the version in
>> https://code.launchpad.net/~ubuntu-bugcontrol/ubuntu-qa-tools/master ,
>> revision 334 or newer? Thanks!
>>
>> --
>> dl-ubuntu-test-iso doesn't work behind a non-transparent proxy
>> https://bugs.launchpad.net/bugs/512691
>> You received this bug notification because you are a direct subscriber
>> of the bug.
>>
>
> Testing revision 340, I got the following:
>
> $ ./dl-ubuntu-test-iso
> Traceback (most recent call last):
>  File "./dl-ubuntu-test-iso", line 615, in <module>
>    main()
>  File "./dl-ubuntu-test-iso", line 604, in main
>    update_release()
>  File "./dl-ubuntu-test-iso", line 78, in update_release
>    lp_release = get_devel_release()
>  File "./dl-ubuntu-test-iso", line 66, in get_devel_release
>    launchpad = Launchpad.login_anonymously("Ubuntu QA iso downloader", "edge")
> AttributeError: type object 'Launchpad' has no attribute 'login_anonymously'
>

Sorry, I should have said. I'm running this on an up-to-date karmic install.

Neil.

Ara Pulido (ara)
Changed in ubuntu-qa-tools (Ubuntu):
status: New → In Progress
Revision history for this message
Steve Beattie (sbeattie) wrote : Re: [Bug 512691] Re: dl-ubuntu-test-iso doesn't work behind a non-transparent proxy

Hi Neil

On Tue, Apr 13, 2010 at 08:19:19AM -0000, NeilGreenwood wrote:
> On 13 April 2010 09:18, Neil Greenwood <email address hidden> wrote:
> > Testing revision 340, I got the following:
> >
> > $ ./dl-ubuntu-test-iso
> > Traceback (most recent call last):
> >  File "./dl-ubuntu-test-iso", line 615, in <module>
> >    main()
> >  File "./dl-ubuntu-test-iso", line 604, in main
> >    update_release()
> >  File "./dl-ubuntu-test-iso", line 78, in update_release
> >    lp_release = get_devel_release()
> >  File "./dl-ubuntu-test-iso", line 66, in get_devel_release
> >    launchpad = Launchpad.login_anonymously("Ubuntu QA iso downloader", "edge")
> > AttributeError: type object 'Launchpad' has no attribute 'login_anonymously'
> >
>
> Sorry, I should have said. I'm running this on an up-to-date karmic
> install.

Yes, sorry, the launchpad anonymous login bit got added to fix bug
541729
. Can you try again with the '--no-release-check' argument added?
That will tell it to skip the launchpad check.

--
Steve Beattie
<email address hidden>
http://NxNW.org/~steve/

Revision history for this message
Steve Beattie (sbeattie) wrote :

Neil, as of rev 343, dl-ubuntu-test-iso should fallback to using non-anonymous methods to query launchpad if the anonymous methods aren't supported by the installed version of launchpadlib (as is the case on karmic). Please update and try again, as I'd really like to ensure that http proxies are working correctly.

Thanks for testing!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-qa-tools - 0.1.4.4

---------------
ubuntu-qa-tools (0.1.4.4) lucid; urgency=low

  * Make dl-ubuntu-test-iso work from behind a transparent proxy.
    (LP: #512691)
  * dl-ubuntu-test-iso now supports authentication. (LP: #541725)
  * Ubuntu releases are no longer hardcoded in dl-ubuntu-test-iso.
    (LP: #541729)
 -- James Westby <email address hidden> Wed, 14 Apr 2010 11:27:00 +0100

Changed in ubuntu-qa-tools (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
NeilGreenwood (neil-greenwood) wrote :

Thanks Steve! Revision 350 tested on karmic and it works brilliantly.

Revision history for this message
Steve Beattie (sbeattie) wrote :

That's great, thanks for testing it, Neil.

Changed in ubuntu-qa-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.