Comment 19 for bug 1068801

Revision history for this message
Tomas Karasek (tomas-karasek) wrote :

Hi Joshua,

it seems there's something wrong with the boto rpm in epel. It says it's 2.5.2 but boto/utils.py contains the LazyLoadMetadata which were introduced later. You can see the code in the tarball in the source rpm:
http://dl.fedoraproject.org/pub/epel/6/SRPMS/repoview/python-boto.html
(to unpack the rpm you can "rpm2cpio python-boto-2.5.2-1.el6.src.rpm | cpio -idmv" if you are interested)

So there's some mess in the boto rpm but all that does not really matter from cloud-init point of view right? Can't we just eventually process the LazyLoadMetadata and transform it do dict? And then work with the dict from then on?

As requested, I attach utils.py from my test instance and the boto routine is:

[root@tomk-cava ~]# yum list | grep boto
python-boto.noarch 2.5.2-1.el6 @epel
[root@tomk-cava ~]# python
Python 2.6.6 (r266:84292, Sep 12 2012, 09:26:39)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import boto.utils as boto_utils
>>> dir(boto_utils)
['AuthSMTPHandler', 'Encoders', 'ISO8601', 'ISO8601_MS', 'LRUCache', 'LazyLoadMetadata', 'MIMEBase', 'MIMEMultipart', 'MIMEText', 'Password', 'ShellCommand', 'StringIO', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '_end_cap_regex', '_first_cap_regex', '_get_instance_metadata', '_hashfn', '_number_cap_regex', 'base64', 'boto', 'canonical_string', 'compute_md5', 'datetime', 'fetch_file', 'find_class', 'formatdate', 'get_aws_metadata', 'get_instance_metadata', 'get_instance_userdata', 'get_ts', 'get_utf8_value', 'guess_mime_type', 'gzip', 'hashlib', 'imp', 'json', 'logging', 'md5', 'merge_meta', 'mklist', 'notify', 'parse_ts', 'pythonize_name', 'qsa_of_interest', 're', 'retry_url', 'smtplib', 'socket', 'subprocess', 'tempfile', 'time', 'unquote_v', 'update_dme', 'urllib', 'urllib2', 'write_mime_multipart']
>>>