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 1135442 - Output messages are not accurate after blockpull job is aborted
Summary: Output messages are not accurate after blockpull job is aborted
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Erik Skultety
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-29 10:35 UTC by Yang Yang
Modified: 2015-11-19 05:47 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.2.13-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:47:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Yang Yang 2014-08-29 10:35:40 UTC
Description of problem:
The messages output by virsh command blockpull are not accurate after blockpull job is aborted

Version-Release number of selected component (if applicable):
libvirt-1.2.7-2.el7.x86_64
qemu-kvm-rhev-2.1.0-3.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create 4 disk-only snapshots
# virsh snapshot-list test1
 Name                 Creation Time             State
------------------------------------------------------------
 s1                   2014-08-29 17:06:33 +0800 disk-snapshot
 s2                   2014-08-29 17:06:33 +0800 disk-snapshot
 s3                   2014-08-29 17:06:34 +0800 disk-snapshot
 s4                   2014-08-29 17:06:35 +0800 disk-snapshot

2. Do blockpull
# virsh blockpull test1 hda --wait --verbose
Block Pull: [  4 %]

3. Abort the job before it is completed in another terminal
# virsh blockjob test1 hda --abort

4. check the blockpull terminal
# virsh blockpull test1 hda --wait --verbose
Block Pull: [100 %]
Pull complete


Actual results:
in step 4, return with messages:
Block Pull: [100 %]
Pull complete

Expected results:
in step4, should report message like this:
Block Pull: [10 %]
Pull aborted

Additional info:

Comment 2 Erik Skultety 2014-11-20 12:43:11 UTC
Fixed upstream:

commit a74819d8be25d971e3902f6c4fa26e2c90fbd61c
Author: Erik Skultety <eskultet>
Date:   Thu Nov 13 13:01:04 2014 +0100

    virsh: Fix msg: blockjob is aborted from another client
    
    When a block{pull, copy, commit} is aborted via keyboard interrupt,
    the job is properly canceled followed by proper error message.
    However, when the job receives an abort from another client connected
    to the same domain, the error message incorrectly indicates that
    a blockjob has been finished successfully, though the abort request
    took effect. This patch introduces a new blockjob abort handler, which
    is registered when the client calls block{copy,commit,pull} routine,
    providing its caller the status of the finished blockjob.

v1.2.10-137-ga74819d

Comment 4 Yang Yang 2015-04-30 08:44:14 UTC
Verified on libvirt-1.2.14-1.el7.x86_64

Steps
1. create 3 external snapshots
# virsh snapshot-create-as testvm3 s1 --disk-only --no-metadata
Domain snapshot s1 created
# virsh snapshot-create-as testvm3 s2 --disk-only --no-metadata
Domain snapshot s2 created
# virsh snapshot-create-as testvm3 s3 --disk-only --no-metadata
Domain snapshot s3 created

2. terminate the blockpull job by ctrl+c
# virsh blockpull testvm3 vda --wait --verbose
Block Pull: [ 10 %]^C
Pull aborted
# virsh blockjob testvm3 vda
No current block job for vda

3. abort the job from another terminal

in terminal 1
# virsh blockpull testvm3 vda --wait --verbose
Block Pull: [ 24 %]
Pull aborted

in terminal 2
# virsh blockjob testvm3 vda --info
Block Pull: [ 21 %]

# virsh blockjob testvm3 vda --abort

4. terminate the blockcommit job by ctrl+c
# virsh blockcommit testvm3 vda --wait --verbose --active
Block Commit: [ 19 %]^C
Commit aborted

5. terminate the blockcommit job from another terminal
in terminal 1
# virsh blockcommit testvm3 vda --wait --verbose --active
Block Commit: [ 19 %]
Commit aborted

in terminal 2
# virsh blockjob testvm3 vda --abort

6. terminate the blockcopy job by ctrl+c
# virsh blockcopy testvm3 vda /var/lib/libvirt/images/copy --wait --verbose
Block Copy: [  4 %]^C
Copy aborted

7. terminate the blockcopy job from another terminal
in terminal 1
# virsh blockcopy testvm3 vda /var/lib/libvirt/images/copy --wait --verbose --reuse-external
Block Copy: [  6 %]
Copy aborted

in terminal 2
# virsh blockjob testvm3 vda --abort

Comment 6 Yang Yang 2015-05-18 03:22:16 UTC
According comment #4, mark it as verified.

Comment 8 errata-xmlrpc 2015-11-19 05:47:59 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/RHBA-2015-2202.html


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