Don't try to get stack details if the stack doesn't exist

If a run fails before the overcloud is deployed or we are running
get_host_info.sh after deleting the overcloud then all of the
commands that operate on the stack will fail.  Let's not even run
those if we don't find the stack.

Change-Id: I06ff879424793ea1372889ae2c0e0740c45cb5c8
This commit is contained in:
Ben Nemec 2016-05-20 17:14:35 +00:00
parent c2b7dcdace
commit 381b5f5dcb
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ if [ -e ~/stackrc ] ; then
source ~/stackrc
nova list | tee /tmp/nova-list.txt
heat stack-show overcloud
# If there's no overcloud then there's no point in continuing
heat stack-show overcloud || (echo 'No active overcloud found' && exit 0)
heat resource-list -n5 overcloud
heat event-list overcloud
# --nested-depth 2 seems to get us a reasonable list of resources without