← Back to team overview

openstack team mailing list archive

Re: Nova not building on SID with python2.7


2011/5/26 Thomas Goirand <thomas@xxxxxxxxxx>:
> On 05/20/2011 06:15 AM, Soren Hansen wrote:
>>> Since SID is using python2.7, there's loads of errors, and building Nova
>>> simply doesn't work.
>> Can you be more specific? Ubuntu has been on Python 2.7 since Natty,
>> so it most definitely should work.
> Below is just an example. It does that all the time for the clean,
> build, install, etc. targets of debian/rules.
>   debian/rules override_dh_auto_clean
> make[1]: Entering directory `/home/zigo/src/build/nova/nova-2011.2'
> dh_auto_clean
> Traceback (most recent call last):
>  File "setup.py", line 37, in <module>
>    from nova.utils import parse_mailmap, str_dict_replace
>  File "/home/zigo/src/build/nova/nova-2011.2/nova/utils.py", line 42,
> in <module>
>    from eventlet import event
> ImportError: No module named eventlet
> dh_auto_clean: python2.7 setup.py clean -a returned exit code 1

Sure. Anything that attempts to use eventlet (which is *everything*)
will fail if the eventlet packages never got byte-compiled for Python
2.7 (which is the case for python-eventlet in Debian).

>>> Even the debian/rules clean target fails, not finding the Eventlet python module.
>> Eventlet probably just needs a no-change rebuild to pick up the new
>> python versions in the archive. Bug the maintainers (*cough* Monty
>> *cough*).
> Maybe. But the issue is that I tried to rebuild it, and it doesn't build
> anymore. It's well documented here already by Lucas Nussbaum:

Same problem, different package. pyopenssl hasn't been built in Debian
to support Python 2.7.

> Note that after rebuilding pyopenssl-0.10, it seems
> that the error is not the same as what has been reported:

> ======================================================================
> ERROR: Failure: ImportError
> (/usr/lib/pymodules/python2.7/OpenSSL/SSL.so: undefined symbol:
> SSLv2_method)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/lib/pymodules/python2.7/nose/loader.py", line 390, in
> loadTestsFromName
>    addr.filename, addr.module)
>  File "/usr/lib/pymodules/python2.7/nose/importer.py", line 39, in
> importFromPath
>    return self.importFromDir(dir_path, fqname)
>  File "/usr/lib/pymodules/python2.7/nose/importer.py", line 86, in
> importFromDir
>    mod = load_module(part_fqname, fh, filename, desc)
>  File
> "/home/zigo/src/rebuild/python-eventlet-0.9.14/eventlet/green/OpenSSL/__init__.py",
> line 1, in <module>
>    import rand, crypto, SSL, tsafe
>  File
> "/home/zigo/src/rebuild/python-eventlet-0.9.14/eventlet/green/OpenSSL/rand.py",
> line 1, in <module>
>    from OpenSSL.rand import *
>  File "/usr/lib/pymodules/python2.7/OpenSSL/__init__.py", line 11, in
> <module>
>    import rand, crypto, SSL, tsafe
> ImportError: /usr/lib/pymodules/python2.7/OpenSSL/SSL.so: undefined
> symbol: SSLv2_method

SSLv2 was completely removed from recent versions of OpenSSL.
pyopenssl was adjusted to accommodate this change on May 10th and
hasn't cut a release since then.

So, first you need to get a fresh snapshot of pyopenssl (or backport
the patch for the removed SSLv2 stuff to a released version) built.
Then you need to get eventlet built against this new pyopenssl snapshot.
Then you can build Nova with Python 2.7.

Soren Hansen        | http://linux2go.dk/
Ubuntu Developer    | http://www.ubuntu.com/
OpenStack Developer | http://www.openstack.org/

Follow ups