[openstack-dev] olso.config error on running Devstack
Doug Hellmann
doug.hellmann at dreamhost.com
Tue Jan 7 13:16:58 UTC 2014
On Tue, Jan 7, 2014 at 6:24 AM, Michael Kerrin <michael.kerrin at hp.com>wrote:
> I have been seeing this problem also.
>
>
>
> My problem is actually with oslo.sphinx. I ran sudo pip install -r
> test-requirements.txt in cinder so that I could run the tests there, which
> installed oslo.sphinx.
>
>
>
> Strange thing is that the oslo.sphinx installed a directory called oslo in
> /usr/local/lib/python2.7/dist-packages with no __init__.py file. With this
> package installed like so I get the same error you get with oslo.config.
>
The oslo libraries use python namespace packages, which manifest
themselves as a directory in site-packages (or dist-packages) with
sub-packages but no __init__.py(c). That way oslo.sphinx and oslo.config
can be packaged separately, but still installed under the "oslo" directory
and imported as oslo.sphinx and oslo.config.
My guess is that installing oslo.sphinx globally (with sudo), set up 2
copies of the namespace package (one in the global dist-packages and
presumably one in the virtualenv being used for the tests).
Doug
>
>
> I don't need oslo.sphinx so I just went and manually deleted the oslo
> directory and the oslo.sphinx* files in
> /usr/local/lib/python2.7/dist-packages. Everything worked fine after that.
>
>
>
> Not sure what to do about this, but that is my story
>
>
>
> Michael
>
>
>
>
>
>
>
> On Mon 23 Dec 2013 14:18:11 Sean Dague wrote:
>
> > On 12/23/2013 11:52 AM, Ben Nemec wrote:
>
> > > On 2013-12-18 09:26, Sayali Lunkad wrote:
>
> > >> Hello,
>
> > >>
>
> > >> I get the following error when I run stack.sh on Devstack
>
> > >>
>
> > >> Traceback (most recent call last):
>
> > >> File "/usr/local/bin/ceilometer-dbsync", line 6, in <module>
>
> > >>
>
> > >> from ceilometer.storage import dbsync
>
> > >>
>
> > >> File "/opt/stack/ceilometer/ceilometer/storage/__init__.py", line
>
> > >>
>
> > >> 23, in <module>
>
> > >>
>
> > >> from oslo.config import cfg
>
> > >>
>
> > >> ImportError: No module named config
>
> > >> ++ failed
>
> > >> ++ local r=1
>
> > >> +++ jobs -p
>
> > >> ++ kill
>
> > >> ++ set +o xtrace
>
> > >>
>
> > >> Search gives me olso.config is installed. Please let me know of any
>
> > >> solution.
>
> > >
>
> > > Devstack pulls oslo.config from git, so if you have it installed on the
>
> > > system through pip or something it could cause problems. If you can
>
> > > verify that it's only in /opt/stack/oslo.config, you might try deleting
>
> > > that directory and rerunning devstack to pull down a fresh copy. I
>
> > > don't know for sure what the problem is, but those are a couple of
>
> > > things to try.
>
> >
>
> > We actually try to resolve that here:
>
> >
>
> > https://github.com/openstack-dev/devstack/blob/master/lib/oslo#L43
>
> >
>
> > However, have I said how terrible python packaging is recently?
>
> > Basically you can very easily get yourself in a situation where *just
>
> > enough* of the distro package is left behind that pip thinks its there,
>
> > so won't install it, but the python loader doesn't, so won't work.
>
> >
>
> > Then much sadness.
>
> >
>
> > If anyone has a more fool proof way to fix this, suggestions appreciated.
>
> >
>
> > -Sean
>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140107/979fa597/attachment.html>
More information about the OpenStack-dev
mailing list