-
Notifications
You must be signed in to change notification settings - Fork 924
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
Ceph S3 Outscale storage driver fixes #792
Conversation
- Simplify the Outscale driver - Remove unused Outscale connection classes - Fix default signature v2 issue with the Outscale driver Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
@jmunhoz Thanks! Can you please also add some tests - at least the one which instantiate both drivers and verify that host, etc. on the connection class is set correctly (this should be easy to do and be a bare minimum). |
e7958fa
to
da03572
Compare
- Basic testing support covering RGW/Outscale storage drivers Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
da03572
to
f7eba95
Compare
@Kami I pushed some test cases covering both drivers. |
- Basic testing support covering RGW/Outscale storage drivers Closes #792 Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Tomaz Muraus <tomaz@tomaz.me>
Thanks. 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: osu.eu-west-2.outscale.com
osu.eu-west-2.outscale.com 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] |
Signed-off-by: Javier M. Mellid jmunhoz@igalia.com