Extend capabilities to clean up old executions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Fix Released
|
Medium
|
ali abdelal |
Bug Description
to avoid having a crowded mistral database and therefore slower mysql queries we try to delete successfully finished workflow executions. we currently achieve this by running the command "openstack workflow execution list" with certain filters followed by "openstack workflow execution delete". this unfortunately is not very efficient and fails from time to time due to workflow dependencies that got deleted earlier in the loop process of our script. nothing that we couldn't workaround separately but i suggest to have a more mainstream solution:
add a cleanup command for mistral-db-manage that allows to "archive" or "delete" successfully executed workflows. something like nova implements with "nova-manage db archive_
Changed in mistral: | |
milestone: | train-1 → ussuri-1 |
Do you use the execution expiration policy? https:/ /docs.openstack .org/mistral/ latest/ main_features. html#execution- expiration- policy
That is designed to solve the problem you have. However, maybe it is missing something?
To avoid the execution deletion errors, I think you may want to only delete root workflow executions (and not sub-workflows, they are deleted when the root is deleted).