SoftwareDeployment delete fails if stack domain user is missing

Bug #1505981 reported by Steven Hardy
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Steven Hardy
Kilo
Fix Released
Undecided
Unassigned
Liberty
Fix Released
High
Steve Baker

Bug Description

If you forcibly delete a user associated with a SoftwareDeployment, the resource cannot be deleted, which results in an undeletable stack:

[stack@instack ~]$ openstack --os-identity-api-version=3 --os-url http://192.0.2.1:5000/v3 --os-token 7b9c432cc55e46bfa411d9e9e8d684be user list --domain heat_stack | grep 3506266741fe4f88b66ae77968894329
| 3506266741fe4f88b66ae77968894329 | overcloud-ComputeAllNodesDeployment-wz53sriwq6wz-0-xr4ctjp3z7xu |

# Note delete by ID doesn't work with the openstackclient version I have..
[stack@instack ~]$ openstack --os-identity-api-version=3 --os-url http://192.0.2.1:5000/v3 --os-token 7b9c432cc55e46bfa411d9e9e8d684be user delete --domain heat_stack overcloud-ComputeAllNodesDeployment-wz53sriwq6wz-0-xr4ctjp3z7xu

[stack@instack ~]$ heat stack-delete overcloud

This then fails with a persistent error due to not finding the user for ComputeAllNodesDeployment (even if the Deployment is a no-op on DELETE actions)

Steven Hardy (shardy)
tags: added: tripleo
Changed in heat:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Steven Hardy (shardy)
milestone: none → mitaka-1
Revision history for this message
Jaume Devesa (devvesa) wrote :

I experienced this bug *during* the `heat stack-delete overcloud`. Somehow it removed the user during the process (I may be talking about another bug, but it is related). Looking at the heat-engine.log you can see a DELETE over the user on line 10 here:

http://fpaste.org/279014/44816375/

That happens a minute after launching the DELETE of the stack overcloud:

http://fpaste.org/279033/44481681/

Current status of the stack is DELETE_FAILED

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/234707
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=730ccc5abf6dd5e133578b4b7fbef32e3b64fe14
Submitter: Jenkins
Branch: master

commit 730ccc5abf6dd5e133578b4b7fbef32e3b64fe14
Author: Steven Hardy <email address hidden>
Date: Wed Oct 14 11:23:00 2015 +0100

    StackUser tolerate missing user on delete

    If a stack domain user is missing on delete, we currently fail to
    delete the keypair. We should tolerate this in a simiar way to
    that done for _delete_user.

    Change-Id: I6d60612e6187385a2d3b6b6fcf67acb99b572fc3
    Closes-Bug: #1505981

Changed in heat:
status: In Progress → Fix Committed
tags: added: liberty-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/242268

tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/242269

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/liberty)

Reviewed: https://review.openstack.org/242268
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=546e5b1d903c7a6f85adb6ecb0ef524aca3a57f5
Submitter: Jenkins
Branch: stable/liberty

commit 546e5b1d903c7a6f85adb6ecb0ef524aca3a57f5
Author: Steven Hardy <email address hidden>
Date: Wed Oct 14 11:23:00 2015 +0100

    StackUser tolerate missing user on delete

    If a stack domain user is missing on delete, we currently fail to
    delete the keypair. We should tolerate this in a simiar way to
    that done for _delete_user.

    Change-Id: I6d60612e6187385a2d3b6b6fcf67acb99b572fc3
    Closes-Bug: #1505981
    (cherry picked from commit 730ccc5abf6dd5e133578b4b7fbef32e3b64fe14)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/kilo)

Reviewed: https://review.openstack.org/242269
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=5a217b3fc4f2d214bb4a4e3d3e169f8481423453
Submitter: Jenkins
Branch: stable/kilo

commit 5a217b3fc4f2d214bb4a4e3d3e169f8481423453
Author: Steven Hardy <email address hidden>
Date: Wed Oct 14 11:23:00 2015 +0100

    StackUser tolerate missing user on delete

    If a stack domain user is missing on delete, we currently fail to
    delete the keypair. We should tolerate this in a simiar way to
    that done for _delete_user.

    Change-Id: I6d60612e6187385a2d3b6b6fcf67acb99b572fc3
    Closes-Bug: #1505981
    (cherry picked from commit 730ccc5abf6dd5e133578b4b7fbef32e3b64fe14)

tags: added: in-stable-kilo
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0b1

This issue was fixed in the openstack/heat 6.0.0.0b1 development milestone.

Changed in heat:
status: Fix Committed → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/heat 5.0.1

This issue was fixed in the openstack/heat 5.0.1 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.