oliverlloyd / jmeter-ec2

Automates running Apache JMeter on Amazon EC2
GNU General Public License v3.0
464 stars 187 forks source link

Speed up checks to see if instance is ready #60

Closed oliverlloyd closed 8 years ago

oliverlloyd commented 8 years ago

Don't wait for instance checks, check for ssh access and use this to decide ready state.

    # E.g.
    for host in ${hosts[@]} ; do
      if [ ! "$(ssh -q \
        -o StrictHostKeyChecking=no \
        -o "BatchMode=yes" \
        -o "ConnectTimeout=15" \
        -i "$PEM_PATH/$PEM_FILE" \
        -p $REMOTE_PORT \
        $USER@$host echo up)" == "up" ] ; then
        echo "Host $host is not responding"
      fi
    done
oliverlloyd commented 8 years ago

Tried this but it's not really viable to depend on purely having an ssh connection. The extra delay waiting for the instance status checks is probably worth the assurance that the test will run okay.