Commit 6cb9dfa0 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Fix quota bug in snf-dispatcher

Clear the 'vm.serial' field after processing a job that was not
expected. When processing such a job, we reject the pending commission
and issue a new one that reflects the unexpected job. However, since we
reject the commission that is associated with the 'vm.task_job_id' job,
we must also clear the expected serial. Otherwise, when the
'vm.task_job_id' completes, we will not issue a new commission as it is
parent 44effeff
......@@ -113,6 +113,11 @@ def handle_vm_quotas(vm, job_id, job_opcode, job_status, job_fields):
log.debug("Issued new commission: %s", vm.serial)
# NOTE: Since we rejected the serial that was associated with the
# 'vm.task_job_id' job, we must also clear the 'vm.serial' field.
# If not, there will be no new commission for the 'vm.task_job_id'
# job!
vm.serial = None
return vm
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment