With a test.yaml like the following:
$ cat test.yaml
resource_registry:
# foo
We fail like this:
$ openstack overcloud deploy --templates -e test.yaml
Started Mistral Workflow tripleo.validations.v1.check_pre_deployment_validations. Execution ID: 46214613-ad5c-4075-85f6-745d88928d2a
Waiting for messages on queue 'f27e1bfa-ad33-404f-847f-4d3b6b8bf335' with no timeout.
Removing the current plan files
Uploading new plan files
Started Mistral Workflow tripleo.plan_management.v1.update_deployment_plan. Execution ID: f4126d36-3566-47c3-8428-a56087ea9d0c
Plan updated.
Processing templates in the directory /tmp/tripleoclient-Z0maJF/tripleo-heat-templates
'NoneType' object has no attribute 'items'
$ echo $?
1
After the fix we get the correct error from mistral and don't need to
guess any longer:
u'message': u'Failed to run action [action_ex_id=6bdbb294-964d-4bce-8ae4-9608b09723f6, action_cls=\'<class \'mistral.actions.action_factory.DeployStackAction\'>\', attributes=\'{}\', params=\'{u\'skip_deploy_identifier\': False, u\'container\': u\'overcloud\', u\'timeout\': 240}\']
ERROR: Environment not in valid format: environment has empty section "resource_registry"', u'status': u'FAILED'}
While it would have been nice to actually print the erroneous file
as well, that would require a bigger overhaul, so for the time being
this fix is the simplest and at least gives us some clues as to what
is going wrong.
Reviewed: https:/ /review. openstack. org/489258 /git.openstack. org/cgit/ openstack/ python- tripleoclient/ commit/ ?id=c20150c572e 50e0c41ec3a00f9 39ddea15b32bf5
Committed: https:/
Submitter: Jenkins
Branch: master
commit c20150c572e50e0 c41ec3a00f939dd ea15b32bf5
Author: Michele Baldessari <email address hidden>
Date: Mon Jul 31 17:10:55 2017 +0200
Skip empty resource_registry sections
With a test.yaml like the following: registry:
$ cat test.yaml
resource_
# foo
We fail like this: validations. v1.check_ pre_deployment_ validations. Execution ID: 46214613- ad5c-4075- 85f6-745d88928d 2a ad33-404f- 847f-4d3b6b8bf3 35' with no timeout. plan_management .v1.update_ deployment_ plan. Execution ID: f4126d36- 3566-47c3- 8428-a56087ea9d 0c ent-Z0maJF/ tripleo- heat-templates
$ openstack overcloud deploy --templates -e test.yaml
Started Mistral Workflow tripleo.
Waiting for messages on queue 'f27e1bfa-
Removing the current plan files
Uploading new plan files
Started Mistral Workflow tripleo.
Plan updated.
Processing templates in the directory /tmp/tripleocli
'NoneType' object has no attribute 'items'
$ echo $?
1
After the fix we get the correct error from mistral and don't need to ex_id=6bdbb294- 964d-4bce- 8ae4-9608b09723 f6, action_cls=\'<class \'mistral. actions. action_ factory. DeployStackActi on\'>\' , attributes=\'{}\', params= \'{u\'skip_ deploy_ identifier\ ': False, u\'container\': u\'overcloud\', u\'timeout\': 240}\'] registry" ', u'status': u'FAILED'}
guess any longer:
u'message': u'Failed to run action [action_
ERROR: Environment not in valid format: environment has empty section "resource_
While it would have been nice to actually print the erroneous file
as well, that would require a bigger overhaul, so for the time being
this fix is the simplest and at least gives us some clues as to what
is going wrong.
Change-Id: I2638ab35c6799e fa1ac8ccf4bf0dc 331f75fae25
Closes-Bug: #1707659