gpt4 book ai didi

openstack-swift - Swift TempAuth 在 HEAD 帐户时返回 404

转载 作者:行者123 更新时间:2023-12-01 16:14:06 25 4
gpt4 key购买 nike

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

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

我希望能成功

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

最佳答案

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

allow_account_management = true
account_autocreate = true

关于openstack-swift - Swift TempAuth 在 HEAD 帐户时返回 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22042212/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com