Merge "Run openstack overcloud failures when failures"

This commit is contained in:
Zuul 2018-06-15 12:03:12 +00:00 committed by Gerrit Code Review
commit 79d9067fc8
4 changed files with 8 additions and 0 deletions

View File

@ -53,5 +53,7 @@ EOC
# NOTE(bnemec): openstack stack failures list only exists in Newton and above.
# On older releases we still need to manually query the deployments.
openstack stack failures list --long overcloud || for failed_deployment in \$(heat resource-list --nested-depth 5 overcloud | grep FAILED | grep 'StructuredDeployment ' | cut -d '|' -f3); do heat deployment-show \$failed_deployment; done;
# NOTE(emilien) "openstack overcloud failures" was introduced in Rocky
openstack overcloud failures || true
EOF
fi

View File

@ -10,6 +10,8 @@
echo "Failed deleting OVB stack" | tee -a {{ stack_log }};
openstack stack show {{ stack_name }} &>> {{ stack_log }};
openstack stack failures list --long {{ stack_name }} &>> {{ stack_log }} || echo 'Failed to list stack failures' >> {{ stack_log }};
# NOTE(emilien) "openstack overcloud failures" was introduced in Rocky
openstack overcloud failures &>> {{ stack_log }} || echo 'Failed to list deployment failures' >> {{ stack_log }};
exit 0;
fi;
COUNTER=$((COUNTER+1));

View File

@ -82,6 +82,8 @@ elif ! openstack stack list | grep -Eq '(CREATE|UPDATE)_COMPLETE'; then
{%if release not in ['mitaka', 'liberty'] %}
# get the failures list
openstack stack failures list overcloud --long > {{ failed_deployment_list }} || true
# NOTE(emilien) "openstack overcloud failures" was introduced in Rocky
openstack overcloud failures >> {{ failed_deployment_list }} || true
{% endif %}
# get any puppet related errors

View File

@ -6,6 +6,8 @@ onerror(){
# get the failures list
openstack stack resource list overcloud >> failed_upgrade_list.log || true
openstack stack failures list --long overcloud >> failed_upgrade.log
# NOTE(emilien) "openstack overcloud failures" was introduced in Rocky
openstack overcloud failures >> failed_upgrade.log || true
exit 1
}
trap onerror ERR