You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by ma...@redhat.com on 2012/08/13 16:09:34 UTC
[PATCH] Fixes DTACLOUD_300 ProviderError - bad URI accessing us-east buckets from other endpoints
From: marios <ma...@redhat.com>
https://issues.apache.org/jira/browse/DTACLOUD-300
Signed-off-by: marios <ma...@redhat.com>
---
server/lib/deltacloud/drivers/ec2/ec2_driver.rb | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
index 79dd9d2..b4e8942 100644
--- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
+++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
@@ -459,6 +459,7 @@ module Deltacloud
def delete_bucket(credentials, name, opts={})
s3_client = new_client(credentials, :s3)
+ s3_bucket, s3_client = get_bucket_with_endpoint(s3_client, credentials, name)
safely do
s3_client.interface.delete_bucket(name)
end
@@ -827,7 +828,7 @@ module Deltacloud
def get_bucket_with_endpoint(s3_client, credentials, s3_bucket_name)
s3_bucket = s3_client.bucket(s3_bucket_name)
- endpoint_for_bucket = Deltacloud::Drivers::driver_config[:ec2][:entrypoints]["s3"]["#{s3_bucket.location}"]
+ endpoint_for_bucket = Deltacloud::Drivers::driver_config[:ec2][:entrypoints]["s3"]["#{s3_bucket.location}"] || "s3.amazonaws.com"
if (s3_client.interface.params[:server] != endpoint_for_bucket)
s3_client = new_client(credentials, :s3, endpoint_for_bucket)
s3_bucket = s3_client.bucket(s3_bucket_name)
--
1.7.6.5
Re: [PATCH] Fixes DTACLOUD_300 ProviderError - bad URI accessing
us-east buckets from other endpoints
Posted by David Lutterkort <lu...@redhat.com>.
On Mon, 2012-08-13 at 17:09 +0300, marios@redhat.com wrote:
> From: marios <ma...@redhat.com>
>
> https://issues.apache.org/jira/browse/DTACLOUD-300
>
> Signed-off-by: marios <ma...@redhat.com>
ACK. Pushed it for you.
David