Skip to content
Snippets Groups Projects
Commit bc08b44f authored by Mark Goddard's avatar Mark Goddard
Browse files

Exit on failure in init-runonce

Previously we sourced this script in tests/deploy.sh, but this was
recently changed. Following that change we lost the errexit setting,
meaning we ignore errors in init-runonce.

Adding errexit in the script itself means that all callers get error
handling.

Also log init-runonce output.

TrivialFix

Change-Id: I9b35bd5f0f76eec26ddd968d093a3a5fd55a7ce2
parent 54856a87
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,7 @@ function deploy { ...@@ -28,7 +28,7 @@ function deploy {
if ! openstack image show cirros >/dev/null 2>&1; then if ! openstack image show cirros >/dev/null 2>&1; then
echo "Initialising OpenStack resources via init-runonce" echo "Initialising OpenStack resources via init-runonce"
tools/init-runonce tools/init-runonce > /tmp/logs/ansible/init-runonce
else else
echo "Not running init-runonce - resources exist" echo "Not running init-runonce - resources exist"
fi fi
......
#!/bin/bash #!/bin/bash
#
set -o errexit
# This script is meant to be run once after running start for the first # This script is meant to be run once after running start for the first
# time. This script downloads a cirros image and registers it. Then it # time. This script downloads a cirros image and registers it. Then it
# configures networking and nova quotas to allow 40 m1.small instances # configures networking and nova quotas to allow 40 m1.small instances
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment