2012年3月31日 星期六

OpenStack Swift with swauth, Auth subsystem prep failed: 400 Bad Request

Was mudding around with Openstack Swift recently and found that there are quite a lot of issue to get it working.

One issue I come across today is the inability to run swauth-prep to set up the account environment on my swift-proxy (version 1.4.6).

root@proxy ~/s3-curl# swauth-prep  -A https://127.0.0.1:8080/auth/v1 -K swauthkey
Auth subsystem prep failed: 400 Bad Request


Keep googling but dont have much finding. When I was stucked, i keep reading their online forum and then I come across an article saying the correct URL for swauth-prep should be on /auth/ instead of /auth/v1. So I changed the admin URL to

root@proxy:~/s3-curl# swauth-prep  -A https://127.0.0.1:8080/auth/ -K swauthkey
root@proxy:~/s3-curl# swauth-list -A https://127.0.0.1:8080/auth/ -K swauthkey
{"accounts": [{"name": "system"}]}


And then viola, it works.


** BTW ** Chances that it is either swift storage permission problem or it is indicating a connection problem between swauth and swift nodes.

Below syslog error would indicate a connection issue between swauth node and swift storage nodes.

May  3 00:07:47 swift-proxy swift ERROR with Account server 192.168.0.11:6002/vdb1 re: Trying to PUT /AUTH_.auth: Connection refused
May  3 00:07:47 swift-proxy swift ERROR with Account server 192.168.0.12:6002/vdb1 re: Trying to PUT /AUTH_.auth: Connection refused
May  3 00:07:47 swift-proxy swift ERROR with Account server 192.168.0.13:6002/vdb1 re: Trying to PUT /AUTH_.auth: Connection refused
May  3 00:07:47 swift-proxy swift Account PUT returning 503 for (503, 503, 503) (txn: tx79ff210a2f5249989abecb8319a64126)

In above scenario, I checked my configuration and found that there is a discrepancy on port settings between rings file and swift node configuration files (object-server.conf / account-server.conf / container-server.conf)

沒有留言:

張貼留言