does Swift 1.4.4 support keystone ???

Asked by Hugo Kou

Swift 1.4.4
Keystone - diablo

 root@SAIO:/etc/swift# swift -A http://10.103.1.134:5000/v1.0 -U admin -K ***** stat -v
Traceback (most recent call last):
  File "/usr/local/bin/swift", line 5, in <module>
    pkg_resources.run_script('swift==1.4.4', 'swift')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 467, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1200, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/swift-1.4.4-py2.7.egg/EGG-INFO/scripts/swift", line 1853, in <module>
    error_queue)
  File "/usr/local/lib/python2.7/dist-packages/swift-1.4.4-py2.7.egg/EGG-INFO/scripts/swift", line 1363, in st_stat
    headers = conn.head_account()
  File "/usr/local/lib/python2.7/dist-packages/swift-1.4.4-py2.7.egg/EGG-INFO/scripts/swift", line 818, in head_account
    return self._retry(None, head_account)
  File "/usr/local/lib/python2.7/dist-packages/swift-1.4.4-py2.7.egg/EGG-INFO/scripts/swift", line 790, in _retry
    self.http_conn = self.http_connection()
  File "/usr/local/lib/python2.7/dist-packages/swift-1.4.4-py2.7.egg/EGG-INFO/scripts/swift", line 778, in http_connection
    return http_connection(self.url)
  File "/usr/local/lib/python2.7/dist-packages/swift-1.4.4-py2.7.egg/EGG-INFO/scripts/swift", line 163, in http_connection
    parsed = urlparse(url)
  File "/usr/lib/python2.7/urlparse.py", line 134, in urlparse
    tuple = urlsplit(url, scheme, allow_fragments)
  File "/usr/lib/python2.7/urlparse.py", line 173, in urlsplit
    i = url.find(':')
AttributeError: 'NoneType' object has no attribute 'find'
swift -A http://10.103.1.134:5000/v1.0 -U admin:admin -K ****** stat -v
Auth GET failed: http://10.103.1.134:5000/v1.0 401 Unauthorized

I'm wondering to know that if Swift 1.4.4 compatible with Keystone???

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Hugo Kou
Solved:
Last query:
Last reply:
Revision history for this message
Hugo Kou (tonytkdk) said :
#1

Swift & keystone on different hosts

Revision history for this message
Tomasz 'Zen' Napierala (tzn) said :
#2

Would you paste your keystone.conf and swift-proxy.conf?

Revision history for this message
Hugo Kou (tonytkdk) said :
#3

tzn , thanks

Keystone: 192.168.1.105
Swift : 192.168.1.104

keystone conf
https://github.com/HugoKuo/SwiftSAIO/blob/master/keystone/keystone.conf

proxy-server.conf
https://github.com/HugoKuo/SwiftSAIO/blob/master/proxy-server.conf.keystone

Followed git hub openstack/keystone instruction with almost same configurations , it works now~

But still very confuse about some points as follow....

1. What for ? of these two lines in [filter:keystone]
service_port = 8100
service_pass = dTpw

2. Generate data into keystone DB , should swift port be 8888??? and global = false ???? does the admin endpoint has no effort ?
'endpointTemplates', 'add', 'RegionOne', 'swift',
        'http://192.168.1.104:8888/v1/AUTH_%tenant_id%',
        'http://swift.admin-nets.local:8080/',
        'http://192.168.1.104:8888/v1/AUTH_%tenant_id%', '1', '0'),

3. Can allow_account_mgm be enabled ??
#allow_account_management = true
account_autocreate = true

Revision history for this message
Hugo Kou (tonytkdk) said :
#4

must assign a tenant_ip for the user in "users" table

Revision history for this message
tienbm (stand-by-me1190) said :
#5

Dear Hugo Kou

How did your resolve this issue ??

I install keystone and swift-proxy on 1 machine.

here's my config.

sampledata.py :
http://pastebin.com/FVf8y9Ux

proxy-server.conf :
http://pastebin.com/yDJ1kGKs

Thanks

Revision history for this message
Hugo Kou (tonytkdk) said :
#6

Hacking keystone DB
Set an swift endpoint for the particular tenant
And then assign the tenant for the user in "USERS" table

Revision history for this message
Will Stevens (cloudops) said :
#7

Has anyone resolved this issue?

If so, can you please post the following config files for us as the documentation is not very consistent on this integration.

keystone.conf
sampledata.py (or your equivalent)
proxy-server.conf

Thanks

Revision history for this message
John Dickinson (notmyname) said :
#8

contrary to what the keystone docs say, you need to use swiftauth in your proxy server, not tokenauth

[filter:keystone]
use = egg:keystone#swiftauth
keystone_admin_token = 999888777666
keystone_url = http://127.0.0.1:35357

Revision history for this message
Will Stevens (cloudops) said :
#9

is that the complete section for filter:keystone?

do we not have to put the service_port and service_host, etc?

or is this just a subset of the settings that need to be in filter:keystone?

thanks

Revision history for this message
John Dickinson (notmyname) said :
#10

those are the only config variables that the swiftauth middleware requires (as determined by looking at the code). There may be other config options, but if so, I don't know what they are. I only found the required ones by reading the code (since the keystone docs are so out of date).

Disclaimer: I don't know much about keystone and only figured this out in order to see if keystone works. I normally use tempauth for my dev and testing work on swift. The keystone project maintains the integration with the other openstack projects. They are the ones to ask about the keystone middleware details.

Revision history for this message
Will Stevens (cloudops) said :
#11

I appreciate the help. I will do some testing with this and see if I can get a working setup with it.

Thanks. :)

Revision history for this message
Will Stevens (cloudops) said :
#12

I am still getting this same error. I will keep looking for a solution...