<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Hi Xuyun -</div>
<div><br>
</div>
<div>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?</div>
<div><br>
</div>
<div>IANA assigned port 35357 to Keystone last year and we've been using that for a while. 5001 is no longer in use.</div>
<div><br>
</div>
<div>Hope this helps,</div>
<div>Z</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Xuyun Zhang <<a href="mailto:xyzhanggz@gmail.com">xyzhanggz@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Thu, 19 Jan 2012 20:24:42 +1100<br>
<span style="font-weight:bold">To: </span><<a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a>><br>
<span style="font-weight:bold">Subject: </span>[Openstack] Running swift got stuck!<br>
</div>
<div><br>
</div>
Dear all,<br>
<br>
After I ran the command "swift -A <a href="http://127.0.0.1:5000/v2.0/" target="_blank">
http://127.0.0.1:5000/v2.0/</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.<br>
<br>
I have already used curl -i <a href="http://127.0.0.1:5000/v2.0/tokens">http://127.0.0.1:5000/v2.0/tokens</a> -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:<br>
{"access": {"token": {"expires": "2012-01-20T20:19:26.838644", "tenants": [{"id": "239624b0fdf14043b415224c7a2a4b02", "name": "demo-tenant"}], "<span style="color:rgb(255,0,0)">id": "09033fab-97c2-433f-a506-d3e623bf48b5</span>", "tenant": {"id": "239624b0fdf14043b415224c7a2a4b02",
 "name": "demo-tenant"}}, "serviceCatalog": [{"endpoints": [{"id": "1", "region": "RegionOne", "internalURL": "<a href="http://138.25.61.81:8774/v1.1/239624b0fdf14043b415224c7a2a4b02">http://138.25.61.81:8774/v1.1/239624b0fdf14043b415224c7a2a4b02</a>", "publicURL":
 "<a href="http://138.25.61.81:8774/v1.1/239624b0fdf14043b415224c7a2a4b02">http://138.25.61.81:8774/v1.1/239624b0fdf14043b415224c7a2a4b02</a>"}], "type": "compute", "name": "nova"}, {"endpoints": [{"id": "2", "region": "RegionOne", "internalURL": "<a href="http://138.25.61.81:9292/v1">http://138.25.61.81:9292/v1</a>",
 "publicURL": "<a href="http://138.25.61.81:9292/v1">http://138.25.61.81:9292/v1</a>"}], "type": "image", "name": "glance"},
<span style="color:rgb(255,0,0)">{"endpoints": [{"id": "3", "region": "RegionOne", "internalURL": "<a href="http://127.0.0.1:8888/v1/AUTH_239624b0fdf14043b415224c7a2a4b02">http://127.0.0.1:8888/v1/AUTH_239624b0fdf14043b415224c7a2a4b02</a>", "publicURL": "<a href="http://127.0.0.1:8888/v1/AUTH_239624b0fdf14043b415224c7a2a4b02">http://127.0.0.1:8888/v1/AUTH_239624b0fdf14043b415224c7a2a4b02</a>"}],
 "type": "object-store", "name": "swift"}</span>, {"endpoints": [{"id": "4", "region": "RegionOne", "internalURL": "<a href="http://138.25.61.81:5000/v2.0">http://138.25.61.81:5000/v2.0</a>", "publicURL": "<a href="http://138.25.61.81:5000/v2.0">http://138.25.61.81:5000/v2.0</a>"}],
 "type": "identity", "name": "keystone"}], "<span style="color:rgb(255,0,0)">user": {"id": "cccf764ca22d4abb96230c76ba08a219"</span>,
<span style="color:rgb(255,0,0)">"roles": [{"name": "Member", "id": "3", "tenantId": "239624b0fdf14043b415224c7a2a4b02"}], "name": "demo"}</span>}}<br>
<br>
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).<br>
<br>
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.
<br>
<br>
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).
<br>
I post the details of my data sample below:<br>
#!/bin/bash<br>
service keystone stop<br>
rm -f /var/lib/keystone/keystone.db<br>
service keystone start<br>
keystone-manage database version_control<br>
keystone-manage database goto 10<br>
<div class="im">keystone-manage database sync<br>
chown keystone:nogroup /var/lib/keystone/keystone.db<br>
</div>
keystone-manage tenant add admin-tenant<br>
keystone-manage user add admin secrete admin-tenant<br>
<div class="im">keystone-manage role add Admin<br>
keystone-manage role add KeystoneServiceAdmin<br>
</div>
keystone-manage role grant Admin admin admin-tenant<br>
keystone-manage role grant KeystoneServiceAdmin admin admin-tenant<br>
<div class="im">keystone-manage service add nova compute "Nova-Compute-Service"<br>
</div>
keystone-manage service add glance image "Glance-Image-Service"<br>
<span style="color:rgb(255,0,0)">keystone-manage service add swift object-store "Swift-Ojbect-Storage-Service"</span><br>
<div class="im">keystone-manage service add keystone identity "Keystone-Identity-Service"<br>
keystone-manage endpointTemplates add RegionOne nova <a href="http://138.25.61.81:8774/v1.1/%tenant_id%" target="_blank">
http://138.25.61.81:8774/v1.1/%tenant_id%</a> <a href="http://127.0.0.1:8774/v1.1/%tenant_id%" target="_blank">
http://127.0.0.1:8774/v1.1/%tenant_id%</a> <a href="http://138.25.61.81:8774/v1.1/%tenant_id%" target="_blank">
http://138.25.61.81:8774/v1.1/%tenant_id%</a> 1 1<br>
keystone-manage endpointTemplates add RegionOne glance <a href="http://138.25.61.81:9292/v1" target="_blank">
http://138.25.61.81:9292/v1</a> <a href="http://127.0.0.1:9292/v1" target="_blank">
http://127.0.0.1:9292/v1</a> <a href="http://138.25.61.81:9292/v1" target="_blank">
http://138.25.61.81:9292/v1</a> 1 1<br>
</div>
<span style="color:rgb(255,0,0)">keystone-manage endpointTemplates add RegionOne swift
<a href="http://127.0.0.1:8888/v1/AUTH_%tenant_id%" target="_blank">http://127.0.0.1:8888/v1/AUTH_%tenant_id%</a>
<a href="http://127.0.0.1:8888/v1.0/" target="_blank">http://127.0.0.1:8888/v1.0/</a>
<a href="http://127.0.0.1:8888/v1/AUTH_%tenant_id%" target="_blank">http://127.0.0.1:8888/v1/AUTH_%tenant_id%</a> 1 1</span><br>
<div class="im">keystone-manage endpointTemplates add RegionOne keystone <a href="http://138.25.61.81:5000/v2.0" target="_blank">
http://138.25.61.81:5000/v2.0</a> <a href="http://127.0.0.1:5001/v2.0" target="_blank">
http://127.0.0.1:5001/v2.0</a> <a href="http://138.25.61.81:5000/v2.0" target="_blank">
http://138.25.61.81:5000/v2.0</a> 1 1<br>
</div>
<div class="im"><span style="color:rgb(255,0,0)">keystone-manage token add 999888777666 admin admin-tenant 2015-02-05T00:00</span><br>
<span style="color:rgb(255,0,0)">keystone-manage tenant add demo-tenant</span><br style="color:rgb(255,0,0)">
</div>
<span style="color:rgb(255,0,0)">keystone-manage user add demo secrete demo-tenant</span><br style="color:rgb(255,0,0)">
<div class="im"><span style="color:rgb(255,0,0)">keystone-manage role add Member</span><br style="color:rgb(255,0,0)">
<span style="color:rgb(255,0,0)">keystone-manage role grant Member demo demo-tenant</span><br style="color:rgb(255,0,0)">
<span style="">keystone-manage role grant Admin admin demo-tenant</span><br>
</div>
<div class="im">keystone-manage endpoint add admin-tenant 1<br>
keystone-manage endpoint add admin-tenant 2<br>
keystone-manage endpoint add admin-tenant 3<br>
keystone-manage endpoint add admin-tenant 4<span><span style="background-color:rgb(255,0,0)"></span></span><br>
<span style="color:rgb(255,0,0)">keystone-manage endpoint add demo-tenant 1</span><br style="color:rgb(255,0,0)">
<span style="color:rgb(255,0,0)">keystone-manage endpoint add demo-tenant 2</span><br style="color:rgb(255,0,0)">
<span style="color:rgb(255,0,0)">keystone-manage endpoint add demo-tenant 3</span><br style="color:rgb(255,0,0)">
<span style="color:rgb(255,0,0)">keystone-manage endpoint add demo-tenant 4</span></div>
<font color="#000000"><br>
<br>
part of the swift-proxy.conf which is relevant to the ports:<br>
bind_port = <span style="color:rgb(255,0,0)">8888</span><br>
[filter:keystone]<br>
use = egg:keystone#tokenauth<br>
auth_protocol = http<br>
auth_host = 127.0.0.1<br>
auth_port = <span style="color:rgb(255,0,0)">5001 </span><br>
admin_token = 999888777666<br>
delay_auth_decision = 0<br>
service_protocol = http<br>
service_host = 127.0.0.1<br>
service_port = <span style="color:rgb(255,0,0)">5000 </span><br>
service_pass = dTpw<br>
<br>
But in most documentations, the auth_port is set to <span style="color:rgb(255,0,0)">
35357</span>, service_port is set to <span style="color:rgb(255,0,0)">8100</span>. So I'm not sure whether these settings matter.<br>
<br>
</font><font color="#000000">part of the keystone.conf which is relevant to the ports:</font><br>
service_host  = 127.0.0.1<br>
service_port = <span style="color:rgb(255,0,0)">5000</span>
<div class="im"><br>
admin_host = 127.0.0.1<br>
admin_port = <span style="color:rgb(255,0,0)">5001</span><br>
<br>
</div>
admin_port is usually set to <span><span style=""></span></span><span style="color:rgb(255,0,0)">35357</span> 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?<br>
<br>
Your help will be highly appreciated. <br>
Best wishes,<br>
Sean<br>
_______________________________________________ Mailing list: <a href="https://launchpad.net/~openstack">
https://launchpad.net/~openstack</a> Post to : <a href="mailto:openstack@lists.launchpad.net">
openstack@lists.launchpad.net</a> Unsubscribe : <a href="https://launchpad.net/~openstack">
https://launchpad.net/~openstack</a> More help : <a href="https://help.launchpad.net/ListHelp">
https://help.launchpad.net/ListHelp</a> </span>
</body>
</html>