Ensure that the default plan was created successfully
In change Id8001fee677fe321b42892264e3c55afb6790e1c we wait for the workflow to finish, but don't verify that it didn't error as there is an issue with the default plan creation. There is a fix for this which this patch depends on. This change also expands on the error messages so users can more easily debug the problem. Closes-Bug: #1622683 Depends-On: Ic494ed0874dd79e148ef9c7093bdcf32bed4d6ae Change-Id: Iaaf528372b57c19480c47fe22213b27b8ca871a7
This commit is contained in:
parent
bdde348c33
commit
873d17c483
|
@ -572,12 +572,9 @@ class TestPostConfig(base.BaseTestCase):
|
|||
mock_mistral.environments.list.return_value = []
|
||||
mock_mistral.executions.get.return_value = mock.Mock(state="ERROR")
|
||||
|
||||
# TODO(dmatthews): Switch to this check after this lands:
|
||||
# https://review.openstack.org/#/c/371347/
|
||||
# self.assertRaises(
|
||||
# RuntimeError,
|
||||
# undercloud._create_default_plan, mock_mistral)
|
||||
undercloud._create_default_plan(mock_mistral)
|
||||
self.assertRaises(
|
||||
RuntimeError,
|
||||
undercloud._create_default_plan, mock_mistral)
|
||||
|
||||
@mock.patch('instack_undercloud.undercloud._run_command')
|
||||
def test_copy_stackrc(self, mock_run):
|
||||
|
|
|
@ -1124,13 +1124,18 @@ def _create_default_plan(mistral, timeout=60):
|
|||
if exe.state == "SUCCESS":
|
||||
return
|
||||
else:
|
||||
LOG.warning("Failed to create the default Deployment Plan.")
|
||||
return
|
||||
raise RuntimeError(
|
||||
"Failed to create the default Deployment Plan. Please check "
|
||||
"the create_default_deployment_plan execution in Mistral with "
|
||||
"`openstack workflow execution list`.")
|
||||
else:
|
||||
exe = mistral.executions.get(execution.id)
|
||||
LOG.error("Timed out waiting for execution %s to finish. State: %s",
|
||||
exe.id, exe.state)
|
||||
raise RuntimeError("Timed out creating the default Deployment Plan.")
|
||||
raise RuntimeError(
|
||||
"Timed out creating the default Deployment Plan. Please check "
|
||||
"the create_default_deployment_plan execution in Mistral with "
|
||||
"`openstack workflow execution list`.")
|
||||
|
||||
|
||||
def _prepare_ssh_environment(mistral):
|
||||
|
|
Loading…
Reference in New Issue