← Back to team overview

cloud-init team mailing list archive

Re: Hi, I am a user of cloud-init, I got problem with datasourceEC2

 

Hi Jiang,
  For questions like this you can use the cloud-init mailing list.
(cloud-init@xxxxxxxxxxxxxxxxxxx), and can join at
https://launchpad.net/~cloud-init .

   See my inline responses below.

On Mon, 25 Mar 2013, Jiang Jim wrote:

> Hi, I am a user of cloud-init, I got problem with datasourceEC2.
>
> I install a cloud init in my ubuntu12.04 image, but i can't get datasource
> from my openstack metadata, I find my /var/log/cloud-init.log with a
> problem:
> Did not find data source. searched classes: ['DataSourceNoCloudNet',
> 'DataSourceConfigDriveNet', 'DataSourceOVFNet', 'DataSourceMAAS']

The EC2 datasource is not really well-behaved.  The other datasources that
are turned on by default will generally quickly have a definitive answer
as to if have have data to use, and exit if not.

The EC2 datasource (because of issues in the EC2 platform, many of which
are historical at this point), does not exit quickly.  It sits and polls
for I think about 90 seconds.

Because of that, its not enabled by default.  However, when you install
cloud-init in ubuntu, it does a very quick check for the EC2 metadata
service (up to a 5 second timeout).  If it finds a hit, it will configure
the datasource on.

So, I suspect that your problem is that the instance doesn't actually have
access to a functional Ec2 datasource.  You can check this by doing
something like:
  ec2metadata --instance-id
or
  curl http://169.254.169.254/2009-04-04/meta-data/instance-id

> There is no DataSourceEC2.
>
> I set datasource_list: ["NoCloud", "ConfigDrive", "OVF", "MAAS", "Ec2"].
>
> But I can't get anything better.
>
> The version of cloud-init is 0.6.3-0ubuntu1.5

/var/log/cloud-init.log will have debug information. Take a look there and
see if you find any WARN messages.

console output (nova console-log) is also likely useful.

>