Ceph S3 / 快速存储桶创建失败/错误 416



我在使用 S3 或 Swift 创建存储桶时收到 416 错误。如何解决这个问题?

swift -A http://ceph-4:7480/auth/1.0 -U testuser:swift -K 'BKtVrq1...' upload testas testas
Warning: failed to create container 'testas': 416 Requested Range Not Satisfiable: InvalidRange
Object PUT failed: http://ceph-4:7480/swift/v1/testas/testas 404 Not Found   b'NoSuchBucket'

还有 S3 python 测试:

 File "/usr/lib/python2.7/dist-packages/boto/s3/connection.py", line 621, in create_bucket
    response.status, response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 416 Requested Range Not Satisfiable
<?xml version="1.0" encoding="UTF-8"?><Error><Code>InvalidRange</Code><BucketName>mybucket</BucketName><RequestId>tx00000000000000000002a-005a69b12d-1195-default</RequestId><HostId>1195-default-default</HostId></Error>

这是我的头孢状态:

cluster:
    id:     1e4bd42a-7032-4f70-8d0c-d6417da85aa6
    health: HEALTH_OK
  services:
    mon: 3 daemons, quorum ceph-2,ceph-3,ceph-4
    mgr: ceph-1(active), standbys: ceph-2, ceph-3, ceph-4
    osd: 3 osds: 3 up, 3 in
    rgw: 2 daemons active
  data:
    pools:   7 pools, 296 pgs
    objects: 333 objects, 373 MB
    usage:   4398 MB used, 26309 MB / 30708 MB avail
    pgs:     296 active+clean

我正在使用带有蓝存储的CEPH Luminous构建

ceph version 12.2.2 (cf0baeeeeba3b47f9427c6c97e2144b094b7e5ba) luminous (stable)

用户创建:

sudo radosgw-admin user create --uid="testuser" --display-name="First User"
sudo radosgw-admin subuser create --uid=testuser --subuser=testuser:swift --access=full
sudo radosgw-admin key create --subuser=testuser:swift --key-type=swift --gen-secret

osd 上的日志:

2018-01-25 12:19:45.383298 7f03c77c4700  1 ====== starting new request req=0x7f03c77be1f0 =====
2018-01-25 12:19:47.711677 7f03c77c4700  1 ====== req done req=0x7f03c77be1f0 op status=-34 http_status=416 ======
2018-01-25 12:19:47.711937 7f03c77c4700  1 civetweb: 0x55bd9631d000: 192.168.109.47 - - [25/Jan/2018:12:19:45 +0200] "PUT /mybucket/ HTTP/1.1" 1 0 - Boto/2.38.0 Python/2.7.12 Linux/4.4.0-51-generic

Linux ubuntu, 4.4.0-51-generic

默认pg_num和pgp_num设置为较低的值(例如8(,或在ceph.conf中将mon_max_pg_per_osd设置为较高的值

相关内容

  • 没有找到相关文章

最新更新