Bug 997878 - Kill -SIGUSR1 `pidof qemu-img convert` can not get progress of qemu-img
Kill -SIGUSR1 `pidof qemu-img convert` can not get progress of qemu-img
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Kevin Wolf
Virtualization Bugs
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-16 07:07 EDT by juzhang
Modified: 2014-06-17 23:34 EDT (History)
6 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-47.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 07:02:41 EDT
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)

  None (edit)
Description juzhang 2013-08-16 07:07:02 EDT
Description of problem:
Kill -SIGUSR1 `pidof qemu-img convert` can not get progress of qemu-img 

Version-Release number of selected component (if applicable):
qemu-img-1.5.2-3.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Convert image format from qcow2 to qcow2/qcow2_v3
qemu-img convert -p /home/rhel7cp1.qcow2 -f qcow2 -O qcow2 -o compat=1.1 test.qcow2_v3
2. Issue "kill -SIGUSR1 `pidof qemu-img`" during the rebase

Actual results:
can not get progress of qemu-img 

Expected results:
Be able to get progress of qemu-img like the following image
#qemu-img convert /home/win7.qcow2 -f qcow2 -O qcow2 test.qcow2
    (2.01/100%)
    (8.02/100%)
    (10.03/100%)
    (12.03/100%)
    (14.04/100%)
    (16.04/100%)
    (18.05/100%)
    (24.06/100%)
    (26.07/100%)
    (28.07/100%)
    (30.08/100%)
    (74.19/100%)

Additional info:
1. I tried rhel6.5 qemu-img, can get the get progress of qemu-img
2. I checked the history bug and found that we supported this feature from https://bugzilla.redhat.com/show_bug.cgi?id=621482#c25
Comment 3 Miroslav Rezanina 2014-02-12 07:02:35 EST
Fix included in qemu-kvm-1.5.3-47.el7
Comment 5 Sibiao Luo 2014-02-13 22:04:10 EST
Still hit it with qemu-kvm-1.5.3-47.el7.x86_64, it fail to fix, re-assign again.

host info:
# uname -r && rpm -q qemu-kvm
3.10.0-86.el7.x86_64
qemu-kvm-1.5.3-47.el7.x86_64

# qemu-img info /home/win2008r2-64-virtio.qcow2
image: /home/win2008r2-64-virtio.qcow2
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 7.1G
cluster_size: 65536
Format specific information:
    compat: 0.10

# qemu-img convert -p /home/win2008r2-64-virtio.qcow2 -f qcow2 -O qcow2 -o compat=1.1 test.qcow2
^C  (20.70/100%)

Best Regards,
sluo
Comment 6 Kevin Wolf 2014-02-14 05:43:45 EST
Three things are confusing me about your failed test case:

1. You don't mention any command to even send SIGUSR1
2. The output you pasted does contain a percentage
3. Why do you use -p for testing SIGUSR1 handling? SIGUSR1 doesnt' have any
   effect with -p because -p always prints the progress, even without a signal.

Can you clarify, please?


Locally, I confirmed once more that the bug is indeed fixed for me:

Terminal 1:
$ qemu-img convert -O qcow2 ~/images/f18.qcow2 /tmp/out.qcow2
    (25.59/100%)
    (29.63/100%)
    (32.65/100%)
    (46.55/100%)

Terminal 2:
$ killall -SIGUSR1 qemu-img
$ killall -SIGUSR1 qemu-img
$ killall -SIGUSR1 qemu-img
$ killall -SIGUSR1 qemu-img
Comment 7 Sibiao Luo 2014-02-16 21:51:20 EST
(In reply to Kevin Wolf from comment #6)
> Three things are confusing me about your failed test case:
> 
> 1. You don't mention any command to even send SIGUSR1
> 2. The output you pasted does contain a percentage
> 3. Why do you use -p for testing SIGUSR1 handling? SIGUSR1 doesnt' have any
>    effect with -p because -p always prints the progress, even without a
> signal.
> 
> Can you clarify, please?
> 
OK, thanks for your point it out.
> Locally, I confirmed once more that the bug is indeed fixed for me:
> 
> Terminal 1:
> $ qemu-img convert -O qcow2 ~/images/f18.qcow2 /tmp/out.qcow2
>     (25.59/100%)
>     (29.63/100%)
>     (32.65/100%)
>     (46.55/100%)
> 
> Terminal 2:
> $ killall -SIGUSR1 qemu-img
> $ killall -SIGUSR1 qemu-img
> $ killall -SIGUSR1 qemu-img
> $ killall -SIGUSR1 qemu-img

Verified it with your instruction with qemu-kvm-1.5.3-47.el7.x86_64.
host info:
3.10.0-86.el7.x86_64
qemu-kvm-1.5.3-47.el7.x86_64

- Terminal 1:
# qemu-img convert /home/win2008r2-64-virtio.qcow2 -f qcow2 -O qcow2 -o compat=1.1 test.qcow2
    (8.70/100%)
    (10.70/100%)
    (12.71/100%)
    (16.72/100%)
    (20.73/100%)

- Terminal 2:
# kill -SIGUSR1 `pidof qemu-img`
# kill -SIGUSR1 `pidof qemu-img`
# kill -SIGUSR1 `pidof qemu-img`
# kill -SIGUSR1 `pidof qemu-img`
# kill -SIGUSR1 `pidof qemu-img`

Be able to get progress of qemu-img when kill -SIGUSR1 `pidof qemu-img convert`.

Base on above, this issue has been fixed correctly, move to VERIFIED status.

Best Regards,
sluo
Comment 9 Ludek Smid 2014-06-13 07:02:41 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.