stack failed to reach DELETE_COMPLETE status (timeout)

Bug #1626173 reported by Emilien Macchi
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Crag Wolfe

Bug Description

Puppet OpenStack CI is frequently failing on Heat tempest tests, when deleting a stack:

http://logs.openstack.org/67/373967/2/check/gate-puppet-openstack-integration-3-scenario003-tempest-centos-7/a7960f6/console.html#_2016-09-21_15_01_51_162438

Details: Stack tempest-heat-1257562728 failed to reach DELETE_COMPLETE status (current: DELETE_IN_PROGRESS) within the required time (1200 s).

We're reaching the 1200s timeout!

All the logs are available here:
http://logs.openstack.org/67/373967/2/check/gate-puppet-openstack-integration-3-scenario003-tempest-centos-7/a7960f6/logs/

But we need to carefully look this Heat Engine error:
http://logs.openstack.org/67/373967/2/check/gate-puppet-openstack-integration-3-scenario003-tempest-centos-7/a7960f6/logs/heat/heat-engine.txt.gz#_2016-09-21_14_41_38_553

Zane Bitter (zaneb)
Changed in heat:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Zane Bitter (zaneb)
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/374340

Changed in heat:
status: Triaged → In Progress
Zane Bitter (zaneb)
Changed in heat:
milestone: none → newton-rc2
tags: added: newton-rc-potential
Revision history for this message
Zane Bitter (zaneb) wrote :
Zane Bitter (zaneb)
Changed in heat:
assignee: Zane Bitter (zaneb) → nobody
Revision history for this message
Zane Bitter (zaneb) wrote :

The patch I had actually fixed a different foreign key constraint error (which I raised as bug 1626256). So I have no idea what's causing this one:

DBReferenceError: (pymysql.err.IntegrityError) (1452, u'Cannot add or update a child row: a foreign key constraint fails (`heat`.`stack`, CONSTRAINT `stack_ibfk_3` FOREIGN KEY (`user_creds_id`) REFERENCES `user_creds` (`id`))') [SQL: u'UPDATE stack SET action=%s, status=%s, status_reason=%s, name=%s, raw_template_id=%s, prev_raw_template_id=%s, username=%s, tenant=%s, user_creds_id=%s, owner_id=%s, parent_resource_name=%s, timeout=%s, disable_rollback=%s, stack_user_project_id=%s, backup=%s, nested_depth=%s, convergence=%s, current_traversal=%s, current_deps=%s, updated_at=%s WHERE stack.id = %s AND stack.current_traversal = %s'] [parameters: ('DELETE', 'IN_PROGRESS', 'Stack DELETE started', u'tempest-heat-1257562728', 3, 2, u'tempest-StacksTestJSON-160219659', u'41e181c888d94e63a6d2b584b2de5116', 1, None, None, 60, 1, u'd46670b1041c49e9883bafaf3303db08', 0, 0, 1, '66cede28-8848-4f4b-83c3-66e574866564', '{"edges": []}', datetime.datetime(2016, 9, 21, 14, 41, 38, 457816), u'4260505e-8c52-4486-aeb6-dcaceef59d13', u'66cede28-8848-4f4b-83c3-66e574866564')]

The user_creds ID is 1, and evidently that entry does not exist in the DB.

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

Related fix proposed to branch: master
Review: https://review.openstack.org/374440

Changed in heat:
assignee: nobody → Crag Wolfe (cwolfe)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit e1f161a19a9eef3edb05612aad905e2e7ae7c674
Author: Crag Wolfe <email address hidden>
Date: Wed Sep 21 19:06:36 2016 -0400

    Do not attempt deletion of a DELETE_COMPLETE stack in service api

    A stack may be in transient state where it is DELETE_COMPLETE, but has
    has not actually been soft-deleted yet. For the purposes of
    delete_stack in service.py, consider a DELETE_COMPLETE stack as
    equivalent to a soft-deleted one (it soon will be), thereby avoiding a
    race where we would have attempted to update the stack, running into a
    foreign-key constraint issue for a non-existing user_cred.

    Change-Id: Iec021e6a0df262d447fdf9ee1789603c7a1c55f8
    Closes-Bug: #1626173
    Closes-Bug: #1626107

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/374918

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

Reviewed: https://review.openstack.org/374918
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=fb26ec9da5ee6fd051d3d0b39588972ecc86f1d9
Submitter: Jenkins
Branch: stable/newton

commit fb26ec9da5ee6fd051d3d0b39588972ecc86f1d9
Author: Crag Wolfe <email address hidden>
Date: Wed Sep 21 19:06:36 2016 -0400

    Do not attempt deletion of a DELETE_COMPLETE stack in service api

    A stack may be in transient state where it is DELETE_COMPLETE, but has
    has not actually been soft-deleted yet. For the purposes of
    delete_stack in service.py, consider a DELETE_COMPLETE stack as
    equivalent to a soft-deleted one (it soon will be), thereby avoiding a
    race where we would have attempted to update the stack, running into a
    foreign-key constraint issue for a non-existing user_cred.

    Change-Id: Iec021e6a0df262d447fdf9ee1789603c7a1c55f8
    Closes-Bug: #1626173
    Closes-Bug: #1626107
    (cherry picked from commit e1f161a19a9eef3edb05612aad905e2e7ae7c674)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 7.0.0.0rc2

This issue was fixed in the openstack/heat 7.0.0.0rc2 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 7.0.0

This issue was fixed in the openstack/heat 7.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 8.0.0.0b1

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

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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