Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Ceph S3 Outscale storage driver fixes #792
pushed a commit
this pull request
May 22, 2016
I've added some additional asserts (084ce3c) and merged changes into trunk. I believe there is still a bug with they way the host is handled though:
.... self.driver_v2 = self.driver_type(*self.driver_args, signature_version='2', host='host1') self.driver_v4 = self.driver_type(*self.driver_args, signature_version='4', host='host2') print self.driver_v2.connectionCls.host print self.driver_v4.connectionCls.host
And when running it:
As you can see, the host argument is ignored. That's probably because when
It would be great if you can look into it and also add corresponding tests (I didn't include those tests in the commit so it would cause the build to fail). When working on a fix, you can start with a failing test case :)
Thanks @Kami I reviewed the test case and I think it is working as expected. The Outscale driver maps valid Outscale regions to the Outscale hosts. It should not let arbitrary hosts.
In this case, if you don't add any explicit valid region the Outscale driver works with the default region and it assigns the default host 'osu.eu-west-2.outscale.com'. The default region/host is the same for AWS2 and AWS4. It is the reason to see the same default host twice.
You can have a look in this line https://github.com/apache/libcloud/blob/trunk/libcloud/storage/drivers/rgw.py#L116
Maybe it makes sense raising an expection when host is not none? Something similar to:
if region not in S3_RGW_OUTSCALE_HOSTS_BY_REGION: raise LibcloudError('Unknown region (%s)' % (region), driver=self) if host is not None: raise LibcloudError('This driver does not accept arbitrary host', driver=self) host = S3_RGW_OUTSCALE_HOSTS_BY_REGION[region]