Open engbert opened 10 years ago
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
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.
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.
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?'