Revision history [back]

click to hide/show revision 1
initial version

swift and keystone integration problem

Hi there,

I am wondering if someone can help me about how to get swift and keystone work together?

The followings are the system set up

1) The instruction I followed is "Installing OpenStack Storage on Ubuntu", not SAIO http://docs.openstack.org/trunk/openstack-object-storage/admin/content/installing-openstack-object-storage-on-ubuntu.html

2) The OS is Ubuntu 12.04 64 LTS

3) Architecture:

I have 7 VMs on a single physical box. The physical box has CentOS 6.3, and VMs have Ubuntu 12.04
The followings are VM names and IP address, and description

 keystone, 192.168.1.154 , for authentication
 sproxy,     192.168.1.155, proxy server
 snode01,  192.168.1.156,  storage node 1
 snode02,  192.168.1.157,  storage node 2
 snode03,  192.168.1.158,  storage node 3
 snode04,  192.168.1.159, storage node 4
 snode05,  192.168.1.160, storage node 5

4) on keystone, i have the following created:

a) users:   swift and admin

b) tenants: admin and service

c) roles: Member, _member_, admin, KeystoneAdmin, KeystoneServiceAdmin

d) swift is added "service" tenant with "admin" role

e) services:   name: swift; type: object-store

f) end point: This part puzzles me. Some one used port 8888, someone used 8080. I guess if I use
   8888, in swift-proxy-server.conf, I need to set the port to be 8888 as well.

  another thing is about version "v1". Can I use "v2"?     But any way, I created the following endpoints for swift:

 +-------------+---------------------------------------------------+

| Property | Value | +-------------+----------------------------------------------------------------+ | adminurl | http://192.168.1.154:8888/v1 | | id | 878f926925634667b74f2053f616adfe | | internalurl | http://192.168.1.154:8888/v1/AUTH_%(tenant_id)s | | publicurl | http://192.168.1.154:8888/v1/AUTH_%(tenant_id)s | | region | RegionOne | | service_id | 1771a9ca06d34c4bbdcecdd6c8f865fd | +-------------+-----------------------------------------------------------------+

5) swift proxy-server.conf :

 The following is the settings. I got a few questions here

 question 1: user =swift. why swift? I got a user called swift in keystone, I got a user called swift in my Ubuntu OS

 question 2: admin_user=swift  How is this swift different from the one above?

 question 3: admin_tenant_name, should this one be "service" or "admin"?

[DEFAULT]

bind_port = 8888

user = swift

[pipeline:main]

pipeline = healthcheck cache authtoken keystoneauth proxy-server

....

auth_* settings refer to the Keystone server

auth_protocol = http

auth_host = 192.168.1.154

auth_port = 35357

the same admin_token as provided in keystone.conf

admin_token = ADMIN

the service tenant and swift userid and password created in Keystone

admin_tenant_name = service

admin_user = swift

admin_password = stack

6) add zones

The followings are part of scripts to add zones. My question for this part are the port numbers 6000, 6001, and 6002 are the same for different storage nodes. are these right?

#

zone 1 -- snode01

# swift-ring-builder account.builder add r1z1-192.168.1.156:6002/vdb1 100
swift-ring-builder container.builder add r1z1-192.168.1.156:6001/vdb1 100
swift-ring-builder object.builder add r1z1-192.168.1.156:6000/vdb1 100

#

zone 2 -- snode02


swift-ring-builder account.builder add r1z2-192.168.1.157:6002/vdb1 100
swift-ring-builder container.builder add r1z2-192.168.1.157:6001/vdb1 100
swift-ring-builder object.builder add r1z2-192.168.1.157:6000/vdb1 100

output of the script: (not sure why there is empty double quote after vdb1_"", will this cause problems?)

stack@sproxy:/etc/swift$ sudo ~/zn.bat
Device r1z1-192.168.1.156:6002/vdb1_"" with 100.0 weight got id 0
Device r1z1-192.168.1.156:6001/vdb1_"" with 100.0 weight got id 0
Device r1z1-192.168.1.156:6000/vdb1_"" with 100.0 weight got id 0
Device r1z2-192.168.1.157:6002/vdb1_"" with 100.0 weight got id 1
Device r1z2-192.168.1.157:6001/vdb1_"" with 100.0 weight got id 1
Device r1z2-192.168.19.157:6000/vdb1_"" with 100.0 weight got id 1
Device r1z3-192.168.1.158:6002/vdb1_"" with 100.0 weight got id 2
Device r1z3-192.168.1.158:6001/vdb1_"" with 100.0 weight got id 2
Device r1z3-192.168.1.158:6000/vdb1_"" with 100.0 weight got id 2
Device r1z4-192.168.1.159:6002/vdb1_"" with 100.0 weight got id 3
Device r1z4-192.168.1.159:6001/vdb1_"" with 100.0 weight got id 3
Device r1z4-192.168.1.159:6000/vdb1_"" with 100.0 weight got id 3
Device r1z5-192.168.1.160:6002/vdb1_"" with 100.0 weight got id 4
Device r1z5-192.168.1.160:6001/vdb1_"" with 100.0 weight got id 4
Device r1z5-192.168.1.160:6000/vdb1_"" with 100.0 weight got id 4

