adt-buildvm-ubuntu-cloud crashed with urllib.error.HTTPError in http_error_default(): HTTP Error 404: Not Found

Bug #1586322 reported by Colin Ian King
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Supplying an arch that is not supported results in python trace. This is ugly and should be trapped and provide a more user friendly error message.

$ adt-buildvm-ubuntu-cloud -a aarch64 -r yakkety
WARNING: python-distro-info not installed, falling back to determining default release from currently installed release
Downloading https://cloud-images.ubuntu.com/yakkety/current/yakkety-server-cloudimg-aarch64.img...
Traceback (most recent call last):
  File "/usr/bin/adt-buildvm-ubuntu-cloud", line 349, in <module>
    image = download_image(args.cloud_image_url, args.release, args.arch)
  File "/usr/bin/adt-buildvm-ubuntu-cloud", line 185, in download_image
    headers = urllib.request.urlretrieve(image_url, local_image, report)[1]
  File "/usr/lib/python3.5/urllib/request.py", line 187, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/usr/lib/python3.5/urllib/request.py", line 162, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 471, in open
    response = meth(req, response)
  File "/usr/lib/python3.5/urllib/request.py", line 581, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.5/urllib/request.py", line 509, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 443, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 589, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

ProblemType: Crash
DistroRelease: Ubuntu 16.10
Package: autopkgtest 3.20.7
ProcVersionSignature: Ubuntu 4.4.0-23.41-generic 4.4.10
Uname: Linux 4.4.0-23-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20.1-0ubuntu4
Architecture: amd64
CrashCounter: 1
CurrentDesktop: Unity
Date: Fri May 27 10:26:55 2016
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/adt-buildvm-ubuntu-cloud
InstallationDate: Installed on 2016-04-29 (27 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
InterpreterPath: /usr/bin/python3.5
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/adt-buildvm-ubuntu-cloud -a aarch64 -r yakkety
PythonArgs: ['/usr/bin/adt-buildvm-ubuntu-cloud', '-a', 'aarch64', '-r', 'yakkety']
SourcePackage: autopkgtest
Title: adt-buildvm-ubuntu-cloud crashed with urllib.error.HTTPError in http_error_default(): HTTP Error 404: Not Found
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip kvm libvirt libvirtd lpadmin plugdev sambashare sudo

Revision history for this message
Colin Ian King (colin-king) wrote :
tags: removed: need-duplicate-check
Changed in autopkgtest (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in autopkgtest (Ubuntu):
status: New → Confirmed
Martin Pitt (pitti)
information type: Private → Public
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in autopkgtest (Ubuntu):
importance: Medium → Low
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 3.20.9

---------------
autopkgtest (3.20.9) unstable; urgency=medium

  * Fix "apt-get source" version detection for very old source packages that
    don't have "Package-List:" yet. (LP: #1588199)
  * Skip NullRunner.test_apt_source_nonexisting test instead of failing if
    there are no deb-src apt sources configured on the host.

 -- Martin Pitt <email address hidden> Thu, 02 Jun 2016 22:22:45 +0200

Changed in autopkgtest (Ubuntu):
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.