← Back to team overview

openstack team mailing list archive

Re: Running swift got stuck!


Hi Xuyun -

Object-store is the correct type based on the API spec (it's defined in the XSDs for Keystone as well). Can you point me at documentation that lists any other type?

IANA assigned port 35357 to Keystone last year and we've been using that for a while. 5001 is no longer in use.

Hope this helps,

From: Xuyun Zhang <xyzhanggz@xxxxxxxxx<mailto:xyzhanggz@xxxxxxxxx>>
Date: Thu, 19 Jan 2012 20:24:42 +1100
To: <openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>>
Subject: [Openstack] Running swift got stuck!

Dear all,

After I ran the command "swift -A -U demo-tenant:demo -K secrete -V 2.0 stat -v", the swift command got stuck and nothing appeared. I even had to login from other tty to kill this swift process.

I have already used curl -i -H "Content-type: application/json" -d '{"auth": {"passwordCredentials": {"username": "demo", "password": "secrete"}, "tenantName": "demo-tenant"}}' to generate the corresponding token. The returned token shows it owns tenants and service catalog. details:
{"access": {"token": {"expires": "2012-01-20T20:19:26.838644", "tenants": [{"id": "239624b0fdf14043b415224c7a2a4b02", "name": "demo-tenant"}], "id": "09033fab-97c2-433f-a506-d3e623bf48b5", "tenant": {"id": "239624b0fdf14043b415224c7a2a4b02", "name": "demo-tenant"}}, "serviceCatalog": [{"endpoints": [{"id": "1", "region": "RegionOne", "internalURL": "";, "publicURL": ""}], "type": "compute", "name": "nova"}, {"endpoints": [{"id": "2", "region": "RegionOne", "internalURL": "";, "publicURL": ""}], "type": "image", "name": "glance"}, {"endpoints": [{"id": "3", "region": "RegionOne", "internalURL": "";, "publicURL": ""}], "type": "object-store", "name": "swift"}, {"endpoints": [{"id": "4", "region": "RegionOne", "internalURL": "";, "publicURL": ""}], "type": "identity", "name": "keystone"}], "user": {"id": "cccf764ca22d4abb96230c76ba08a219", "roles": [{"name": "Member", "id": "3", "tenantId": "239624b0fdf14043b415224c7a2a4b02"}], "name": "demo"}}}

I'm sure that the authentication was OK, because I have met a error said that something wrong with endpoint when I ran "swift..." command. Then the error was fixed by modifying the swift endpointTemplate type from "storage" to "object-store". (these two types appeared in different documentations, it seems "object-store" works for current version of keystone).

I guess the reason why swift got stuck is that swift doesn't get the right URL from keystone after authentication or the swift-proxy server is listening on the right port.

When I use "keystone-manage endpointTemplates list" command, it showed the id of swift is 3. But when running "keystone-manage endpointTemplates list demo-tenant", I got the "ERROR: URLs not found, ...., IndexError: URLs not found". However, I'm not sure whether this is a bug of keystone-manage command. I had already added a endpoint that associating demo-tenant and swift template (keystone-manage endpoint add demo-tenant 3). I'm sure that the pair (2,3) already exists in table endpoints(tenant_id, endpoint_template_id).
I post the details of my data sample below:
service keystone stop
rm -f /var/lib/keystone/keystone.db
service keystone start
keystone-manage database version_control
keystone-manage database goto 10
keystone-manage database sync
chown keystone:nogroup /var/lib/keystone/keystone.db
keystone-manage tenant add admin-tenant
keystone-manage user add admin secrete admin-tenant
keystone-manage role add Admin
keystone-manage role add KeystoneServiceAdmin
keystone-manage role grant Admin admin admin-tenant
keystone-manage role grant KeystoneServiceAdmin admin admin-tenant
keystone-manage service add nova compute "Nova-Compute-Service"
keystone-manage service add glance image "Glance-Image-Service"
keystone-manage service add swift object-store "Swift-Ojbect-Storage-Service"
keystone-manage service add keystone identity "Keystone-Identity-Service"
keystone-manage endpointTemplates add RegionOne nova 1 1
keystone-manage endpointTemplates add RegionOne glance 1 1
keystone-manage endpointTemplates add RegionOne swift 1 1
keystone-manage endpointTemplates add RegionOne keystone 1 1
keystone-manage token add 999888777666 admin admin-tenant 2015-02-05T00:00
keystone-manage tenant add demo-tenant
keystone-manage user add demo secrete demo-tenant
keystone-manage role add Member
keystone-manage role grant Member demo demo-tenant
keystone-manage role grant Admin admin demo-tenant
keystone-manage endpoint add admin-tenant 1
keystone-manage endpoint add admin-tenant 2
keystone-manage endpoint add admin-tenant 3
keystone-manage endpoint add admin-tenant 4
keystone-manage endpoint add demo-tenant 1
keystone-manage endpoint add demo-tenant 2
keystone-manage endpoint add demo-tenant 3
keystone-manage endpoint add demo-tenant 4

part of the swift-proxy.conf which is relevant to the ports:
bind_port = 8888
use = egg:keystone#tokenauth
auth_protocol = http
auth_host =
auth_port = 5001
admin_token = 999888777666
delay_auth_decision = 0
service_protocol = http
service_host =
service_port = 5000
service_pass = dTpw

But in most documentations, the auth_port is set to 35357, service_port is set to 8100. So I'm not sure whether these settings matter.

part of the keystone.conf which is relevant to the ports:
service_host  =
service_port = 5000

admin_host =
admin_port = 5001

admin_port is usually set to 35357 in most documentations. It seems that auth_port, service_port and adim_port are different. But they confused me to set up them. Could you please tell me what's the relationship among them?

Your help will be highly appreciated.
Best wishes,
_______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx> Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp