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 - Report job type in virDomainGetJobInfo
Summary: Report job type in virDomainGetJobInfo
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-25 14:55 UTC by Jiri Denemark
Modified: 2015-03-05 07:47 UTC (History)
4 users (show)

Fixed In Version: libvirt-1.2.8-10.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:47:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

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


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