Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

Disable EC2 Public Address lookup #1

Open
joshjdevl opened this issue Aug 1, 2014 · 4 comments
Open

Disable EC2 Public Address lookup #1

joshjdevl opened this issue Aug 1, 2014 · 4 comments

Comments

@joshjdevl
Copy link

Is there a particular reason that when starting the storm cluster it is trying to access http://169.254.169.254/latest/meta-data/public-ipv4 ? This is the URL for EC2 instances to lookup their Public DNS address. Though why is it running automatically?

@yanhan
Copy link
Contributor

yanhan commented Aug 2, 2014

Hi joshjdevl, the reason is that we were using Amazon EC2 instances to test out the storm-docker project and the public IP addresses of Amazon EC2 instances can only be accurately determined using the link you pasted. These 3 parts of the code should clarify things a little:

ec2PublicIp = ec2_get_ip(public=True)

ec2PrivateIp = ec2_get_ip(public=False)

def ec2_get_ip(public=True):

You do have a point though - this is redundant when the machines involved are not on Amazon EC2. I could work on a patch to turn this on/off but the earliest I can start doing that will be this coming Monday.

Thanks for your interest in the storm-docker project =)

@joshjdevl
Copy link
Author

Hi,

Thanks, an option would be nice. When I run this on a non ec2 machine it fails to startup. For now, I have deleted the lines of code.

yanhan pushed a commit that referenced this issue Aug 6, 2014
This partially addresses #1

Disabling the running of the `curl` command is done by setting the
`all_machines_are_ec2_instances` field in the `config/storm-setup.yaml`
file to False or omitting the field.

Signed-off-by: Pang Yan Han <[email protected]>
@yanhan
Copy link
Contributor

yanhan commented Aug 6, 2014

Hi joshjdevl, I've just committed a patch that partially resolves this issue: 2ca3a4f

Simple set the all_machines_are_ec2_instances in your config/storm-setup.yaml file to False. Omitting this key from config/storm-setup.yaml will default it to False as well. There is additional documentation in the config/storm-setup.yaml.sample file:

all_machines_are_ec2_instances: False

Tell me what you think of this change.

@joshjdevl
Copy link
Author

Yes, this appears to work. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants