Project

Profile

Help

Issue #2749

closed

_release_resource should be acks_late and idempotent

Added by rmcgover almost 7 years ago. Updated almost 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Master
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

In pulp.server.async.tasks, if I look at _release_resource, the job of this task seems to be:

- if a task is still marked as running then mark it as failed
- delete the ReservedResource associated with a task

I notice the task isn't marked as acks_late=True.

Therefore it looks like the following scenario can happen:

- _release_resource task is dequeued & acknowledged from qpid
- body of _release_resource starts executing
- fails to complete e.g. because query to mongo fails
- tasks are left running and ReservedResource is left in DB indefinitely

Should this rather be made idempotent and marked as acks_late=True, so that the task would be retried in the above scenario?

Also available in: Atom PDF