account.builder, build version 5
262144 partitions, 3.000000 replicas, 1 regions, 5 zones, 5 devices, 100.00 balance
The minimum number of hours before a partition can be reassigned is 1
Devices: id region zone ip address port name weight partitions balance meta
0 1 1 192.168.1.156 6002 vdb1 100.00 0-100.00
1 1 2 192.168.1.157 6002 vdb1 100.00 0-100.00
2 1 3 192.168.1.158 6002 vdb1 100.00 0-100.00
3 1 4 192.168.1.159 6002 vdb1 100.00 0-100.00
4 1 5 192.168.1.160 6002 vdb1 100.00 0-100.00

After reblance:
stack@sproxy:/etc/swift$ sudo swift-ring-builder object.builder
object.builder, build version 5
262144 partitions, 3.000000 replicas, 1 regions, 5 zones, 5 devices, 0.00 balance
The minimum number of hours before a partition can be reassigned is 1
Devices: id region zone ip address port name weight partitions balance meta
0 1 1 192.168.1.156 6000 vdb1 100.00 157286 -0.00
1 1 2 192.168.1.157 6000 vdb1 100.00 157286 -0.00
2 1 3 192.168.1.158 6000 vdb1 100.00 157287 0.00
3 1 4 192.168.1.159 6000 vdb1 100.00 157286 -0.00
4 1 5 192.168.1.160 6000 vdb1 100.00 157287 0.00

7) after completed the instructions, then start to verify
export ADMINPASS=stack
export OS_USERNAME=admin
export OS_PASSWORD=stack
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://192.168.1.154:35357/v2.0
swift stat

I got the following error: [Errno 111] ECONNEREFUSED Can someone help? I also changed
http://192.168.1.154:35357/v2.0 to http://192.168.1.154:5000/v2.0, failed as well.

swift and keystone integration problem

Hi there,

I am wondering if someone can help me about how to get swift and keystone work together?

The followings are following is the system set upup:

1) The instruction I followed is "Installing OpenStack Storage on Ubuntu", not SAIO SAIO: http://docs.openstack.org/trunk/openstack-object-storage/admin/content/installing-openstack-object-storage-on-ubuntu.html

2) The OS is Ubuntu 12.04 64 LTS

3) Architecture:

I have 7 VMs on a single physical box. The physical box has CentOS 6.3, and VMs have Ubuntu 12.04 The followings are VM names and IP address, and description description

 keystone, 192.168.1.154 , for authentication
 sproxy,     192.168.1.155, proxy server
 snode01,  192.168.1.156,  storage node 1
 snode02,  192.168.1.157,  storage node 2
 snode03,  192.168.1.158,  storage node 3
 snode04,  192.168.1.159, storage node 4
 snode05,  192.168.1.160, storage node 5

4) on keystone, i have the following created:

a) users:   swift and admin

b) tenants: admin and service

c) roles: Member, _member_, admin, KeystoneAdmin, KeystoneServiceAdmin

d) swift is added "service" tenant with "admin" role

e) services:   name: swift; type: object-store

f) end point: This part puzzles me. Some one used port 8888, someone used 8080. I guess if I use
   8888, in swift-proxy-server.conf, I need to set the port to be 8888 as well.

  another thing is about version "v1". Can I use "v2"?     But any way, I created the following endpoints for swift:

  +-------------+---------------------------------------------------+

| Property | Value | +-------------+----------------------------------------------------------------+ | adminurl | http://192.168.1.154:8888/v1 | | id | 878f926925634667b74f2053f616adfe | | internalurl | http://192.168.1.154:8888/v1/AUTH_%(tenant_id)s | | publicurl | http://192.168.1.154:8888/v1/AUTH_%(tenant_id)s | | region | RegionOne | | service_id | 1771a9ca06d34c4bbdcecdd6c8f865fd | +-------------+-----------------------------------------------------------------+

+-------------+-----------------------------------------------------------------+

5) swift proxy-server.conf :

 

The following is the settings. I got a few questions here here

question 1: user =swift. why swift? I got a user called swift in keystone, I got a user called swift in my Ubuntu OS OS

question 2: admin_user=swift How is this swift different from the one above? above?

question 3: admin_tenant_name, should this one be "service" or "admin"?

[DEFAULT]

"admin"?

[DEFAULT]

bind_port = 8888

8888 user = swift

[pipeline:main]

swift [pipeline:main] pipeline = healthcheck cache authtoken keystoneauth proxy-server

....

proxy-server .... # auth_* settings refer to the Keystone server

server auth_protocol = http

http auth_host = 192.168.1.154

192.168.1.154 auth_port = 35357

35357 # the same admin_token as provided in keystone.conf

keystone.conf admin_token = ADMIN

ADMIN # the service tenant and swift userid and password created in Keystone

