swift3 return InvalidBucketName instead of NoSuchBucket
Bug #945937 reported by
Chmouel Boudjnah
This bug affects 1 person
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Chmouel Boudjnah | ||
Bug Description
While testing euca-upload-bundle it seems that swift3 return InvalidBucketName for a 404 instead of a NoSuchBucket :
+ euca-upload-bundle -b testbucket -m /tmp/bundle.
Checking bucket: testbucket
S3ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>
<Message>The specified bucket is not valid</Message>
</Error>
Swift Log
swift 212.64.151.104 212.64.151.104 03/Mar/
| Changed in swift: | |
| assignee: | nobody → Chmouel Boudjnah (chmouel) |
| summary: |
- swift3: InvalidBucketName should come back with 404 not 400 + swift3 return InvalidBucketName instead of NoSuchBucket |
| description: | updated |
| Changed in swift: | |
| milestone: | none → 1.4.8 |
| status: | Fix Committed → Fix Released |
To post a comment you must log in.

FYI: I am using this code :
except S3ResponseError, s3error:
s3error_ string = '%s' % s3error string. find('404' ) >= 0:
try:
print 'Creating bucket:', self.bucket
bucket_ instance = s3conn. create_ bucket( self.bucket,
policy= acl,
location= location)
except S3CreateError:
msg = 'Unable to create bucket %s' % self.bucket
self. display_ error_and_ exit(msg) string. find('403' ) >= 0:
self. display_ error_and_ exit(msg)
if s3error_
elif s3error_
msg = 'You do not have permission to access bucket:', self.bucket
from euca2ools/ commands/ euca/uploadbund le.py , I don't have an AMAZON s3 account so can't test directly with whatever they implemented.