changing tempauth to swauth causes startmain to fail

Asked by ta

I have been trying to run swift with the following proxy configuration but startmain keeps failing.

[DEFAULT]
cert_file = /etc/swift/cert.crt
key_file = /etc/swift/cert.key
bind_port = 8080
user = dev
log_facility = LOG_LOCAL1

[pipeline:main]
pipeline = healthcheck cache swauth proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true

[filter:swauth]
use = egg:swift#swauth
super_admin_key = swauthkey
default_swift_cluster = local#https://$SWIFT_IP:8080/v1

[filter:healthcheck]
use = egg:swift#healthcheck

[filter:cache]
use = egg:swift#memcache

Here is the failure that I am receiving:

Starting proxy-server...(/etc/swift/proxy-server.conf)
Traceback (most recent call last):
  File "/usr/local/bin/swift-proxy-server", line 7, in <module>
    execfile(__file__)
  File "/home/dev/swift/trunk/bin/swift-proxy-server", line 22, in <module>
    run_wsgi(conf_file, 'proxy-server', default_port=8080, **options)
  File "/home/dev/swift/trunk/swift/common/wsgi.py", line 122, in run_wsgi
    loadapp('config:%s' % conf_file, global_conf={'log_name': log_name})
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 204, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 224, in loadobj
    global_conf=global_conf)
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 248, in loadcontext
    global_conf=global_conf)
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 278, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 405, in get_context
    global_additions=global_additions)
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 503, in _pipeline_app_context
    for name in pipeline[:-1]]
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 409, in get_context
    section)
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 431, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 361, in get_context
    global_conf=global_conf)
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 248, in loadcontext
    global_conf=global_conf)
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 285, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 561, in get_context
    object_type, name=name)
  File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 600, in find_egg_entry_point
    for prot in protocol_options] or '(no entry points)'))))
LookupError: Entry point 'swauth' not found in egg 'swift' (dir: /home/dev/swift/trunk; protocols: paste.filter_factory, paste.filter_app_factory; entry_points: )

Your help is appreciated.

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
John Dickinson
Solved:
Last query:
Last reply:
Revision history for this message
Christophe Le Guern (c35sys) said :
#1

The error is due to swauth, and it can't be found in your installation.

swauth is now a separate project since 1.4.1.

You can find it at https://github.com/gholt/swauth, installation instructions are in the README.

In your proxy-server.conf, please update (after swauth installation) this part:
---
[filter:swauth]
use = egg:swift#swauth
---
by
---
[filter:swauth]
use = egg:swauth#swauth
---

Revision history for this message
ta (daryanit) said :
#2

Thanks for clarifying this. I also had another question. Is there a way to change the default cluster url( to use ssl) with the tempauth.

Thanks

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

yes. add your desired storage URL to the end of the line in the tempauth config section:

For example:

user_test_tester = testing .admin https://my.secure.server.example.com:12345/v1/AUTH_abcdefg

Revision history for this message
ta (daryanit) said :
#4

Thanks John Dickinson, that solved my question.

Revision history for this message
jameszhou (jameszhou) said :
#5

 I have been trying to run swift with the following proxy configuration,it failed.

[DEFAULT]
cert_file = /etc/swift/cert.crt
key_file = /etc/swift/cert.key
bind_port = 8080
workers = 8
user = swift

[pipeline:main]
pipeline = healthcheck cache tempauth proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true

[filter:tempauth]
use = egg:swift#tempauth
user_system_root = testpass .admin https://10.0.1.8:8080/v1/AUTH_system

[filter:healthcheck]
use = egg:swift#healthcheck

[filter:cache]
use = egg:swift#memcache
memcache_servers = 10.0.1.8:11211

Here is the failure that I am receiving:

Starting proxy-server...(/etc/swift/proxy-server.conf)
Traceback (most recent call last):
  File "/usr/bin/swift-proxy-server", line 22, in <module>
    run_wsgi(conf_file, 'proxy-server', default_port=8080, **options)
  File "/usr/lib/pymodules/python2.7/swift/common/wsgi.py", line 128, in run_wsgi
    app = loadapp('config:%s' % conf_file, global_conf={'log_name': log_name})
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 204, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 224, in loadobj
    global_conf=global_conf)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 248, in loadcontext
    global_conf=global_conf)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 278, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 405, in get_context
    global_additions=global_additions)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 503, in _pipeline_app_context
    for name in pipeline[:-1]]
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 409, in get_context
    section)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 431, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 361, in get_context
    global_conf=global_conf)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 248, in loadcontext
    global_conf=global_conf)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 285, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 561, in get_context
    object_type, name=name)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 600, in find_egg_entry_point
    for prot in protocol_options] or '(no entry points)'))))
LookupError: Entry point 'tempauth' not found in egg 'swift' (dir: /usr/lib/pymodules/python2.7; protocols: paste.filter_factory, paste.filter_app_factory; entry_points: )

ta ,can you help me ?