[ 
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 "[EMAIL PROTECTED]" "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.

Reply via email to