Comment 2 for bug 1017418

Revision history for this message
Kevin Jackson (kevin-linuxservices) wrote :

Hi Vish, you are correct in assuming the script doesn't wait for the machines to finish booting before deleting them. Patience was never a strong point of mine... the test I was performing was as follows - not pretty, but highlights the issue:

NUM_INSTANCES=30
NUM_ITERATIONS=15

for I in `seq 1 ${NUM_ITERATIONS}`
do
        # Spin up N instances
        for a in `seq 1 ${NUM_INSTANCES}`; do nova boot kevinj${a} --flavor=2 --image 57a173b0-f24d-4e2d-b914-e8f60ed1b881 --key_name kevinj --security_groups default 2>&1 > /dev/null; done

        sleep 20

        NUM_ERRORS=$(nova list | grep -c ERR)
        NUM_ACTIVE=$(nova list | grep -c ACTIVE)

        echo "Run $I, Num Errors: ${NUM_ERRORS}, Num Active: ${NUM_ACTIVE}"
        for a in `seq 1 ${NUM_INSTANCES}`; do nova delete kevinj${a} 2>&1 > /dev/null; done

        sleep 20
done

I'll re-run the test with the --poll option to see if it makes a difference.

Either way, if this is the case that a race condition can cause the floating IPs to become unavailable - where --auto_assign_floating_ip is used, and therefore cause no more instances to spawn - this is a Security/DDoS issue.