Bug 1313304

Summary: Libvirt randomly reports different info types when job is cancelled
Product: [Community] Virtualization Tools Reporter: Pawel Koniszewski <pawel.koniszewski>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED WORKSFORME QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, crobinso, dyuan, fjin, mzhan, pawel.koniszewski, yafu, zpeng
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-18 13:51:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pawel Koniszewski 2016-03-01 11:14:58 UTC
Description of problem:
So I have an Instance that I want to live migrate. I start migration job, but in the middle of the process I decide to abort it. Everything goes fine, I'm getting libvirt error for the migration job:

libvirtError: operation aborted: migration job: canceled by client

and that's okay. However, I'm also checking info type of a running job, and here I'm getting two different values randomly: VIR_DOMAIN_JOB_FAILED and VIR_DOMAIN_JOB_CANCELLED

Version-Release number of selected component (if applicable): 1.2.16

How reproducible: Randomly, looks like a race condition

Steps to Reproduce:
1. Boot a VM
2. Start live migration
3. Abort job
4. Check job info type
5. Sometimes it will report VIR_DOMAIN_JOB_FAILED, and sometimes VIR_DOMAIN_JOB_CANCELLED, while always returning an error that job was cancelled by user

Actual results:
Randomly chosen info type between VIR_DOMAIN_JOB_FAILED and VIR_DOMAIN_JOB_CANCELLED

Expected results:
It always should report VIR_DOMAIN_JOB_CANCELLED

Comment 1 Cole Robinson 2016-04-10 22:15:44 UTC
What qemu version is this?
What distro are you using?
When you say randomly, you mean 'random across migration jobs' and not 'random across job info calls', as in once it reports FAILED it always reports FAILED until you try another migration?

Comment 2 Pawel Koniszewski 2016-04-11 07:12:51 UTC
It's Ubuntu 15.10 with QEMU 2.3

Yeah, I should have been more specific with what I mean by 'randomly'. Once it reports FAILED it always reports FAILED. Let's say - you aborted two live migration jobs, one reports FAILED (and it always reports FAILED), the other one reports CANCELLED (and it always reports CANCELLED), while both returns an error that job was cancelled by user.

Comment 3 Daniel Berrangé 2021-08-18 13:51:49 UTC
Unable to reproduce this problem and so given the age I'm going to close it.