error on keystone configure two object-store service

asked 2014-02-28 17:56:53 -0500

lucky88 gravatar image

Following "OpenStack installation guide for Ubunut 12.04 LTS" i have configured a network of virtual machine with keystone e swift services. I have configured swift to use keystone service for authentication.All work perfectly. The problem has arisen when trying to configure a second swift service on keystone. On key stone i have create the two swift services called "swift" and "swift2" both with type property set set to the value "object-store". I set the endpoints for both services: "http://proxyserver1:8080/v1/AUTH_%(tenant_id)s" for first swift service and "http://proxyserver2:8080/v1/AUTH_%(tenant_id)s" for the second. For each swift service i have created a user with role "admin" and both belonging to same tenant "service". When i try to authenticate a user on keystone using:

curl -s -d   '{"auth": {"tenantName": "service", "passwordCredentials": {"username": "swift", "password": "PASSWORD"}}}'   -H 'Content-type: application/json'   http://identity-manager:5000/v2.0/tokens

i receive a response with a incorrect serviceCatalog array. It contains only two endpoints: endpoints for keystone itself and one for an object-store service. So is missing one object-store service endpoint. Moreover the endpoits for the only object-store service returned is wrong because is a property mix of the two object-store service:

"endpoints": [
                    {
                        "adminURL": "http://proxyserver2:8080",
                        "region": "regionOne",
                        "internalURL": "http://proxyserver1:8080/v1/AUTH_74eb7b8a36f64105a7d77fe00a2b6d41",
                        "id": "0d30428e6a2d4035baf1c84401c8ff1b",
                        "publicURL": "http://proxyserver1:8080/v1/AUTH_74eb7b8a36f64105a7d77fe00a2b6d41"
                    }
                ],
                "endpoints_links": [],
                "type": "object-store",
                "name": "swift2"
            }

My question is whether it is possible to configure two swift cluster on keystone. If the answer is yes, where i could have been wrong?

edit retag flag offensive close merge delete

Comments

Are you using same service-id for both ? Hope they are different. Can you use different regionName while creating the second swift endpoint. This may work for you.

dheeru gravatar imagedheeru ( 2014-03-02 22:40:07 -0500 )edit

I was able to solve the problem using different service id and different region for the two endpoint, different type property for the two swift service. The endpoints data that i posted refer to the situation with two endpoint with different service id.

lucky88 gravatar imagelucky88 ( 2014-03-03 10:42:48 -0500 )edit

Did not quite following what you are asking here.

dheeru gravatar imagedheeru ( 2014-03-03 11:47:06 -0500 )edit