Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1167883

Summary: Report job type in virDomainGetJobInfo
Product: Red Hat Enterprise Linux 7 Reporter: Jiri Denemark <jdenemar>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: dyuan, honzhang, rbalakri, shyu
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 07:47:44 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 Jiri Denemark 2014-11-25 14:55:24 UTC
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 14:56:03 UTC
Fixed upstream by v1.2.10-205-g64b8491:

commit 64b84911cecb82afa7ec08ce206eb1b71f76e04d
Author: Wang Rui <moon.wangrui>
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>
    Signed-off-by: Jiri Denemark <jdenemar>

Comment 5 hongming 2014-12-03 07:37:47 UTC
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 07:47:44 UTC
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