Details
-
Type:
Task
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 0.1.4
-
Fix Version/s: 0.2.0
-
Component/s: None
-
Labels:None
Description
Notice the current code below only grabs the 'meta-data' tree from the root. It needs to also grab the 'user-data' portion
EC2_METADATA_ADDR = "169.254.169.254"
EC2_METADATA_URL = "http://#{EC2_METADATA_ADDR}/2008-02-01/meta-data"
def metadata(id='')
- Try non-blocking connect with lite spin so we don't "block" if
- the Xen environment is not EC2
OpenURI.open_uri("#{EC2_METADATA_URL}/#{id}").read.split("\n").each do |o|
key = "#{id}#{o.gsub(/\=.*$/, '/')}"
if key[-1..-1] != '/'
ec2[key.gsub(/\-|\//, '_').to_sym] =
OpenURI.open_uri("#{EC2_METADATA_URL}/#{key}").gets
else
metadata(key)
end
end
end
Activity
| Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
|---|---|---|---|---|---|---|---|---|---|
|
4h 34m | 1 | Christopher Brown | 11/Feb/09 12:17 AM | |||||
|
17m 4s | 1 | Adam Jacob | 11/Feb/09 12:34 AM |