Install fails on horizon import error (no swiftclient.Error attribute)

Bug #931269 reported by Duncan McGreggor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Gabriel Hurley

Bug Description

devstack installs python-cloudfiles, but that package's errors module (aliased in devstack as "swiftclient") seems to be missing the Error class. The latest source on github has the Error class.

Here's the error which causes devstack.sh to fail:

Using /usr/lib/python2.7/dist-packages
Finished processing dependencies for python-keystoneclient==2012.1
+ cd /opt/stack/horizon/horizon
+ sudo python setup.py develop
Traceback (most recent call last):
  File "setup.py", line 23, in <module>
    from horizon import version
  File "/opt/stack/horizon/horizon/horizon/__init__.py", line 44, in <module>
    from horizon.base import Horizon, Dashboard, Panel, Workflow
  File "/opt/stack/horizon/horizon/horizon/base.py", line 39, in <module>
    from horizon.decorators import (require_roles, require_services,
  File "/opt/stack/horizon/horizon/horizon/decorators.py", line 28, in <module>
    from horizon.exceptions import NotAuthorized, NotFound
  File "/opt/stack/horizon/horizon/horizon/exceptions.py", line 54, in <module>
    swiftclient.Error)
AttributeError: 'module' object has no attribute 'Error'
++ failed
++ local r=1
++ set +o xtrace

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Perhaps devstack should git clone this instead of using the package?

Revision history for this message
Dean Troyer (dtroyer) wrote :

Duncan, I haven't seen this problem, even before horizon's recent rearrangement. If you can still duplicate it can you send the output of devsstack's tools/info.sh?

Changed in devstack:
status: New → Incomplete
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

I was just able to reproduce this when re-stacking an older 11.10 install with a fresh copy of devstack. Despite the fact that 11.10 is supposed to have python-cloudfiles 1.7.9.2 packaged in apt, somehow version 1.7.9.1 was installed. As best I can tell this problem isn't entirely new (as the cloudfiles dependency was moved from pip to apt-get a few months ago) but may have been previously masked by other poor import exception handling which was recently cleaned up in Horizon.

It doesn't seem to affect everyone, however. As a precautionary measure we could move python-cloudfiles back to being installed by pip instead of apt just to be certain this problem doesn't bite anyone else...

Changed in devstack:
assignee: nobody → Gabriel Hurley (gabriel-hurley)
status: Incomplete → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/5103

Changed in devstack:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/5103
Committed: http://github.com/openstack-dev/devstack/commit/c9166055ed3fa663cfaa28361644904457b1b24e
Submitter: Jenkins
Branch: master

commit c9166055ed3fa663cfaa28361644904457b1b24e
Author: Gabriel Hurley <email address hidden>
Date: Thu Mar 8 13:40:29 2012 -0800

    Moves python-cloudfiles dependency back to PIP.

    For reasons currently unknown, apt-get seems to install
    an unusably old version of python-cloudfiles in some
    small subset of cases. To avoid that frustration for the
    users it does affect, this patch moves python-cloudfiles
    back to being installed by pip instead.

    Fixes bug 931269.

    Change-Id: I4c2e17ddcc0c0d327b3810b4fd4db117076df069

Changed in devstack:
status: In Progress → Fix Committed
Dean Troyer (dtroyer)
Changed in devstack:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.