Calling ec2metadata seems to be causing issues on some machines. Changes detection to just work by detecting if it's there.

This commit is contained in:
emcho 2014-03-02 02:37:44 +00:00
parent ed46200858
commit 945dcae9c0

View File

@ -179,7 +179,11 @@ public class AwsCandidateHarvester
{ {
try try
{ {
Runtime.getRuntime().exec("ec2metadata"); if(new File("/usr/bin/ec2metadata").exists())
return true;
//the command below seems to be freezing on some systems.
//Runtime.getRuntime().exec("ec2metadata --help");
//if this is an AWS EC2 we would throw an exception above and not //if this is an AWS EC2 we would throw an exception above and not
//get here, so ... be happy //get here, so ... be happy