Swift-dispersion-populate/report can't run in a virtual environment using keystone V2.0

Bug #1319313 reported by Lorcan Browne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Invalid
Undecided
Lorcan Browne

Bug Description

When trying to run "swift-dispersion-populate" in a virtual environment using keystone V2.0, the following errror is observed:

"ERROR: swiftclient missing, only auth v1.0 supported"

This happens because python-swiftclient is not included in the shared libraries and "swift-dispersion-populate" ends up including the "get_auth " function from "swift/common/internal_client.py". This "get_auth" function does not support keystone V2.0

The solution to this is to include python-swiftclient in requirements.txt.

Revision history for this message
Lorcan Browne (lorcan-browne) wrote :

I have a fix for this ready to push for review but can't do it until Bug #1317957 is resolved

Changed in swift:
assignee: nobody → Lorcan Browne (lorcan-browne)
Revision history for this message
Lorcan Browne (lorcan-browne) wrote :

Change added for review - https://review.openstack.org/#/c/93611/

summary: - python-swiftclient needed in requirements.txt
+ Swift-dispersion-populate/report can't run in a virtual environment
+ using keystone V2.0
Revision history for this message
Lorcan Browne (lorcan-browne) wrote :

Pete Zaitcev and Samuel Merritt pointed out in their review that the solution of including python-swiftclient in requirements.txt is unaceptable as it adds an undesired swiftclient dependency.

An alternative solution would be to update the "get_auth" function in "swift/common/internal.client.py" so that it is more similar as "get_auth" in "swiftclient/client.py". I have tested this on my local machine and it appears to work with no added dependencies.

From swift-dispersion-populate/report

...
try:
    from swiftclient import get_auth
except ImportError:
    from swift.common.internal_client import get_auth
...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on swift (master)

Change abandoned by Lorcan Browne (<email address hidden>) on branch: master
Review: https://review.openstack.org/93611
Reason: Abandoning this as it does not seem to be a big issues. I came across this problem when trying to use the dispersion populate tool in a tripleo environment. However, have worked around this issue by adding swiftclient to the swift-source-install section of the swift-proxy element in tripleo-image-element.

See: https://review.openstack.org/#/c/95176/

Changed in swift:
status: New → Invalid
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.