$ vagrant up --provider=aws --no-provision --destroy-on-error
Launching an instance with the following settings...
-- Type: t2.small
-- AMI: ami-xxx
-- Region: us-east-1
-- Keypair: Test
-- Subnet ID: subnet-abc
-- Block Device Mapping: []
-- Terminate On Shutdown: 1
-- Monitoring: false
-- EBS optimized: false
-- Source Destination check:
-- Assigning a public IP address in a VPC: false
-- VPC tenancy specification: default
and my instance fails with exit 1, however my AWS instance is still running. This happens on each time.
Example error:
==> mt-aws: gzip:
==> mt-aws: /home/ubuntu/foo: No space left on device
==> mt-aws: ERROR: Exiting /vagrant/scripts/get_bt_data.sh with 1
==> mt-aws: 592 onerror /vagrant/scripts/.funcs.inc.sh
==> mt-aws: 49 main /vagrant/scripts/get_bt_data.sh
==> mt-aws: ++ onerror
==> mt-aws: ++ local exit_status=1
==> mt-aws: ++ local frame=0
==> mt-aws: ++ echo 'ERROR: Exiting /vagrant/scripts/run_backtest.sh with 1'
==> mt-aws: ERROR: Exiting /vagrant/scripts/run_backtest.sh with 1
==> mt-aws: + exit 1
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
So each time I had to terminate my instance manually from the EC2 console on error. Expected behaviour would be to terminate the instance on error (as per --destroy-on-error and aws.terminate_on_shutdown).
I'm running instance as:
and my instance fails with exit 1, however my AWS instance is still running. This happens on each time.
Example error:
So each time I had to terminate my instance manually from the EC2 console on error. Expected behaviour would be to terminate the instance on error (as per
--destroy-on-error
andaws.terminate_on_shutdown
).