Workflow._fail_workflow() may fail if "output_on_error" is not empty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Fix Released
|
High
|
Ritesh Paiboina |
Bug Description
The method looks like (with the beginning omitted):
def _fail_workflow(
....
# When we set an ERROR state we should safely set output value getting
# w/o exceptions due to field size limitations.
msg = utils.cut_by_kb(
msg,
)
if self.wf_
So, we first use utils.cut_by_kb() for "msg" but then, essentially, add 'output_on_error' to it so the resulting size of 'output' may be greater than cfg.CONF.
Changed in mistral: | |
milestone: | none → pike-2 |
Changed in mistral: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Renat Akhmerov (rakhmerov) |
description: | updated |
summary: |
- workflow_handler._fail_workflow() may fail if "output_on_error" is not - empty + Workflow._fail_workflow() may fail if "output_on_error" is not empty |
Changed in mistral: | |
assignee: | Renat Akhmerov (rakhmerov) → nobody |
Changed in mistral: | |
milestone: | pike-2 → pike-3 |
Changed in mistral: | |
milestone: | pike-3 → pike-rc1 |
Changed in mistral: | |
status: | Confirmed → In Progress |
Changed in mistral: | |
milestone: | pike-rc1 → queens-1 |
Changed in mistral: | |
milestone: | queens-1 → queens-2 |
Changed in mistral: | |
status: | In Progress → New |
assignee: | Ritesh (rsritesh) → nobody |
Changed in mistral: | |
milestone: | queens-2 → none |
Changed in mistral: | |
milestone: | none → queens-rc1 |
assignee: | nobody → ritesh (ritesh) |
assignee: | ritesh (ritesh) → Ritesh (rsritesh) |
The right fix seems to be the following:
* Calculate size of "output_on_error".
* If it's greater than config option:
** Log the full message and "output_on_error"
** Raise an exception (we can't ignore configuration)
* If it's less:
** Log the full message
** Cut "msg" according what's left after counting "output_on_error".