Return-Path: X-Original-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1AE897149 for ; Tue, 1 Nov 2011 11:11:00 +0000 (UTC) Received: (qmail 41080 invoked by uid 500); 1 Nov 2011 11:11:00 -0000 Delivered-To: apmail-incubator-deltacloud-dev-archive@incubator.apache.org Received: (qmail 41062 invoked by uid 500); 1 Nov 2011 11:11:00 -0000 Mailing-List: contact deltacloud-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltacloud-dev@incubator.apache.org Delivered-To: mailing list deltacloud-dev@incubator.apache.org Received: (qmail 41054 invoked by uid 99); 1 Nov 2011 11:10:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 11:10:59 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mfojtik@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 11:10:53 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA1BAVdA029509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 1 Nov 2011 07:10:31 -0400 Received: from dhcp-29-121.brq.redhat.com (dhcp-29-121.brq.redhat.com [10.34.29.121]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pA1BATOt020983 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 1 Nov 2011 07:10:30 -0400 Subject: Re: [PATCH] Fix for bugzilla 725646 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=us-ascii From: Michal Fojtik In-Reply-To: <1320145123-5803-2-git-send-email-marios@redhat.com> Date: Tue, 1 Nov 2011 12:11:27 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1320145123-5803-1-git-send-email-marios@redhat.com> <1320145123-5803-2-git-send-email-marios@redhat.com> To: deltacloud-dev@incubator.apache.org X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Virus-Checked: Checked by ClamAV on apache.org On Nov 1, 2011, at 11:58 AM, marios@redhat.com wrote: ACK. -- Michal > From: marios >=20 > https://bugzilla.redhat.com/show_bug.cgi?id=3D725646 > 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. >=20 > Signed-off-by: marios > --- > server/lib/deltacloud/drivers/ec2/ec2_driver.rb | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) >=20 > diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb = b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb > index 753a2aa..dd52fa8 100644 > --- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb > +++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb > @@ -372,7 +372,8 @@ module Deltacloud > safely do > s3_client =3D new_client(credentials, :s3) > bucket_location =3D opts['location'] > - if (bucket_location && bucket_location.size >0) > + if (bucket_location && bucket_location.size >0 && > + (not = bucket_location.eql?(DEFAULT_REGION)) ) > bucket =3D Aws::S3::Bucket.create(s3_client, name, true, = nil, :location =3D> bucket_location) > else > bucket =3D Aws::S3::Bucket.create(s3_client, name, true) > --=20 > 1.7.6.4 >=20 ------------------------------------------------------ Michal Fojtik, mfojtik@redhat.com Deltacloud API: http://deltacloud.org