Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 10367 invoked from network); 20 Jun 2008 03:14:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jun 2008 03:14:45 -0000 Received: (qmail 88849 invoked by uid 500); 20 Jun 2008 03:14:45 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 88815 invoked by uid 500); 20 Jun 2008 03:14:45 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 88804 invoked by uid 99); 20 Jun 2008 03:14:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2008 20:14:45 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jun 2008 03:13:56 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E4095234C144 for ; Thu, 19 Jun 2008 20:13:44 -0700 (PDT) Message-ID: <1519147274.1213931624929.JavaMail.jira@brutus> Date: Thu, 19 Jun 2008 20:13:44 -0700 (PDT) From: "Al Hoang (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Updated: (HADOOP-3605) Added an abort on unset AWS_ACCOUNT_ID to luanch-hadoop-master In-Reply-To: <1165352326.1213931504973.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-3605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Al Hoang updated HADOOP-3605: ----------------------------- Attachment: abort-launch-if-aws-account-id-not-set.diff This is the diff file for patching launch-hadoop-master. I have patched this against the latest Hadoop Release 0.17.0 but from checking trunk it should be about the same > Added an abort on unset AWS_ACCOUNT_ID to luanch-hadoop-master > -------------------------------------------------------------- > > Key: HADOOP-3605 > URL: https://issues.apache.org/jira/browse/HADOOP-3605 > Project: Hadoop Core > Issue Type: Improvement > Components: contrib/ec2 > Affects Versions: 0.17.0 > Environment: Fedora 9 Core Linux with openjdk-1.6.0 > Hadoop 0.17.0 > Reporter: Al Hoang > Priority: Minor > Attachments: abort-launch-if-aws-account-id-not-set.diff > > Original Estimate: 0.02h > Remaining Estimate: 0.02h > > I wanted to test out playing with the ec2 contributed shell scripts to kick off a Hadoop EC2 cluster however I found that without a set AWS_ACCOUNT_ID the script would still continue to run but not properly set the authorization groups due to the lack of an AWS Account ID parameter. > I have attached a quick patch to launch-hadoop-master to double check the existence of AWS_ACCOUNT_ID and abort the script as early as possible and present a useful error message to the user. > Below is the pach in cut and paste > --- hadoop-0.17.0/src/contrib/ec2/bin/launch-hadoop-master 2008-05-15 16:20:14.000000000 +0900 > +++ hadoop-0.17.0-modified/src/contrib/ec2/bin/launch-hadoop-master 2008-06-20 11:58:59.000000000 +0900 > @@ -29,6 +29,12 @@ > bin=`cd "$bin"; pwd` > . "$bin"/hadoop-ec2-env.sh > > +if [ -z $AWS_ACCOUNT_ID ]; then > + echo "AWS_ACCOUNT_ID is not configured properly! Please check" > + echo "AWS_ACCOUNT_ID: $AWS_ACCOUNT_ID" > + exit -1 > +fi > + > echo "Testing for existing master in group: $CLUSTER" > MASTER_EC2_HOST=`ec2-describe-instances | awk '"RESERVATION" == $1 && "'$CLUSTER_MASTER'" == $4, "RESERVATION" == $1 && "'$CLUSTER_MASTER'" != $4'` > MASTER_EC2_HOST=`echo "$MASTER_EC2_HOST" | awk '"INSTANCE" == $1 && "running" == $6 {print $4}'` > @@ -108,4 +114,4 @@ > ssh $SSH_OPTS "root@$MASTER_EC2_HOST" "chmod 600 /root/.ssh/id_rsa" > > MASTER_IP=`dig +short $MASTER_EC2_HOST` > -echo "Master is $MASTER_EC2_HOST, ip is $MASTER_IP, zone is $MASTER_EC2_ZONE." > \ No newline at end of file > +echo "Master is $MASTER_EC2_HOST, ip is $MASTER_IP, zone is $MASTER_EC2_ZONE." -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.