Sometimes getting "DetachedInstanceError: Instance <ActionDefinition at..." when processing "on_action_complete"

Bug #1803528 reported by Renat Akhmerov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Renat Akhmerov

Bug Description

Once in a while we get:

2018-11-11 22:35:56.891 12581 ERROR oslo_messaging.rpc.server [req-c95319cf-4a3e-49d4-9a43-1efda53a8b2b - CloudBandNetworkDirector - - -] Exception during message handling: DetachedInstanceError: Instance <ActionDefinition at 0x7fca0d61a050> is not bound to a Session; attribute refresh operation cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)

when Mistral processes an action.

This might be related with the action definition cache. If so, the solution is to clone objects before putting them into the cache.

Changed in mistral:
milestone: none → stein-1
assignee: nobody → Renat Akhmerov (rakhmerov)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

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

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

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/618178

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

Reviewed: https://review.openstack.org/618133
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=90ddf442ee193d3b5b395d5f5a9aadb1dfe2b351
Submitter: Zuul
Branch: master

commit 90ddf442ee193d3b5b395d5f5a9aadb1dfe2b351
Author: Renat Akhmerov <email address hidden>
Date: Thu Nov 15 18:22:09 2018 +0700

    Clone cached action definitions

    * Once in a while we get DetachedInstanceError for action definitions
      and it happens when they are fetched from cache. We must always
      clone persistent objects before caching them.

    Change-Id: I1d0cffea6775eb258dcefc0dbb8a6ee18effe597
    Closes-Bug: #1803528

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

Reviewed: https://review.openstack.org/618178
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=9b302e2dc7270a74e77b6ef23c890b0016ab1371
Submitter: Zuul
Branch: stable/rocky

commit 9b302e2dc7270a74e77b6ef23c890b0016ab1371
Author: Renat Akhmerov <email address hidden>
Date: Thu Nov 15 18:22:09 2018 +0700

    Clone cached action definitions

    * Once in a while we get DetachedInstanceError for action definitions
      and it happens when they are fetched from cache. We must always
      clone persistent objects before caching them.

    Change-Id: I1d0cffea6775eb258dcefc0dbb8a6ee18effe597
    Closes-Bug: #1803528

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 8.0.0.0b1

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

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

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