Swift container gets created even when plan creation fails

Bug #1648861 reported by Ana Krivokapić
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Ana Krivokapić

Bug Description

Problem description: If the overcloud plan creation fails (e.g. due to a missing capabilities-map.yaml file), the associated swift container gets created anyway. If you then try to re-create the failed plan (with the same name), the creation will now fail because the swift container name already exist.

Expected result: The code should take care of cleaning up the swift container, in case one of the steps following the container creations fails.

Steps to reproduce:
[stack@instack ~]$ mkdir haha
[stack@instack ~]$ echo "haha" > haha/haha.txt
[stack@instack ~]$ openstack overcloud plan create haha --templates haha/
Creating Swift container to store the plan
Creating plan from template files in: haha/
Started Mistral Workflow tripleo.plan_management.v1.create_deployment_plan. Execution ID: edbcaefb-6d57-4bb3-a551-0a8aee7b8a92
Exception creating plan: File missing from container: Object GET failed: http://192.168.24.1:8080/v1/AUTH_3705f89aee8a424d891dcd702e31169d/haha/capabilities-map.yaml 404 Not Found [first 60 chars of response] <html><h1>Not Found</h1><p>The resource could not be found.<
[stack@instack ~]$ swift list
haha
overcloud
[stack@instack ~]$

Workaround: Manually delete the swift container after the failed plan creation:
[stack@instack ~]$ swift delete haha

Tags: workflows
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/409350

Changed in tripleo:
assignee: nobody → Ana Krivokapić (akrivoka)
status: Triaged → In Progress
Dougal Matthews (d0ugal)
tags: added: workflows
Changed in tripleo:
milestone: none → ocata-3
Changed in tripleo:
assignee: Ana Krivokapić (akrivoka) → Dougal Matthews (d0ugal)
Changed in tripleo:
assignee: Dougal Matthews (d0ugal) → Ana Krivokapić (akrivoka)
Changed in tripleo:
milestone: ocata-3 → ocata-rc1
Changed in tripleo:
milestone: ocata-rc1 → pike-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/409350
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=de398c6d18328fe3231c672845d9365d1f084b6e
Submitter: Jenkins
Branch: master

commit de398c6d18328fe3231c672845d9365d1f084b6e
Author: Ana Krivokapic <email address hidden>
Date: Fri Dec 9 23:06:37 2016 +0100

    Don't create swift container if plan creation fails

    Change-Id: I5e2f16bf4b153fbbd2d75c13dd116bd40a1f11f4
    Depends-On: I5ae14eba2cc6707fa8e5273bdd93fcc10ac9d15a
    Closes-bug: #1648861

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 7.0.0

This issue was fixed in the openstack/python-tripleoclient 7.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.