Public bug reported:

Booting a 13.04 cloud image on OpenStack using Heat, I did not get ec2
keys installed for ec2-user, but I did for root. The log snippets below
are from /var/log/cloud-init.log. The relevant section with boto 2.3.0
from the distro is the backtrace from boto. I created a new image with
boto 2.9.2 installed via pip, and the problem went away.

---- BEGIN boto 2.9.2 ----
2013-05-07 21:47:49,660 - url_helper.py[DEBUG]: Attempting to open 
'http://169.254.169.254/2009-04-04/meta-data/instance-id' with {'url': 
'http://169.254.169.254/2009-04-04/meta-data/instance-id', 'headers': 
{'User-Agent': 'Cloud-Init/0.7.2'}, 'allow_redirects': True, 'method': 'GET', 
'timeout': 50.0} configuration
2013-05-07 21:47:54,576 - url_helper.py[DEBUG]: Read from 
http://169.254.169.254/2009-04-04/meta-data/instance-id (200, 10b) after 1 
attempts
2013-05-07 21:47:54,577 - DataSourceEc2.py[DEBUG]: Using metadata source: 
'http://169.254.169.254'
2013-05-07 21:47:54,695 - DataSourceEc2.py[DEBUG]: Crawl of metadata service 
took 0 seconds
---- END boto 2.9.2 ----

---- BEGIN boto 2.3.0 ----
2013-05-07 20:01:07,612 - util.py[DEBUG]: Reading from 
/var/lib/cloud/seed/ec2/meta-data (quiet=False)
2013-05-07 20:01:07,613 - DataSourceEc2.py[DEBUG]: Removed the following from 
metadata urls: ['http://instance-data.:8773']
2013-05-07 20:01:07,613 - url_helper.py[DEBUG]: Attempting to open 
'http://169.254.169.254/2009-04-04/meta-data/instance-id' with {'url': 
'http://169.254.169.254/2009-04-04/meta-data/instance-id', 'headers': 
{'User-Agent': 'Cloud-Init/0.7.2'}, 'allow_redirects': True, 'method': 'GET', 
'timeout': 50.0} configuration
2013-05-07 20:01:13,236 - url_helper.py[DEBUG]: Read from 
http://169.254.169.254/2009-04-04/meta-data/instance-id (200, 10b) after 1 
attempts
2013-05-07 20:01:13,236 - DataSourceEc2.py[DEBUG]: Using metadata source: 
'http://169.254.169.254'
2013-05-07 20:01:13,296 - util.py[WARNING]: Failed reading from metadata 
address http://169.254.169.254
2013-05-07 20:01:13,297 - util.py[DEBUG]: Failed reading from metadata address 
http://169.254.169.254
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cloudinit/sources/DataSourceEc2.py", 
line 67, in get_data
    self.metadata_address)
  File "/usr/lib/python2.7/dist-packages/cloudinit/ec2_utils.py", line 63, in 
get_instance_metadata
    return _unlazy_dict(metadata)
  File "/usr/lib/python2.7/dist-packages/cloudinit/ec2_utils.py", line 43, in 
_unlazy_dict
    for (_k, v) in mp.items():
  File "/usr/local/lib/python2.7/dist-packages/boto/utils.py", line 278, in 
items
    self._materialize()
  File "/usr/local/lib/python2.7/dist-packages/boto/utils.py", line 237, in 
_materialize
    self[key]
  File "/usr/local/lib/python2.7/dist-packages/boto/utils.py", line 254, in 
__getitem__
    if val[0] == '{':
IndexError: string index out of range
2013-05-07 20:01:13,298 - __init__.py[DEBUG]: Seeing if we can get any data 
from <class 'cloudinit.sources.DataSourceNone.DataSourceNone'>
---- END boto 2.3.0 ----

** Affects: python-boto (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: raring

** Attachment added: "user-data.txt.i"
   
https://bugs.launchpad.net/bugs/1177576/+attachment/3669235/+files/user-data.txt.i

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to python-boto in Ubuntu.
https://bugs.launchpad.net/bugs/1177576

Title:
  bug in boto causes cloud-init in 13.04 to fail when querying OpenStack
  havana api for userdata

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-boto/+bug/1177576/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to