Plan creation doesn't stop when an action fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
Medium
|
Julie Pichon |
Bug Description
Steps to reproduce:
1. Have a container created in Swift
$ swift list
custom-plan
2. Try to create a plan with templates and the same name
$ openstack overcloud plan create --templates /usr/share/
Creating Swift container to store the plan
Creating plan from template files in: /usr/share/
Exception creating plan: Error occurred creating plan: Duplicate entry for Environment: ['name']
Expected results: The plan creation stops right at "Creating Swift container to store the plan" with an error message about a container already existing with that name.
Additional info:
This works fine when create the default plan, because all the steps are in a workflow and the container check is done at the workflow level ( https:/
$ openstack overcloud plan create custom-plan
Exception creating plan: Unable to create plan. The Swift container already exists
This may be due because we're not returning an exception at https:/
Changed in tripleo: | |
assignee: | nobody → Julie Pichon (jpichon) |
Changed in tripleo: | |
milestone: | newton-rc1 → newton-rc2 |
tags: | added: newton-backport-potential |
If the container was already a plan, the command fails because of the mistral environment so there shouldn't be problems with accidentally overwritten templates/plan. However if it wasn't, it looks like the command will fail silently:
$ swift list
custom-plan
test
$ openstack overcloud plan list ------- ------- ------- --+ ------- ------- ------- --+ ------- ------- ------- --+
+------
| Plan Name |
+------
| custom-plan |
+------
$ openstack overcloud plan create --templates /usr/share/ openstack- tripleo- heat-templates/ test openstack- tripleo- heat-templates/
Creating Swift container to store the plan
Creating plan from template files in: /usr/share/
Plan created
$ openstack overcloud plan list ------- ------- ------- --+ ------- ------- ------- --+ ------- ------- ------- --+
+------
| Plan Name |
+------
| custom-plan |
+------
I'll update the bug title.