heat-engine fails to start when db is unavailable

Bug #1545885 reported by Steve Baker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Zane Bitter

Bug Description

When heat-engine is started and there is no database currently available there is an error raised by EngineService.create_periodic_tasks. However if execution gets past create_periodic_tasks() then systemd is notified that the service is up, so heat will recover when the database comes back.

create_periodic_tasks needs to create its watch tasks inside a thread and retry until success so that heat-engine can start in the absence of a database.

Changed in heat:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Steve Baker (steve-stevebaker)
milestone: none → mitaka-3
tags: added: kilo-backport-potential liberty-backport-potential
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/280451

Changed in heat:
status: Triaged → In Progress
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/280455

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/280456

Changed in heat:
assignee: Steve Baker (steve-stevebaker) → Zane Bitter (zaneb)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit d4e270cd9faffead520eea8bf03bdb74b4b1a160
Author: Steve Baker <email address hidden>
Date: Mon Feb 15 19:06:52 2016 -0500

    Create watch tasks in its own thread

    This change moves the creation of stack watch tasks into its own thread
    which retries until it has been done without error.

    The intent is to prevent create_periodic_tasks from raising an error
    when the database is not available, and retry stack watch creation until
    the database becomes available.

    Once execution gets past create_periodic_tasks() then systemd is
    notified that the service is up, and heat will recover when the database
    comes back.

    Change-Id: I4d61022db505581f0c1b2feed009c56df18a9ee5
    Closes-Bug: #1545885

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0b3

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (stable/kilo)

Change abandoned by Dave Walker (<email address hidden>) on branch: stable/kilo
Review: https://review.openstack.org/280455
Reason: Kilo is now approaching EOL. We are in freeze pending the final release and no freeze exception has been raised. Therefore I am abandoning this change, if it is required in the release - please restore and raise a request. Thanks

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

Reviewed: https://review.openstack.org/280456
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=0375ecb78aa941cd21c5cf916066c7c8e58cc7ac
Submitter: Jenkins
Branch: stable/liberty

commit 0375ecb78aa941cd21c5cf916066c7c8e58cc7ac
Author: Steve Baker <email address hidden>
Date: Mon Feb 15 19:06:52 2016 -0500

    Create watch tasks in its own thread

    This change moves the creation of stack watch tasks into its own thread
    which retries until it has been done without error.

    The intent is to prevent create_periodic_tasks from raising an error
    when the database is not available, and retry stack watch creation until
    the database becomes available.

    Once execution gets past create_periodic_tasks() then systemd is
    notified that the service is up, and heat will recover when the database
    comes back.

    Change-Id: I4d61022db505581f0c1b2feed009c56df18a9ee5
    Closes-Bug: #1545885
    (cherry picked from commit d4e270cd9faffead520eea8bf03bdb74b4b1a160)

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

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