Bug 927495

Summary: Improve the error handle about option --timeout of command blockpull , blockcopy
Product: Red Hat Enterprise Linux 7 Reporter: Luwen Su <lsu>
Component: libvirtAssignee: Ján Tomko <jtomko>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, chhu, cwei, dyuan, jtomko, mzhan, shyu, ydu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.0.4-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 927556 (view as bug list) Environment:
Last Closed: 2014-06-13 12:19:05 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:
Bug Depends On:    
Bug Blocks: 927556    

Description Luwen Su 2013-03-26 04:37:21 UTC
Description of problem:
The code about option --timeout of command blockpull , blockcopy don't handle char type properly , and then it will lead to something like

1.
#virsh blockcopy test1 vda /var/lib/libvirt/images/bak3 --wait --timeout /
Now in mirroring phase
# echo $?
0

2.
#virsh blockcopy test1 vda /var/lib/libvirt/images/bak4 --wait --timeout asdfasdf
Now in mirroring phase




Version-Release number of selected component (if applicable):
libvirt-1.0.3-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create a domain:
#virsh create vm1.xml
Domain vm1 created from vm1.xml


2. Do block copy for vda
# virsh blockcopy test1 vda /var/lib/libvirt/images/bak3 --wait --timeout /

Now in mirroring phase
# echo $?
0

Actual results:
Not perproly

Expected results:
Fix it

Comment 2 Ján Tomko 2013-03-26 16:37:10 UTC
Fixed upstream by:
commit 41db895f9e9efd51452568678759d6241e3ed84c
Author:     Ján Tomko <jtomko>
AuthorDate: 2013-03-26 16:41:06 +0100
Commit:     Ján Tomko <jtomko>
CommitDate: 2013-03-26 17:28:36 +0100

    virsh: error out on non-numeric timeout values
    
    Some block commands and migrate ignored incorrect values.

Comment 3 Shanzhi Yu 2013-04-11 07:12:39 UTC
Verified pass this bug on libvirt-1.0.4-1.el7.x86_64:

# rpm -q libvirt
libvirt-1.0.4-1.el7.x86_64

1. create a domain:

#virsh create guest.xml
Domain rhel-qcow2 created from guest.xml

2. Do block copy for rhel-qcow2

# virsh blockcopy rhel-qcow2 /var/lib/libvirt/images/kvm-rhel6.2-x86_64-qcow2.img  ./ --wait --timeout /
error: invalid timeout
#echo $?
1

3. Do block pull for rhel-qcow2

# virsh blockpull rhel-qcow2 /var/lib/libvirt/images/kvm-rhel6.2-x86_64-qcow2.img  --wait --timeout /
error: invalid timeout

so set VERIFIED

Comment 4 Shanzhi Yu 2013-04-11 07:47:54 UTC
This issue can reproduce with libvirt-1.0.3-1.el7.x86_64, Verified with the packages: libvirt-1.0.4-1.el7.x86_64.

Steps as Comment 3

Comment 5 Ludek Smid 2014-06-13 12:19:05 UTC
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.