Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problems starting swift with keystone integration

Hi,

I'm trying to get keystone running with swift but have an issue trying to start swift:

swift-init main start Starting proxy-server...(/etc/swift/proxy-server.conf) Unable to locate config for container-server Unable to locate config for account-server Unable to locate config for object-server /usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py:8: UserWarning: Module netifaces was already imported from /usr/lib/pymodules/python2.6/netifaces.so, but /usr/lib/pymodules/python2.6 is being added to sys.path import pkg_resources 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.6/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 496, in _pipeline_app_context % (', '.join(local_conf.keys()))) TypeError: not enough arguments for format string

My keystone conf looks as follows:

[DEFAULT]

Show more verbose log output (sets INFO log level output)

verbose = True

Show debugging output in logs (sets DEBUG log level output)

debug = True

Which backend store should Keystone use by default.

Default: 'sqlite'

Available choices are 'sqlite' [future will include LDAP, PAM, etc]

default_store = sqlite

Log to this file. Make sure you do not set the same log

file for both the API and registry servers!

log_file = /var/log/keystone.log

log_file = keystone.log

List of backends to be configured

backends = keystone.backends.sqlalchemy,keystone.backends.alterdb

For LDAP support, add: ,keystone.backends.ldap

Dictionary Maps every service to a header.Missing services would get header

X_(SERVICE_NAME) Key => Service Name, Value => Header Name

service-header-mappings = { 'nova' : 'X-Server-Management-Url', 'swift' : 'X-Storage-Url', 'cdn' : 'X-CDN-Management-Url'}

Address to bind the API server

TODO Properties defined within app not available via pipeline.

service_host = 0.0.0.0

Port the bind the API server to

service_port = 5000

Address to bind the Admin API server

admin_host = 0.0.0.0

Port the bind the Admin API server to

admin_port = 5001

Role that allows to perform admin operations.

keystone-admin-role = Admin

[keystone.backends.sqlalchemy]

SQLAlchemy connection string for the reference implementation registry

server. Any valid SQLAlchemy connection string is fine.

See: http://bit.ly/ideIpI

sql_connection = sqlite:///keystone.db backend_entities = ['UserGroupAssociation', 'UserRoleAssociation', 'Endpoints', 'Role', 'Tenant', 'User', 'Group', 'Credentials', 'EndpointTemplates']

Period in seconds after which SQLAlchemy should reestablish its connection

to the database.

sql_idle_timeout = 30

[keystone.backends.alterdb]

SQLAlchemy connection string for the reference implementation registry

server. Any valid SQLAlchemy connection string is fine.

See: http://bit.ly/ideIpI

sql_connection = sqlite:///keystone.token.db backend_entities = ['Token']

Period in seconds after which SQLAlchemy should reestablish its connection

to the database.

sql_idle_timeout = 30

[keystone.backends.ldap] ldap_url = fake://ldap.db ldap_user = cn=Admin ldap_password = password backend_entities = ['Tenant', 'User', 'Group']

[pipeline:admin] pipeline = urlrewritefilter admin_api

[pipeline:keystone-legacy-auth] pipeline = urlrewritefilter legacy_auth service_api

[app:service_api] paste.app_factory = keystone.server:service_app_factory

[app:admin_api] paste.app_factory = keystone.server:admin_app_factory

[filter:urlrewritefilter] paste.filter_factory = keystone.middleware.url:filter_factory

[filter:legacy_auth] paste.filter_factory = keystone.frontends.legacy_token_auth:filter_factory

And my swift proxy-server.conf:

[DEFAULT] cert_file = /etc/swift/cert.crt key_file = /etc/swift/cert.key bind_ip = 0.0.0.0 bind_port = 443 workers = 8 user = swift log_name = swift log_facility = LOG_LOCAL0

log_level = INFO

log_level = DEBUG

[pipeline:main] pipeline = healthcheck cache keystone proxy-server account_autocreate = true

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

allow_account_management = true

account_autocreate = true log_facility = LOG_LOCAL1

[filter:keystone] use = egg:keystone#tokenauth auth_protocol = http auth_host = 192.168.2.20 auth_port = 5001 admin_token = 999888777666 delay_auth_decision = 0 service_protocol = http service_host = 192.168.2.20 service_port = 5000 service_pass = dTpw

[filter:swauth]

use = egg:swift#swauth

default_swift_cluster = local#https://192.168.2.50:443/v1

super_admin_key = ouzel0@pawns

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

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

Can anyone give me some clues as to my issue here?

Thanks, Marc