Bug 1177093

Summary: update-device leaves stale iotune values in domain definition
Product: [Community] Virtualization Tools Reporter: Luyao Huang <lhuang>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: crobinso, dyuan, mzhan, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: LibvirtFirstBug
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-15 15:57:09 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:

Description Luyao Huang 2014-12-24 07:17:41 UTC
description of problem:
vm floppy device iotune will be cleared after update-device but can get it via dumpxml

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

How reproducible:
100%

Steps to Reproduce:

1.prepare a guest have floppy device:
    <disk type='file' device='floppy'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/test6.img'/>
      <target dev='fda' bus='fdc'/>
      <shareable/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

2.start it and set iotune in this device:

# virsh blkdeviotune test4 fda 123 --live

# virsh blkdeviotune test4 fda
total_bytes_sec: 123
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

3.prepare a xml like this (for update-device):

# cat floppydisk.xml
    <disk type='file' device='floppy'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/test6.img'/>
      <target dev='fda' bus='fdc'/>
      <shareable/>
      <iotune>
        <total_bytes_sec>1234</total_bytes_sec>
      </iotune>
    </disk>

4.do update-device
# virsh update-device test4 floppydisk.xml
Device updated successfully

5.cannot see iotune via blkdeviotune:
# virsh blkdeviotune test4 fda
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

6.can see it via dumpxml(the old settings)
# virsh dumpxml test4
    <disk type='file' device='floppy'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/test6.img'/>
      <backingStore/>
      <target dev='fda' bus='fdc'/>
      <iotune>
        <total_bytes_sec>123</total_bytes_sec>
      </iotune>
      <shareable/>
      <alias name='fdc0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

Actual results:
vm floppy device iotune will disappear but can see it via dumpxml after update-device
      
Expected results:
dumpxml and blkdeviotune get the same result after use update-device

Additional info:

Comment 1 Cole Robinson 2016-04-15 15:57:09 UTC
I just tried to reproduce, and the iotune values reported in XML and and via blkdeviotune output match, so I guess this is fixed