The error messages 'Command Out of Sync' are due to the threads being
stopped in the middle of the database operations. This happens in the
legacy action when delete is requested during a stack create.
We have the thread cancel message but that was not being used in this
case. Thread cancel should provide a more graceful way of ensuring the
stack is in a FAILED state before the delete is attempted.
This changes does the following in the delete_stack service method for
legace engine:
- if the stack is still locked, send thread cancel message
- in a subthread wait for the lock to be released, or until a
timeout based on the 4 minute cancel grace period
- if the stack is still locked, do a thread stop as before
Reviewed: https:/ /review. openstack. org/373518 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=2dd44db1b9c f4b789d8a083df6 f97ae1fb5e22d5
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 2dd44db1b9cf4b7 89d8a083df6f97a e1fb5e22d5
Author: Steve Baker <email address hidden>
Date: Fri Sep 16 03:29:59 2016 +0000
Legacy delete attempt thread cancel before stop
The error messages 'Command Out of Sync' are due to the threads being
stopped in the middle of the database operations. This happens in the
legacy action when delete is requested during a stack create.
We have the thread cancel message but that was not being used in this
case. Thread cancel should provide a more graceful way of ensuring the
stack is in a FAILED state before the delete is attempted.
This changes does the following in the delete_stack service method for
legace engine:
- if the stack is still locked, send thread cancel message
- in a subthread wait for the lock to be released, or until a
timeout based on the 4 minute cancel grace period
- if the stack is still locked, do a thread stop as before
Closes-Bug: #1499669 95955c4d8a06505 d72d83728a0 d841d913dcd2ae6 58fb526c1a)
Closes-Bug: #1546431
Closes-Bug: #1536451
Change-Id: I4cd613681f07d2
(cherry picked from commit 3000f904080d8dc