Ensure create/update greenthreads are always cancelled on delete
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Zane Bitter | ||
Grizzly |
Fix Released
|
Medium
|
Zane Bitter |
Bug Description
Related to bug 1096150, which fixed one specific failure-mode where a ThreadGroup.stop() failed to kill the running greenthread - we have further work to do to ensure this is robust, since there are still multiple generic "except Exception" clauses in the code-path of the create/update greenthreads, so we are susceptible to random breakage if a stack is deleted and we happen to have a greenthread operation in progress (create/update stack, periodic watcher task)
The real problem here is eventlet, as described in this oslo bug:
https:/
However, if a solution to this can't be found at the oslo/ThreadGroup level, then we need to remove all generic exception handling in our code, and ensure all try/except blocks are fully qualified (such that the except *can't* mistakenly catch the GreenletExit exception allowing the thread to continue running after a greenthread.kill())
The main areas I spotted which we definitely need to fix:
- Resource.update() : Needs the same fix as applied for bug 1096150
- All resource.py DB manipulation methods (_store_or_update, _add_event, _store, resource_id_set), otherwise a stack deletion could be caught and mistakenly logged as a DB error.
- ditto WatchRule.load()
Probably some others, further investigation required.
Changed in heat: | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Steven Hardy (shardy) |
milestone: | none → grizzly-3 |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | grizzly-rc1 → 2013.1 |
I have a patch under review in Oslo to monkey-patch greenlet to fix this.