当HEAD帐户时,Swift TempAuth返回404

时间:2014-02-26 13:01:00

标签: openstack-swift

我是Swift的新手,但是正试图在我的CentOS 6.5 VM上安装它。我做完了

  1. 安装持续的Swift版本(1.12.0)和python-swiftclient (2.0.2)及其依赖项
  2. xfs
  3. 准备并安装我的驱动器(格式为/svr/node/d1的分离设备)
  4. 创建环并将设备添加到环(帐户,容器,对象)
  5. 构建环,为每个环生成一个.ring.gz文件。将它们放在/ etc / swift
  6. 为代理
  7. 配置hash_path_prefix
  8. 设置TempAuth并添加密码为'myaccount:me'
  9. 的新用户'pa'
  10. 启动代理和帐户。
  11. 我希望能成功地做到

    swift -A http://localhost:8080/auth/v1.0 -U myaccount:me -K pa stat
    

    但命令告诉我'未找到帐户'。为了查看详细信息,我做了

    swift --debug -v -A http://localhost:8080/auth/v1.0 -U myaccount:me -K pa stat
    

    输出是 INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost DEBUG:requests.packages.urllib3.connectionpool:"GET /auth/v1.0 HTTP/1.1" 200 0 DEBUG:swiftclient:REQ: curl -i http://localhost:8080/auth/v1.0 -X GET DEBUG:swiftclient:RESP STATUS: 200 OK DEBUG:swiftclient:RESP HEADERS: [('content-length', '0'), ('x-trans-id', 'tx88b6b6b71ec14c3393248-00530de039'), ('x-auth-token', 'AUTH_tkdc7e842046e9469da324f2ec82c80a92'), ('x-storage-token', 'AUTH_tkdc7e842046e9469da324f2ec82c80a92'), ('date', 'Wed, 26 Feb 2014 12:38:17 GMT'), ('x-storage-url', 'http://localhost:8080/v1/AUTH_myaccount'), ('content-type', 'text/html; charset=UTF-8')] INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost DEBUG:requests.packages.urllib3.connectionpool:"HEAD /v1/AUTH_myaccount HTTP/1.1" 404 0 INFO:swiftclient:REQ: curl -i http://localhost:8080/v1/AUTH_myaccount -I -H "X-Auth-Token: AUTH_tkdc7e842046e9469da324f2ec82c80a92" INFO:swiftclient:RESP STATUS: 404 Not Found INFO:swiftclient:RESP HEADERS: [('date', 'Wed, 26 Feb 2014 12:38:17 GMT'), ('content-length', '0'), ('content-type', 'text/html; charset=UTF-8'), ('x-trans-id', 'tx553c40e63c69470e9d146-00530de039')] ERROR:swiftclient:Account HEAD failed: http://localhost:8080:8080/v1/AUTH_myaccount 404 Not Found Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 1192, in _retry rv = func(self.url, self.token, *args, **kwargs) File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 469, in head_account http_response_content=body) ClientException: Account HEAD failed: http://localhost:8080:8080/v1/AUTH_myaccount 404 Not Found Account not found

    这里没有线索。任何的想法?先谢谢!

1 个答案:

答案 0 :(得分:2)

我想出了自己:在proxy-server.conf中,添加这两行

allow_account_management = true
account_autocreate = true