deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1195950 - /incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
Date Tue, 01 Nov 2011 12:14:22 GMT
Author: marios
Date: Tue Nov  1 12:14:21 2011
New Revision: 1195950

URL: http://svn.apache.org/viewvc?rev=1195950&view=rev
Log:
Fix for bugzilla 725646

https://bugzilla.redhat.com/show_bug.cgi?id=725646
When you create a bucket in the default region 'us-east-1', specifying the
bucket location as 'us-east-1' causes S3 to return an error. Check if location
is 'us-east-1' and if so remove this param before calling to S3.

Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb?rev=1195950&r1=1195949&r2=1195950&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb Tue Nov  1
12:14:21 2011
@@ -372,7 +372,8 @@ module Deltacloud
           safely do
             s3_client = new_client(credentials, :s3)
             bucket_location = opts['location']
-            if (bucket_location && bucket_location.size >0)
+            if (bucket_location && bucket_location.size >0 &&
+                                               (not bucket_location.eql?(DEFAULT_REGION))
)
               bucket = Aws::S3::Bucket.create(s3_client, name, true, nil, :location =>
bucket_location)
             else
               bucket = Aws::S3::Bucket.create(s3_client, name, true)



Mime
View raw message