Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about libcloud package #12

Open
engbert opened this issue May 1, 2014 · 3 comments
Open

Question about libcloud package #12

engbert opened this issue May 1, 2014 · 3 comments

Comments

@engbert
Copy link
Contributor

engbert commented May 1, 2014

For testing I use a small script on my development machine that first creates the distro's and then installs them on this same machine.

Currently we have a directory conpaas-services/contrib/libcloud
that will be included in the ConPaaS.tar.gz tarball for use on the service VMs deployed by the director.

The director itself, however, uses another libcloud package.
For installation of the director I used a VM that is deployed on DAS4 from an image I created with the ConPaaS image creation script conpaas-services/scripts/create_vm/create-img-script.py
Here the libcloud package resides in /usr/local/lib/python2.6/dist-packages/apache_libcloud-0.14.1-py2.6.egg/libcloud

The contents of these two libcloud packages differ. When working on the Contrail-ConPaaS connection I made changes in the contrib/libcloud package to support the federation cloud.

In order to include these changes in the director, I symlinked conpaas-services/src/libcloud -> ../contrib/libcloud/ , created and installed the director distro, and then could connect to the Contrail-Federation cloud.
Now for some obscure reason (setuptools does not follow symlinks anymore??) this stopped working. (libcloud subpackages seem to be missing)
To get it working again I made a full directory copy from conpaas-services/contrib/libcloud to conpaas-services/src/libcloud

The whole thing boils down to the question
'Should the libcloud package for ConPaaS be the same in all tarballs? And if so, how do we set this up without copying the full package tree?'

@engbert
Copy link
Contributor Author

engbert commented May 2, 2014

The fact that symlinks are no longer included in the build is due to a change recently made in setuptools 3.4.4, issue # 184
https://bitbucket.org/pypa/setuptools/issue/184

@engbert
Copy link
Contributor Author

engbert commented May 2, 2014

setuptools came with a patch (see link above, and issue 195 for setuptools).
Applying the patch was a bit tricky. Here is what I did (that worked, although there may be a better way):

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
python ez_setup.py --version=3.4.4

This downloads a setuptools file for the specified version.

 unzip setuptools-3.4.4.zip

apply the patch on line 81

vi setuptools-3.4.4/setuptools/__init__.py
81    for root, dirs, files in os.walk(base_path, followlinks=True):

update the zip file

zip -u setuptools-3.4.4.zip

Reinstall

python ez_setup.py --version=3.4.4

Here I got a load of error messages so I removed the egg directory and reinstalled.

rm -rf /usr/local/lib/python2.6/dist-packages/setuptools-3.4.4-py2.6.egg
python ez_setup.py --version=3.4.4

That worked. With this patched version I could create the distro I wanted.
Problem resolved.

However, the question on the end of my first note is still open.

@gpierre42
Copy link
Contributor

I agree that in general it would be better to ship ConPaaS with the version of libcloud which it is know to work with. Let's put this on the list for the 1.5.x releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants