Bug 1006864 - virsh domjobinfo command returns 1 on success if there is no job
virsh domjobinfo command returns 1 on success if there is no job
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jiri Denemark
Virtualization Bugs
: Upstream
Depends On:
  Show dependency treegraph
Reported: 2013-09-11 08:13 EDT by Pavel Hrdina
Modified: 2014-06-17 20:55 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-1.1.1-5.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-06-13 09:23:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pavel Hrdina 2013-09-11 08:13:39 EDT
Description of problem:
The virsh command domjobinfo returns 1 on success if there is no job.

Version-Release number of selected component (if applicable):
upstream, libvirt-1.1.1-4.el7.x86_64

How reproducible:

Steps to Reproduce:
1. virsh start domain
2. virsh domjobinfo domain

Actual results:
Job type:         None

echo $? -> 1

Expected results:
Job type:         None

echo $? -> 0
Comment 1 Jiri Denemark 2013-09-12 05:34:56 EDT
Fixed upstream by v1.1.2-107-gf084caa:

commit f084caae7c5db8ae03e7fafce164c73f65681843
Author: Jiri Denemark <jdenemar@redhat.com>
Date:   Wed Sep 11 15:49:48 2013 +0200

    virsh domjobinfo: Do not return 1 if job is NONE
    Commit 38ab1225 changed the default value of ret from true to false but
    forgot to set ret = true when job is NONE. Thus, virsh domjobinfo
    returned 1 when there was no job running for a domain but it used to
    (and should) return 0 in this case.
Comment 3 Hao Liu 2013-09-15 23:36:13 EDT
This patch is VERIFIED.

Package used:

Verifying steps:

# virsh domjobinfo <domain>
Job type:         None        
# echo $?

In comparison with returning value 1 in

So consider this VERIFIED.
Comment 4 Ludek Smid 2014-06-13 09:23:01 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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