Return-Path: Delivered-To: apmail-hadoop-common-dev-archive@www.apache.org Received: (qmail 49478 invoked from network); 29 Apr 2010 11:00:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Apr 2010 11:00:22 -0000 Received: (qmail 14547 invoked by uid 500); 29 Apr 2010 11:00:21 -0000 Delivered-To: apmail-hadoop-common-dev-archive@hadoop.apache.org Received: (qmail 14280 invoked by uid 500); 29 Apr 2010 11:00:17 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 14264 invoked by uid 99); 29 Apr 2010 11:00:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Apr 2010 11:00:16 +0000 X-ASF-Spam-Status: No, hits=-1365.4 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Apr 2010 11:00:15 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3TAxsq2027736 for ; Thu, 29 Apr 2010 10:59:54 GMT Message-ID: <377177.3071272538794759.JavaMail.jira@thor> Date: Thu, 29 Apr 2010 06:59:54 -0400 (EDT) From: "Joni Niemi (JIRA)" To: common-dev@hadoop.apache.org Subject: [jira] Created: (HADOOP-6734) Jets3tNativeFileSystemStore wrongly calls S3Service.createBucket during initialisation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Jets3tNativeFileSystemStore wrongly calls S3Service.createBucket during initialisation -------------------------------------------------------------------------------------- Key: HADOOP-6734 URL: https://issues.apache.org/jira/browse/HADOOP-6734 Project: Hadoop Common Issue Type: Bug Components: fs/s3 Affects Versions: 0.18.3 Environment: S3 Europe Reporter: Joni Niemi Reason: If a bucket is created with CreateBucketConfiguration specified, s3service.createBucket will fail. Symptoms: If a bucket has CreateBucketConfiguration, Jets3tNativeFileSystemStore will fail with BucketAlreadyOwnedByYou Error. A detailed descrioption from a blog (http://john.keyes.ie/boto-create_bucket-bucketalreadyownedbyyou-error/) {quote}This evening I encountered a problem with it though. When the bucket did not exist, the method behaved as expected. When the bucket did exist though I received the following error response: {code} BucketAlreadyOwnedByYou Your previous request to create the named bucket succeeded and you already own it. ... {code} This problem only manifests itself with buckets that are hosted in the EU. If the bucket is created in the US then the create_bucket method behaves as described. For buckets created with a , you will receive an error if you attempt to recreate the same bucket. To create a bucket in the EU, the bucket is created with a CreateBucketConfiguration specified. I now use the following code to avoid the problem and it works for both US and EU buckets. {code} def get_bucket(): try: bucket = conn.get_bucket('xxx', validate=True) except S3ResponseError, e: if e.code == "NoSuchBucket": bucket = conn.create_bucket('xxx', location='EU') else: raise e return bucket {code} {quote} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.