On 8 January 2014 19:36, Anders Ingemann <[email protected]> wrote:

> On 8 January 2014 19:21, Tomasz Rybak <[email protected]> wrote:
>
>> Hello.
>> I've tried to build new EC2 image using
>> ec2-ebs-debian-official-amd64-pvm.manifest.json.
>> I've put my AWS credentials into manifest and run build-debian-cloud
>> from WIP-python branch.
>>
>> It failed with:
>>
>> Adding backports to the apt sources
>> Retrieving instance metadata
>> <urlopen error [Errno 113] No route to host>
>> Traceback (most recent call last):
>>   File "/tmp/build-debian-cloud/base/main.py", line 38, in run
>>     tasklist.run(info=bootstrap_info, dry_run=args.dry_run)
>>   File "/tmp/build-debian-cloud/base/tasklist.py", line 29, in run
>>     task.run(info)
>>   File "/tmp/build-debian-cloud/providers/ec2/tasks/host.py", line 26,
>> in run
>>     response = urllib2.urlopen(url=metadata_url, timeout=5)
>>   File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
>>     return _opener.open(url, data, timeout)
>>   File "/usr/lib/python2.7/urllib2.py", line 404, in open
>>     response = self._open(req, data)
>>   File "/usr/lib/python2.7/urllib2.py", line 422, in _open
>>     '_open', req)
>>   File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
>>     result = func(*args)
>>   File "/usr/lib/python2.7/urllib2.py", line 1214, in http_open
>>     return self.do_open(httplib.HTTPConnection, req)
>>   File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
>>     raise URLError(err)
>> URLError: <urlopen error [Errno 113] No route to host>
>> Rolling back
>>
>> There is strange URL in providers/ec2/tasks/host.py:
>> metadata_url =
>> 'http://169.254.169.254/latest/dynamic/instance-identity/document'
>>
>> 169.254.* is (Windows ?) IP used when there is no DHCP-given IP.
>> From analysis of the code it looks like GetInfo is used by Connect
>> to get information about instance and its region (to connect to AWS
>> to register AMI) - but I'm not sure which instance.
>> The one build-debian-cloud runs on, or the one which is being created?
>>
>> What should I do with this URL?
>>
>> Best regards.
>>
>> --
>> Tomasz Rybak  GPG/PGP key ID: 2AD5 9860
>> Fingerprint A481 824E 7DD3 9C0E C40A  488E C654 FB33 2AD5 9860
>> http://member.acm.org/~tomaszrybak
>>
>>
> Hello Tomasz
>
> > 169.254.* is (Windows ?) IP used when there is no DHCP-given IP.
> It's actually a link-local IPv4 address and is intercepted by the 
> Dom0<http://wiki.xen.org/wiki/Dom0> in
> Xen. It responds with various metadata about the virtual 
> machine<http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html>
> .
>  > From analysis of the code it looks like GetInfo is used by Connect to
> get information about instance and its region (to connect to AWS to
> register AMI) -
> > but I'm not sure which instance. The one build-debian-cloud runs on, or
> the one which is being created?
> There is only the one which you are running. The one you are building is
> just files & folders, it has no metainformation before you actually boot it.
> The metadata is needed to figure out in which availability zone an EBS
> volume (that you'll bootstrap onto) should be created. Volume zone and
> instance zone must match.
> Right now it is also needed for S3 bootstrapping because the PVGrub AKI ID
> is determined from the region (note to self: make that configurable :-) ).
>
> Does that clear things up?
>
> - Anders
>

Argh, forgot to hit Reply-All.
I just noticed that I didn't really help with your problem, haha.
*The solution is to bootstrap on an EC2-Instance.* Right now, you can't
bootstrap AMIs anywhere else.

Reply via email to