devstack should run under -o errexit to ensure that we fail early
when something has gone wrong, otherwise determination of the root
failure location is often quite challenging.
this clears all the normal use cases for devstack, there could be
tests which now die early, which we're going to have to check for
later.
Change-Id: Ibd828c4f4fd95a60d3918d3d7ae90e10649479ab
... | ... |
@@ -1094,7 +1094,8 @@ function service_check() { |
1094 | 1094 |
fi |
1095 | 1095 |
|
1096 | 1096 |
# Check if there is any falure flag file under $SERVICE_DIR/$SCREEN_NAME |
1097 |
- failures=`ls "$SERVICE_DIR/$SCREEN_NAME"/*.failure 2>/dev/null` |
|
1097 |
+ # make this -o errexit safe |
|
1098 |
+ failures=`ls "$SERVICE_DIR/$SCREEN_NAME"/*.failure 2>/dev/null || /bin/true` |
|
1098 | 1099 |
|
1099 | 1100 |
for service in $failures; do |
1100 | 1101 |
service=`basename $service` |
... | ... |
@@ -601,6 +601,9 @@ function err_trap { |
601 | 601 |
exit $r |
602 | 602 |
} |
603 | 603 |
|
604 |
+ |
|
605 |
+set -o errexit |
|
606 |
+ |
|
604 | 607 |
# Print the commands being run so that we can see the command that triggers |
605 | 608 |
# an error. It is also useful for following along as the install occurs. |
606 | 609 |
set -o xtrace |