diff --git a/exercise.sh b/exercise.sh index f512691..61c7b08 100755 --- a/exercise.sh +++ b/exercise.sh @@ -127,6 +127,28 @@ if ! timeout 10 sh -c "while ! ping -c1 -w1 $FLOATING_IP; do sleep 1; done"; the exit 1 fi +# pause the VM and verify we can't ping it anymore +nova pause $NAME + +sleep 2 + +if ( ping -c1 -w1 $IP); then + echo "Pause failure - ping shouldn't work" + exit 1 +fi + +if ( ping -c1 -w1 $FLOATING_IP); then + echo "Pause failure - ping floating ips shouldn't work" + exit 1 +fi + +# unpause the VM and verify we can ping it again +nova unpause $NAME + +sleep 2 + +ping -c1 -w1 $IP + # dis-allow icmp traffic (ping) nova secgroup-delete-rule $SECGROUP icmp -1 -1 0.0.0.0/0 diff --git a/stack.sh b/stack.sh index f45797a..6a027d0 100755 --- a/stack.sh +++ b/stack.sh @@ -613,6 +613,7 @@ function add_nova_flag { rm -f $NOVA_DIR/bin/nova.conf add_nova_flag "--verbose" add_nova_flag "--nodaemon" +add_nova_flag "--allow_admin_api" add_nova_flag "--scheduler_driver=$SCHEDULER" add_nova_flag "--dhcpbridge_flagfile=$NOVA_DIR/bin/nova.conf" add_nova_flag "--network_manager=nova.network.manager.$NET_MAN"