Skip to content

Instantly share code, notes, and snippets.

@lukehinds
Last active October 18, 2016 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukehinds/ef33aaca53712a6dd75f4c137a96eaf1 to your computer and use it in GitHub Desktop.
Save lukehinds/ef33aaca53712a6dd75f4c137a96eaf1 to your computer and use it in GitHub Desktop.
for stack in $(heat stack-list | grep -i failed | awk '{ print $2 }'); do
for nstack in $(heat stack-list --show-nested | grep $stack | grep -i failed | awk '{ print $2 }'); do
for resource in $(openstack stack resource list -n10 $nstack | grep -i failed | awk '{ print $2 }'); do
deployments=$(openstack stack resource list -n10 $nstack | grep -i failed | grep -i $resource | grep Deployment | awk '{ print $4 }')
if [ ! -z "$deployments" ]; then
for deployment in $deployments; do
heat deployment-show $deployment
done
fi
done
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment