Bug 658143

Summary: RFE: Allow to change the maximum migration downtime
Product: Red Hat Enterprise Linux 6 Reporter: RHEL Program Management <pm-rhel>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0CC: abaron, ajia, berrange, cpelland, dallan, danken, dyuan, eblake, gcosta, hbrock, jdenemar, jyang, kxiong, llim, mjenner, plyons, pm-eus, syeghiay, veillard, weizhan, xen-maint, yimwang, yoyzhang
Target Milestone: rcKeywords: FutureFeature, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.8.1-27.el6_0.1 Doc Type: Enhancement
Doc Text:
Live migration of a guest could take an exceptionally long time to converge to the switchover point if the guest was very busy. By allowing to increase the downtime setting of a guest, migration is more likely to complete. However, libvirt was sending an incorrectly formatted request to increase the downtime setting of a guest. With this update, libvirt correctly sends the downtime setting request.
Story Points: ---
Clone Of:
: 658861 (view as bug list) Environment:
Last Closed: 2011-04-14 16:19:10 UTC Type: ---
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: 561935    
Bug Blocks: 658861    

Description RHEL Program Management 2010-11-29 14:10:06 UTC
This bug has been copied from bug #561935 and has been proposed
to be backported to 6.0 z-stream (EUS).

Comment 3 Jiri Denemark 2010-11-29 23:52:10 UTC
Patches built into libvirt-0.8.1-27.el6_0.1

Comment 4 zhanghaiyan 2010-12-01 02:26:33 UTC
Verified this bug PASS with libvirt-0.8.1-27.el6_0.1
- kernel-2.6.32-71.el6.x86_64
- qemu-kvm-0.12.1.2-2.113.el6.x86_64
- qemu-img-0.12.1.2-2.113.el6.x86_64

Test steps
1. Set up migration environment on source host A and destination host B
2. Start domain 'vm1' on host A
   # virsh start vm1
3. In domain vm1 load high i/o with iozone
   # ./iozone -a
4. Live migrate vm1 to host B WITHOUT setting MaxShutdown time
   # virsh migrate --live vm1 qemu+ssh://10.66.93.59/system
5. Migrate the guest back from destination host to source host
6. Live migrate vm1 to host B WITH setting MaxShutdown time
   # virsh migrate --live vm1 qemu+ssh://10.66.93.59/system
7. Before step6 is finished, open another terminal, set maximum tolerable downtime of the domain.
   # virsh migrate-setmaxdowntime  --domain vm1 --downtime 1000
8. Check the /var/log/libvirt/libvirtd.log file on source host


Actual result
Step4
Migration is slow and lasts about 6 seconds.Guest is changed from running -> shutoff status on source host.
Step 7
Migration is faster than in step4. Guest is changed from running -> paused -> shutoff status on source host.
Step 8
Qemu command 'migrate_set_downtime' should be executed successfully as below
.....

04:22:25.213: debug : qemuMonitorJSONCommandWithFd:217 : Send command '{"execute":"migrate_set_downtime","arguments":{"value":1.000000}}' for write with FD -1
04:22:25.214: debug : qemuMonitorJSONIOProcessLine:115 : Line [{"return": {}}]
04:22:25.214: debug : qemuMonitorJSONIOProcess:188 : Total used 16 bytes out of 16 available in buffer
04:22:25.214: debug : qemuMonitorJSONCommandWithFd:222 : Receive command reply ret=0 errno=0 14 bytes '{"return": {}}'
......

Will change this bug status to VERIFIED after it is changed to ON_QA

Comment 5 zhanghaiyan 2010-12-21 07:14:57 UTC
Verified this bug PASS with libvirt-0.8.1-27.el6_0.2.x86_64
- kernel-2.6.32-71.13.1.el6.x86_64
- qemu-kvm-0.12.1.2-2.113.el6_0.5.x86_64

Test steps and actual result are the same in comment 4

Comment 7 koka xiong 2011-01-31 08:20:19 UTC
Verified with
libvirt: libvirt-0.8.1-27.el6_0.3
kernel: kernel-2.6.32-71.16.1.el6
qemu-kvm: qemu-kvm-0.12.1.2-2.113.el6_0.6

Test steps
1. Set up migration environment on source host A and destination host B
2. Start domain 'vm1' on host A
   # virsh start vm1
3. In domain vm1 load high i/o with iozone
   # ./iozone -a
4. Live migrate vm1 to host B WITHOUT setting MaxShutdown time
   # virsh migrate --live vm1 qemu+ssh://10.66.93.59/system
5. Migrate the guest back from destination host to source host
6. Live migrate vm1 to host B WITH setting MaxShutdown time
   # virsh migrate --live vm1 qemu+ssh://10.66.93.59/system
7. Before step6 is finished, open another terminal, set maximum tolerable
downtime of the domain.
   # virsh migrate-setmaxdowntime  --domain vm1 --downtime 1000
8. Check the /var/log/libvirt/libvirtd.log file on source host


Actual result
Step4
Migration is slow and lasts about 6 seconds.Guest is changed from running ->
shutoff status on source host.
Step 7
Migration is faster than in step4. Guest is changed from running -> paused ->
shutoff status on source host.
Step 8
Qemu command 'migrate_set_downtime' should be executed successfully as below
.....

04:22:25.213: debug : qemuMonitorJSONCommandWithFd:217 : Send command
'{"execute":"migrate_set_downtime","arguments":{"value":1.000000}}' for write
with FD -1
04:22:25.214: debug : qemuMonitorJSONIOProcessLine:115 : Line [{"return": {}}]
04:22:25.214: debug : qemuMonitorJSONIOProcess:188 : Total used 16 bytes out of
16 available in buffer
04:22:25.214: debug : qemuMonitorJSONCommandWithFd:222 : Receive command reply
ret=0 errno=0 14 bytes '{"return": {}}'
......

Comment 8 errata-xmlrpc 2011-04-14 16:19:10 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0446.html

Comment 9 Martin Prpič 2011-04-15 14:18:24 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Live migration of a guest could take an exceptionally long time to converge to the switchover point if the guest was very busy. By allowing to increase the downtime setting of a guest, migration is more likely to complete. However, libvirt was sending an incorrectly formatted request to increase the downtime setting of a guest. With this update, libvirt correctly sends the downtime setting request.