Juju Charm - Swift proxy -error: pkg_resources.DistributionNotFound: swift3

Bug #1321722 reported by Craym
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
distribute (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi,

I'm installing openstack using juju on 6 machines, ubuntu 12.04 freshly installed. I'm using the icehouse release (cloud:precise-icehouse) and everything works well (nova, dashboard etc...)

Description: Ubuntu 12.04.4 LTS
Release: 12.04
juju deploy --config=swift.cfg --to 0 swift-proxy

and using:
 cat >swift.cfg <<END
    swift-proxy:
        zone-assignment: manual
        replicas: 3
    swift-storage-zone1:
        zone: 1
        block-device: /etc/swift/storage.img|2G
    swift-storage-zone2:
        zone: 2
        block-device: /etc/swift/storage.img|2G
    swift-storage-zone3:
        zone: 3
        block-device: /etc/swift/storage.img|2G
END

I'm now installing the storage with swift and got the following error :

root@monroe:~# service swift-proxy start
start: Job failed to start

I investigated /var/log/juju/unit-swift-proxy-0.log but it shows nothing bad.

Here is the syslog:
May 21 11:42:27 monroe kernel: [11578.865048] init: swift-proxy post-stop process (16183) terminated with status 1

Nothing really helpful so i tried to start it up manually and I found this:

root@monroe:~# swift-proxy-server /etc/swift/proxy-server.conf
Traceback (most recent call last):
  File "/usr/bin/swift-proxy-server", line 23, in <module>
    sys.exit(run_wsgi(conf_file, 'proxy-server', default_port=8080, **options))
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 389, in run_wsgi
    loadapp(conf_path, global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 316, in loadapp
    ctx = loadcontext(loadwsgi.APP, conf_file, global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 307, in loadcontext
    global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
    global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 59, in get_context
    object_type, name=name, global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 450, in get_context
    global_additions=global_additions)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 562, in _pipeline_app_context
    for name in pipeline[:-1]]
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 59, in get_context
    object_type, name=name, global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 454, in get_context
    section)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 476, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 59, in get_context
    object_type, name=name, global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 406, in get_context
    global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
    global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 328, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 620, in get_context
    object_type, name=name)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 640, in find_egg_entry_point
    pkg_resources.require(self.spec)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 686, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: swift3

Apparently, there is something wrong in the config file. Here is the proxy-server.conf file :
root@monroe:~# cat /etc/swift/proxy-server.conf
[DEFAULT]
bind_port = 8070
workers = 0
user = swift

[pipeline:main]
pipeline = gatekeeper healthcheck cache swift3 s3token container_sync bulk tempurl slo dlo formpost authtoken keystoneauth staticweb container-quotas account-quotas proxy-server

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

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

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

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

[filter:account-quotas]
use = egg:swift#account_quotas

[filter:container-quotas]
use = egg:swift#container_quotas

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

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

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

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

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

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

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

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

[filter:keystoneauth]
use = egg:swift#keystoneauth
operator_roles = Member,Admin

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
auth_host = 10.0.30.102
auth_port = 35357
auth_protocol = http
auth_uri = http://10.0.30.102:5000
admin_tenant_name = services
admin_user = swift
admin_password = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
delay_auth_decision = true
signing_dir = /etc/swift
cache = swift.cache

[filter:s3token]
paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory
service_host = 10.0.30.102
service_port = 5000
auth_port = 35357
auth_host = 10.0.30.102
auth_protocol = http
auth_token = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
admin_token = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

[filter:swift3]
use = egg:swift3#swift3

All the swift zones are setup and ready, all the services are up. Just the proxy can't start.

Does anyone have any idea what should I do?

Thanks !

Revision history for this message
Craym (sebastien-vionlabs) wrote :

QUickfix :

By removing "swift3 s3token" into the [pipeline:main] allow the swift proxy to start without problem and be ready to use.

Maybe that can help!

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.