Gracefully exit when overcloud deploy doesnot create overcloud stack
This patch does the following when overcloud deploy fails: Check if the overcloud deploy has started. 1. If no, exit gracefully saying the deploy has not started. 2. If yes, check for errors in the deployment. Change-Id: I4390c48491588c2932177cb84a3cec087d3a04e8
This commit is contained in:
parent
4208173975
commit
3807b99ae9
@ -69,10 +69,16 @@ openstack overcloud deploy \
|
|||||||
${DEPLOY_ENV_YAML:+-e $DEPLOY_ENV_YAML} "$@" && status_code=0 || status_code=$?
|
${DEPLOY_ENV_YAML:+-e $DEPLOY_ENV_YAML} "$@" && status_code=0 || status_code=$?
|
||||||
|
|
||||||
### --stop_docs
|
### --stop_docs
|
||||||
|
|
||||||
|
# Check if the deployment has started. If not, exit gracefully. If yes, check for errors.
|
||||||
|
if ! openstack stack list | grep -q overcloud; then
|
||||||
|
echo "overcloud deployment not started. Check the deploy configurations"
|
||||||
|
exit 1
|
||||||
|
|
||||||
# We don't always get a useful error code from the openstack deploy command,
|
# We don't always get a useful error code from the openstack deploy command,
|
||||||
# so check `openstack stack list` for a CREATE_COMPLETE or an UPDATE_COMPLETE
|
# so check `openstack stack list` for a CREATE_COMPLETE or an UPDATE_COMPLETE
|
||||||
# status.
|
# status.
|
||||||
if ! openstack stack list | grep -Eq '(CREATE|UPDATE)_COMPLETE'; then
|
elif ! openstack stack list | grep -Eq '(CREATE|UPDATE)_COMPLETE'; then
|
||||||
{%if release not in ['mitaka', 'liberty'] %}
|
{%if release not in ['mitaka', 'liberty'] %}
|
||||||
# get the failures list
|
# get the failures list
|
||||||
openstack stack failures list overcloud --long > {{ failed_deployment_list }} || true
|
openstack stack failures list overcloud --long > {{ failed_deployment_list }} || true
|
||||||
|
Loading…
Reference in New Issue
Block a user