apport can hang when checking for ec2 metadata
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apport (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
data/general-
ec2_instance = False
for pkg in ('ec2-init', 'cloud-init'):
try:
if apport.
...
if ec2_instance:
ami_id_url = urljoin(
try:
ami = urlopen(
except:
ami = None
If cloud-init is installed, then it will try to do a get of http://
The problem can be remedied with:
route add -host 169.254.169.254 reject
Then, after reporting the bug simply do:
route del -host 169.254.169.254 reject
We should probably put a timeout on the urlopen call so that it doesn't hang indefinitely (or whatever the OS level socket timeout is, which is really large).
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: apport 1.23-0ubuntu1
ProcVersionSign
Uname: Linux 3.0.0-11-server x86_64
ApportLog:
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
CrashReports:
600:0:
775:1000:
600:1000:
600:0:
600:0:
Date: Wed Sep 21 11:27:37 2011
PackageArchitec
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Martin Pitt: Approve
-
Diff: 41 lines (+9/-3)2 files modifieddata/general-hooks/ubuntu.py (+3/-2)
debian/changelog (+6/-1)
This bug was fixed in the package apport - 2.0-0ubuntu3
---------------
apport (2.0-0ubuntu3) precise; urgency=low
[ Martin Pitt ] hooks/ubuntu. py: Do not capture stderr of lsb_release.
* data/general-
(LP: #955111)
[ Scott Moser ] hooks/ubuntu. py: timeout on attempts to contact ec2 metadata
* data/general-
service (LP: #855651)
-- Martin Pitt <email address hidden> Tue, 03 Apr 2012 06:58:07 +0200