swift-dispersion should pass "os_options" to swiftclient

Bug #1102319 reported by Mehdi Abaakouk
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
Mehdi Abaakouk

Bug Description

Hi,

swift-dispersion don't pass os_options to swiftclient, or it should allow to choose between endpoint_type.

For example, a monitoring machine that use swift-dispersion can actually only use it via the publicURL, and not via the internalURL.

Thanks in advance,
sileht

Revision history for this message
Phil Hopkins (phil-hopkins-a) wrote :

Both swift-dispersion-populate and swift-dispersion-report seem to be broken when using v2.0 authentication. With /etc/swift/dispersion.conf:

[dispersion]
#auth_url=http://localhost:8080/auth/v1.0
auth_url=http://192.168.122.58:5000/v2.0/
auth_user=MyProject:myuser
auth_key=mypassword
auth_version=2.0
# swift_dir = /etc/swift
# dispersion_coverage = 1
# container_put_count = 1000
# object_put_count = 1000
# big_container_count = 1000000
# retries = 5
# concurrency = 7
# csv_output = /etc/swift/dispersion.csv

running either of the above commands it errors:

/usr/bin/swift-dispersion-populate
Traceback (most recent call last):
  File "/usr/bin/swift-dispersion-populate", line 100, in <module>
    auth_version=conf.get('auth_version', '1.0'))
  File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 281, in get_auth
    if (kwargs['os_options'].get('object_storage_url') and
KeyError: 'os_options'

 /usr/bin/swift-dispersion-report
Traceback (most recent call last):
  File "/usr/bin/swift-dispersion-report", line 316, in <module>
    auth_version=conf.get('auth_version', '1.0'))
  File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 281, in get_auth
    if (kwargs['os_options'].get('object_storage_url') and
KeyError: 'os_options'

and will not work.

Nothing is captured in the swift log files,

This is on Scientific Linux 6.3 using:
rpm -qa|grep swift
python-swiftclient-1.2.0-2.el6.noarch
openstack-swift-account-1.7.4-2.el6.noarch
openstack-swift-1.7.4-2.el6.noarch
openstack-swift-object-1.7.4-2.el6.noarch
openstack-swift-container-1.7.4-2.el6.noarch
openstack-swift-plugin-swift3-1.0.0-0.20120711git.el6.noarch
openstack-swift-proxy-1.7.4-2.el6.noarch

Revision history for this message
Mehdi Abaakouk (sileht) wrote :

Your issue is not related with mine but this is a know issue in python-swiftclient already fixed

Revision history for this message
Mehdi Abaakouk (sileht) wrote :

A proposed fix for this issue: https://review.openstack.org/#/c/20311/

Changed in swift:
assignee: nobody → Mehdi Abaakouk (sileht)
status: New → In Progress
Revision history for this message
Phil Hopkins (phil-hopkins-a) wrote :

Actually I believe this is fixed in the swiftclient bug fix at: https://bugs.launchpad.net/python-swiftclient/+bug/1044204

Sorry I missed this earlier. This fix has not made it to the RHEL6 version of swift/python-swiftclient rpms.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/20311
Committed: http://github.com/openstack/swift/commit/a1395ec67241cd3b6c21ae09d7c110c49d80453e
Submitter: Jenkins
Branch: master

commit a1395ec67241cd3b6c21ae09d7c110c49d80453e
Author: Mehdi Abaakouk <email address hidden>
Date: Wed Jan 23 09:58:28 2013 +0000

    Allow change the endpoint_type when use swift-dispersion tools

    Fixes bug 1102319
    DocImpact

    Change-Id: I8fb0417ab9468e97ed01a6cb1e262630905e7f29

Changed in swift:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in swift:
milestone: none → 1.8.0-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in swift:
milestone: 1.8.0-rc1 → 1.8.0
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.