Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw/multisite: validate bucket location during bucket creation #15333

Merged
merged 3 commits into from Jun 19, 2017

Commits on Jun 18, 2017

  1. rgw: fix bucket location s3 compatible issue

    create bucket with location constraint doesn't exist in AWS S3
    will response like the following:
    
    {'data': '<?xml version="1.0" encoding="UTF-8"?>\n
    <Error><Code>InvalidLocationConstraint</Code>
    <Message>The specified location-constraint is not valid</Message>
    <LocationConstraint>ap-southeast-4</LocationConstraint>
    <RequestId>15D886DFEF49765A</RequestId>
    <HostId>IroSlmBZq7iSluYIgea7y+72OXbOSmjX2eVYING0tUuGR8BAHLcYPOgUWUIJUuG1z/1FhfaxJUo=</HostId></Error>',
     'headers': {'connection': 'close',
                 'content-type': 'application/xml',
                 'date': 'Thu, 25 May 2017 03:45:49 GMT',
                 'server': 'AmazonS3',
                 'transfer-encoding': 'chunked',
                 'x-amz-id-2': 'IroSlmBZq7iSluYIgea7y+72OXbOSmjX2eVYING0tUuGR8BAHLcYPOgUWUIJUuG1z/1FhfaxJUo=',
                 'x-amz-request-id': '15D886DFEF49765A'},
     'reason': 'Bad Request',
     'status': 400}
    
    Signed-off-by: Jiaying Ren <jiaying.ren@umcloud.com>
    Jiaying Ren committed Jun 18, 2017
    Copy the full SHA
    db13592 View commit details
    Browse the repository at this point in the history
  2. rgw/multisite: unify zg is_master judge

    Signed-off-by: Jiaying Ren <jiaying.ren@umcloud.com>
    Jiaying Ren committed Jun 18, 2017
    Copy the full SHA
    96db3d7 View commit details
    Browse the repository at this point in the history
  3. rgw/multisite: check location constraint existness

    to match the behavior of AWS S3
    
    Signed-off-by: Jiaying Ren <jiaying.ren@umcloud.com>
    Jiaying Ren committed Jun 18, 2017
    Copy the full SHA
    25e4d1e View commit details
    Browse the repository at this point in the history