From common-dev-return-75113-apmail-hadoop-common-dev-archive=hadoop.apache.org@hadoop.apache.org Tue Apr 12 22:18:48 2011 Return-Path: Delivered-To: apmail-hadoop-common-dev-archive@www.apache.org Received: (qmail 39822 invoked from network); 12 Apr 2011 22:18:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Apr 2011 22:18:47 -0000 Received: (qmail 55119 invoked by uid 500); 12 Apr 2011 22:18:46 -0000 Delivered-To: apmail-hadoop-common-dev-archive@hadoop.apache.org Received: (qmail 55073 invoked by uid 500); 12 Apr 2011 22:18:46 -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 55062 invoked by uid 99); 12 Apr 2011 22:18:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 22:18:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 22:18:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AF0DB9EF1B for ; Tue, 12 Apr 2011 22:18:05 +0000 (UTC) Date: Tue, 12 Apr 2011 22:18:05 +0000 (UTC) From: "Tom White (JIRA)" To: common-dev@hadoop.apache.org Message-ID: <615309942.53587.1302646685713.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (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 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-6734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom White resolved HADOOP-6734. ------------------------------- Resolution: Duplicate > 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. For more information on JIRA, see: http://www.atlassian.com/software/jira