Keystone admin_tenant_name = service

service admin_user = swift

swift admin_password = stack

stack

6) add zones

The followings are part of scripts to add zones. My question for this part are the port numbers 6000, 6001, and 6002 are the same for different storage nodes. are these right?

#

zone
#
#zone 1 -- snode01

snode01 # swift-ring-builder account.builder add r1z1-192.168.1.156:6002/vdb1 100
<br> swift-ring-builder container.builder add r1z1-192.168.1.156:6001/vdb1 100
<br> swift-ring-builder object.builder add r1z1-192.168.1.156:6000/vdb1 100

#

zone <br> # #zone 2 -- snode02


snode02 #<br> swift-ring-builder account.builder add r1z2-192.168.1.157:6002/vdb1 100
100<br> swift-ring-builder container.builder add r1z2-192.168.1.157:6001/vdb1 100
100<br> swift-ring-builder object.builder add r1z2-192.168.1.157:6000/vdb1 100

100<br>

output of the script: (not sure why there is empty double quote after vdb1_"", will this cause problems?)

stack@sproxy:/etc/swift$ sudo ~/zn.bat 
~/zn.bat Device r1z1-192.168.1.156:6002/vdb1_"" with 100.0 weight got id 0
0 Device r1z1-192.168.1.156:6001/vdb1_"" with 100.0 weight got id 0
0 Device r1z1-192.168.1.156:6000/vdb1_"" with 100.0 weight got id 0
0 Device r1z2-192.168.1.157:6002/vdb1_"" with 100.0 weight got id 1
1 Device r1z2-192.168.1.157:6001/vdb1_"" with 100.0 weight got id 1
1 Device r1z2-192.168.19.157:6000/vdb1_"" with 100.0 weight got id 1
1 Device r1z3-192.168.1.158:6002/vdb1_"" with 100.0 weight got id 2
2 Device r1z3-192.168.1.158:6001/vdb1_"" with 100.0 weight got id 2
2 Device r1z3-192.168.1.158:6000/vdb1_"" with 100.0 weight got id 2
2 Device r1z4-192.168.1.159:6002/vdb1_"" with 100.0 weight got id 3
3 Device r1z4-192.168.1.159:6001/vdb1_"" with 100.0 weight got id 3
3 Device r1z4-192.168.1.159:6000/vdb1_"" with 100.0 weight got id 3
3 Device r1z5-192.168.1.160:6002/vdb1_"" with 100.0 weight got id 4
4 Device r1z5-192.168.1.160:6001/vdb1_"" with 100.0 weight got id 4
4 Device r1z5-192.168.1.160:6000/vdb1_"" with 100.0 weight got id 4

4 account.builder, build version 5
5 262144 partitions, 3.000000 replicas, 1 regions, 5 zones, 5 devices, 100.00 balance
balance The minimum number of hours before a partition can be reassigned is 1
1 Devices: id region zone ip address port name weight partitions balance meta
meta 0 1 1 192.168.1.156 6002 vdb1 100.00 0-100.00
0-100.00 1 1 2 192.168.1.157 6002 vdb1 100.00 0-100.00
0-100.00 2 1 3 192.168.1.158 6002 vdb1 100.00 0-100.00
0-100.00 3 1 4 192.168.1.159 6002 vdb1 100.00 0-100.00
0-100.00 4 1 5 192.168.1.160 6002 vdb1 100.00 0-100.00

0-100.00

After reblance:

stack@sproxy:/etc/swift$ sudo swift-ring-builder object.builder
object.builder object.builder, build version 5
5 262144 partitions, 3.000000 replicas, 1 regions, 5 zones, 5 devices, 0.00 balance
balance The minimum number of hours before a partition can be reassigned is 1
1 Devices: id region zone ip address port name weight partitions balance meta
meta 0 1 1 192.168.1.156 6000 vdb1 100.00 157286 -0.00
-0.00 1 1 2 192.168.1.157 6000 vdb1 100.00 157286 -0.00
-0.00 2 1 3 192.168.1.158 6000 vdb1 100.00 157287 0.00
0.00 3 1 4 192.168.1.159 6000 vdb1 100.00 157286 -0.00
-0.00 4 1 5 192.168.1.160 6000 vdb1 100.00 157287 0.00

0.00

7) after completed the instructions, then start to verify

export ADMINPASS=stack
ADMINPASS=stack<br> export OS_USERNAME=admin
OS_USERNAME=admin export OS_PASSWORD=stack
OS_PASSWORD=stack export OS_TENANT_NAME=admin
OS_TENANT_NAME=admin export OS_AUTH_URL=http://192.168.1.154:35357/v2.0
OS_AUTH_URL=http://192.168.1.154:35357/v2.0 swift stat

I stat

**I got the following error: error:

[Errno 111] ECONNEREFUSED ECONNEREFUSED**

Can someone help? I also changed
http://192.168.1.154:35357/v2.0 to http://192.168.1.154:5000/v2.0, failed as well.