[chef] Re: Re: knife-ec2 instance creation and management.


Chronological Thread 
  • From: Kevin Karwaski < >
  • To:
  • Subject: [chef] Re: Re: knife-ec2 instance creation and management.
  • Date: Wed, 19 Jun 2013 18:02:02 -0400

Ohai should be capturing this info from the on-instance EC2 metadata
store; from the output of your curl command above it looks like that
info is not present on your instance. You ran that curl command from
the EC2 instance, right?

Here's what ohai is grabbing:
https://github.com/opscode/ohai/blob/master/lib/ohai/mixin/ec2_metadata.rb


This is what I see when I hit the metadata store on an EC2 instance:

# curl http://169.254.169.254/latest/meta-data/
ami-id
ami-launch-index
ami-manifest-path
ancestor-ami-ids
block-device-mapping/
hostname
instance-action
instance-id
instance-type
kernel-id
local-hostname
local-ipv4
mac
metrics/
network/
placement/
profile
public-hostname
public-ipv4
public-keys/
reservation-id

# curl http://169.254.169.254/latest/meta-data/public-hostname
BLAH-BLAH-BLAH.compute-1.amazonaws.com

Do you see anything cataloged in the EC2 metadata store?


On Wed, Jun 19, 2013 at 5:52 PM, James Andrews 
< >
 wrote:
> I get the following after running that curl command.
>
> curl http://169.254.169.254/latest/meta-data/public-hostname
> <?xml version="1.0" encoding="iso-8859-1"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en";>
>  <head>
>   <title>404 - Not Found</title>
>  </head>
>  <body>
>   <h1>404 - Not Found</h1>
>  </body>
> </html>
>
> I ran "knife ec2 server list" I get
>
> Instance ID  Name        Public IP     Private IP     Flavor    Image       
>   SSH Key   Security Groups  State
> i-22371517   i-22371517  54.218.44.44  172.31.41.147  m1.small  
> ami-70f96e40  awsjames  default          running
>
> So it sees the server sees the public IP address  I just don't understand 
> why it's not in the meta data.
>
> James



-- 
Kevin Karwaski
Operations Engineer @ {Fiksu}



Archive powered by MHonArc 2.6.16.

§