Hide Forgot
Description of problem: virsh domjobinfo doesn't display the o/p, even if job execution would be in progress within the guest. virsh domjobinfo test Job type: None echo $? 0 And evenif there is job running in the VM, the command is returning 0. Version-Release number of selected component (if applicable): libvirtd --version libvirt 1.1.3 How reproducible: Always Steps to Reproduce: 1. When the VM is in a running state, execute some job in the guest. 2. Issue "virsh domjobinfo <guest>". 3. The command doesn't display any result: virsh domjobinfo test Job type: None Actual results: virsh domjobinfo test Job type: None Expected results: virsh domjobinfo test Job type: None It should display the job information in the VM.
What job are you running with the VM? I cannot reproduce this with following steps (using dump): Terminal 1: mkfifo asdf pv -B 1m -L 1m asdf >/dev/null # or anyhow read something/slowly from the file without closing it Terminal 2: virsh dump 3 asdf Terminal 3: virsh domjobinfo 3 virsh domjobabort 3 My results: Terminal 2: virsh dump 3 asdf error: Failed to core dump domain 3 to asdf error: operation aborted: domain core dump job: canceled by client Terminal 3: virsh domjobinfo 3 Job type: Unbounded Time elapsed: 4000 ms Data processed: 5.093 MiB Data remaining: 1015.707 MiB Data total: 1.008 GiB Memory processed: 5.093 MiB Memory remaining: 1015.707 MiB Memory total: 1.008 GiB Constant pages: 460504 Normal pages: 78809 Normal data: 307.848 MiB Expected downtime: 30 ms ms virsh domjobabort 3 echo $? 0
(In reply to Martin Kletzander from comment #1) > What job are you running with the VM? I cannot reproduce this with > following steps (using dump): > > Terminal 1: > mkfifo asdf > pv -B 1m -L 1m asdf >/dev/null # or anyhow read something/slowly from the > file without closing it > > Terminal 2: > virsh dump 3 asdf > > Terminal 3: > virsh domjobinfo 3 > virsh domjobabort 3 > > My results: > Terminal 2: > virsh dump 3 asdf > error: Failed to core dump domain 3 to asdf > error: operation aborted: domain core dump job: canceled by client > > Terminal 3: > virsh domjobinfo 3 > Job type: Unbounded > Time elapsed: 4000 ms > Data processed: 5.093 MiB > Data remaining: 1015.707 MiB > Data total: 1.008 GiB > Memory processed: 5.093 MiB > Memory remaining: 1015.707 MiB > Memory total: 1.008 GiB > Constant pages: 460504 > Normal pages: 78809 > Normal data: 307.848 MiB > Expected downtime: 30 ms > ms > > virsh domjobabort 3 > > echo $? > 0 Hello Martin, Thanks so much for the steps provided. Earlier, I was also running "virsh dump" on the guest, but it was executed over very soon and "virsh domjobinfo" wasn't displaying any information simultaneously. After following the steps, the "virsh domjobinfo test" is displaying the desired o/p as expected: virsh domjobinfo test Job type: Unbounded Time elapsed: 6489 ms Data processed: 45.105 MiB Data remaining: 1.030 GiB Data total: 1.188 GiB Memory processed: 45.105 MiB Memory remaining: 1.030 GiB Memory total: 1.188 GiB Constant pages: 667476 Normal pages: 1469035 Normal data: 5.604 GiB Expected downtime: 30 ms However, the command is returning 0 on success , even if the command is successfully executed. virsh domjobinfo test Job type: Unbounded Time elapsed: 6489 ms Data processed: 45.105 MiB Data remaining: 1.030 GiB Data total: 1.188 GiB Memory processed: 45.105 MiB Memory remaining: 1.030 GiB Memory total: 1.188 GiB Constant pages: 667476 Normal pages: 1469035 Normal data: 5.604 GiB Expected downtime: 30 ms echo $? 0 Whereas, it should be returning 1 as the value. The command is always returning 0 as the value, irrespective of any job being executed or not on the VM. Please share your thoughts. Thanks, Santwana
All processes are expected to return 0 when they exit normally without an error. And virsh is no different in this. And even no running job is a normal situation and not an error.