Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1167883 - Report job type in virDomainGetJobInfo
Report job type in virDomainGetJobInfo
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.1
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jiri Denemark
Virtualization Bugs
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-25 09:55 EST by Jiri Denemark
Modified: 2015-03-05 02:47 EST (History)
4 users (show)

See Also:
Fixed In Version: libvirt-1.2.8-10.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 02:47:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 07:10:54 EST

  None (edit)
Description Jiri Denemark 2014-11-25 09:55:24 EST
Description of problem:

Due to a bug in patches for bug 1063724, virDomainGetJobInfo always reports type as VIR_DOMAIN_JOB_NONE (0).

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

libvirt-1.2.8-9.el7

How reproducible:

100%

Steps to Reproduce:
1. start a domain and run migration or managed-save on it
2. python
>>> import libvirt
>>> con = libvirt.open('')
>>> dom = con.lookupByName(NAME)
>>> dom.jobInfo()

Actual results:

[0, 198L, 0L, 151453696L, 32804528L, 99704832L, 151453696L, 32804528L, 99704832L, 0L, 0L, 0L]

The first item (0) is the job type.

Expected results:

[2, ...]

Additional info:

virsh domjobinfo works because it uses virDomainGetJobStats when available which makes it unusable for testing this bug.
Comment 1 Jiri Denemark 2014-11-25 09:56:03 EST
Fixed upstream by v1.2.10-205-g64b8491:

commit 64b84911cecb82afa7ec08ce206eb1b71f76e04d
Author: Wang Rui <moon.wangrui@huawei.com>
Date:   Tue Nov 25 19:51:45 2014 +0800

    qemu: add the missing jobinfo type in qemuDomainGetJobInfo
    
    Commit 6fcddfcd refactored job statistics but missed the jobinfo type updated
    in qemuDomainGetJobInfo. After this patch, we can use virDomainGetJobInfo to
    get jobinfo type again.
    
    Signed-off-by: Wang Rui <moon.wangrui@huawei.com>
    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Comment 5 hongming 2014-12-03 02:37:47 EST
Verify it as follows. The result is expected. Move its status to VERIFIED.

Run the script in the first terminal

[root@localhost /]# cat test.py
#!/bin/python
import time
import libvirt

con = libvirt.open('')
dom = con.lookupByName('r7')
while 1: 
    time.sleep(0.5)
    jbstr = dom.jobInfo()
    nullstr = [0, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L]
    if cmp(jbstr , nullstr) != 0:
        
        print dom.jobInfo()
        break

[root@localhost /]# ./test.py




Run the following in the second terminal

[root@localhost /]# virsh managedsave r7

Domain r7 state saved by libvirt\


Get the job info in the first terminal 

# ./test.py 
[2, 166L, 0L, 1208963072L, 0L, 642588672L, 1208963072L, 0L, 642588672L, 0L, 0L, 0L]
Comment 7 errata-xmlrpc 2015-03-05 02:47:44 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0323.html

Note You need to log in before you can comment on or make changes to this bug.