Expiration Policy for executions failed to delete executions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Fix Released
|
High
|
Guy Paz |
Bug Description
From the code below (the '//' lines are the proposal fix) there are 2 calls for the DB (one for list, secound for delete - that call for get), but there is a little different between them.
The second call is with ‘_secure_query’ so when it comes to delete the execution we are getting an exception that this ‘execution.id’ is not valid/available in the DB.
This happened since every exaction has its own project.id while the task (ExecutionExpir
And since we may have few different projects we need to set for each execution his project ID for each deletion (like you are doing in periodic.py when the MistralPeriodic
From expiration_
=======
with db_api.
# TODO(gpaz): In the future should use generic method with
# filters params and not specific method that filter by time.
for execution in db_api.
try:
// Here we need to set the ctx with project ID so delete execution will not fail in ‘_secure_query’
except Exception as e:
msg = "Failed to delete [execution_id=%s]\n %s" \
Changed in mistral: | |
assignee: | nobody → Guy Paz (guy-paz) |
description: | updated |
Changed in mistral: | |
importance: | Undecided → High |
milestone: | none → liberty-3 |
Changed in mistral: | |
status: | Fix Committed → Fix Released |
Changed in mistral: | |
milestone: | liberty-3 → liberty |
Fix proposed to branch: master /review. openstack. org/212080
Review: https:/