I was installing Openstack Liberty version. While doing the swift configuration it gave me below error,
Error
root@controller:~# swift stat
Authorization Failure. Authorization failed: An unexpected error prevented the server from fulfilling your request. (HTTP 500) (Request-ID: req-dc0f530c-e642-4b51-a742-f19567002e01)
I was surprised to get an authorization error even though I have provided the credentials. Later I figured out the problem was not with the credentials, but with the version of keystone which I was using.
Solution
In the keystone version 1.7.1 we also need a region set along with the other variables while souring the admin / user credentials. So I edited my admin-openrc.sh file and added the entry,
export OS_REGION_NAME=RegionOne
Now "#swift stat" gives me the output as expected.
root@controller:~# swift stat
Account: AUTH_9e7ef26465a34f6bb18d16ba5499ff20
Containers: 1
Objects: 0
Bytes: 0
Containers in policy "policy-0": 1
Objects in policy "policy-0": 0
Bytes in policy "policy-0": 0
X-Account-Project-Domain-Id: default
X-Timestamp: 1482851783.30541
X-Trans-Id: txdae1854e1a7847858e876-0058632946
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
Error
root@controller:~# swift stat
Authorization Failure. Authorization failed: An unexpected error prevented the server from fulfilling your request. (HTTP 500) (Request-ID: req-dc0f530c-e642-4b51-a742-f19567002e01)
I was surprised to get an authorization error even though I have provided the credentials. Later I figured out the problem was not with the credentials, but with the version of keystone which I was using.
Solution
In the keystone version 1.7.1 we also need a region set along with the other variables while souring the admin / user credentials. So I edited my admin-openrc.sh file and added the entry,
export OS_REGION_NAME=RegionOne
Now "#swift stat" gives me the output as expected.
root@controller:~# swift stat
Account: AUTH_9e7ef26465a34f6bb18d16ba5499ff20
Containers: 1
Objects: 0
Bytes: 0
Containers in policy "policy-0": 1
Objects in policy "policy-0": 0
Bytes in policy "policy-0": 0
X-Account-Project-Domain-Id: default
X-Timestamp: 1482851783.30541
X-Trans-Id: txdae1854e1a7847858e876-0058632946
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
No comments:
Post a Comment