Comment 0 for bug 1621493

Revision history for this message
Julie Pichon (jpichon) wrote : Plan creation doesn't stop when the container already exists

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/openstack-tripleo-heat-templates/ custom-plan
Creating Swift container to store the plan
Creating plan from template files in: /usr/share/openstack-tripleo-heat-templates/
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://github.com/openstack/tripleo-common/blob/master/workbooks/plan_management.yaml#L50 ).

$ 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://github.com/openstack/tripleo-common/blob/master/tripleo_common/actions/plan.py#L48 so the client code at https://github.com/openstack/python-tripleoclient/blob/master/tripleoclient/workflows/plan_management.py#L85 goes ahead without checking the result for errors.