Comment 4 for bug 566792

Revision history for this message
Scott Moser (smoser) wrote : Re: UEC guests sometimes fail on consuming user data

I modified 'retry_url' in the cloudinit/boto_utils.py to have:
        try:
            req = urllib2.Request(url)
            resp = urllib2.urlopen(req)
            content = resp.read()
            print "%s [%i]\n\t%s" % (url, resp.getcode(), content)
            return content

the result is, we still see failure, but have output like:
|http://169.254.169.254/2009-04-04/user-data [200]
|
|http://169.254.169.254/2009-04-04/meta-data/ [200]
|
|==== begin userdata_raw ====
|
|==== end userdata_raw ====
|==== begin metadata ====
|{}
|==== end metadata ====

So, we are in fact getting an http 200 (OK) response from the server for the http://169.254.169.254/2009-04-04/user-data and http://169.254.169.254/2009-04-04/meta-data/ URLs. I suspect sleeping there and trying again will make this work. I'll try that to verify.

Basically, the metadata service is up and responding but not populated yet.