Closed r-b-g-b closed 6 years ago
this reproduces
$ virtualenv boto3_test -p python2
$ source boto3_test/bin/activate
$ git clone https://github.com/gallantlab/cottoncandy
$ cd cottoncandy
$ pip install -r requirements.txt
## installs boto3-1.4.4 botocore-1.5.86
$ pip install .
$ python
>> import cottoncandy as cc
>> cc.get_interface('robertg_sorcery')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cottoncandy/__init__.py", line 72, in get_interface
**kwargs)
File "cottoncandy/interfaces.py", line 1308, in __init__
super(DefaultInterface, self).__init__(*args, **kwargs)
File "cottoncandy/interfaces.py", line 928, in __init__
super(FileSystemInterface, self).__init__(*args, **kwargs)
File "cottoncandy/interfaces.py", line 485, in __init__
super(ArrayInterface, self).__init__(*args, **kwargs)
File "cottoncandy/interfaces.py", line 96, in __init__
**kwargs)
File "cottoncandy/s3client.py", line 67, in __init__
if self.check_bucket_exists(bucket):
File "cottoncandy/s3client.py", line 141, in check_bucket_exists
raise e
botocore.exceptions.ClientError: An error occurred (400) when calling the HeadBucket operation: Bad Request
and from here this fixes
>> quit()
$ pip install boto3==1.3.1
...
$ python
>> import cottoncandy as cc
>> cc.get_interface()
that works fine.
Not sure what to make of this. The travis build has that configuration and it's fine (boto3 1.4.4 and botocore 1.5.68): https://travis-ci.org/gallantlab/cottoncandy/jobs/243060408
Ha botocore==1.5.68
works but 1.5.86
does not. That's lame
interesting, I wonder what has changed here between versions:
self.connection.meta.client.head_bucket(Bucket = bucket_name)
ok to pinpoint this a little better: botocore==1.5.70
works, botocore==1.5.71
fails.
from botocore CHANGELOG.rst
1.5.71
seems botocore changed the default signature. this issue is therefore likely signature v4 implementation with radosgw / ceph.
the call signature for client.head_bucket(Bucket = bucket_name)
might need to be changed to specify additional arguments (signature v2). this can be added to configuration options.
refs: https://github.com/fog/fog/issues/3299 http://tracker.ceph.com/issues/17076 http://tracker.ceph.com/issues/10333
Try this:
import cottoncandy as cc
from botocore.client import Config
config = Config(s3={'addressing_style': 'path'}, signature_version='s3')
cci = cc.get_interface(config=config)
I'm gonna close it b/c it's a combination of user error and radosgw, not boto, botocore.
I was getting this strange error upon installing cottoncandy in a fresh virtualenv. Downgrading
boto3
-->boto3==1.3.1
(which also downgradesbotocore==1.5.86
-->botocore==1.4.93
) fixed it. I'll try to look into why when I get a chance. But that sucks.