Change in vdsm[ovirt-3.5]: lun: Serial attr should not passed to libvirt for lun disks.
mlipchuk at redhat.com
mlipchuk at redhat.com
Thu Jan 21 10:31:42 UTC 2016
Maor Lipchuk has posted comments on this change.
Change subject: lun: Serial attr should not passed to libvirt for lun disks.
......................................................................
Patch Set 4:
(1 comment)
https://gerrit.ovirt.org/#/c/52463/4/tests/vmTests.py
File tests/vmTests.py:
Line 851: zip(devConfs, expectedXMLs, blockDevs, vmConfs):
Line 852: drive = vm.Drive(vmConf, self.log, **devConf)
Line 853: # Patch Drive.blockDev to skip the block device checking.
Line 854: drive._blockDev = blockDev
Line 855: xmlForCompare = xml if devConf['device'] == 'lun' else xml % SERIAL
> I expect this to raise a TypeError for not-lun devices, when
before this change all drives were compared with the SERIAL attribute, I changed this so only lun devices will not be added with the serial attribute, so all non-lun devices should be tested as before.
I printed the xmlForCompare for all the devices, this is the output:
<disk device="cdrom" snapshot="no" type="file">
<source file="/tmp/fedora.iso" startupPolicy="optional"/>
<target bus="ide" dev="hdc"/>
<readonly/>
<serial>54-a672-23e5b495a9ea</serial>
</disk>
<disk device="disk" snapshot="no" type="file">
<source file="/tmp/disk1.img"/>
<target bus="virtio" dev="vda"/>
<shareable/>
<serial>54-a672-23e5b495a9ea</serial>
<driver cache="writethrough" error_policy="enospace"
io="threads" name="qemu" type="qcow2"/>
<iotune>
<read_bytes_sec>6120000</read_bytes_sec>
<total_iops_sec>800</total_iops_sec>
</iotune>
</disk>
<disk device="disk" snapshot="no" type="block">
<source dev="/dev/mapper/lun1"/>
<target bus="virtio" dev="vda"/>
<serial>54-a672-23e5b495a9ea</serial>
<driver cache="none" error_policy="stop"
io="native" name="qemu" type="raw"/>
</disk>
<disk device="disk" snapshot="no" type="file">
<source file="/tmp/disk1.img"/>
<target bus="scsi" dev="sda"/>
<serial>54-a672-23e5b495a9ea</serial>
<driver cache="none" error_policy="stop"
io="threads" name="qemu" type="raw"/>
</disk>
<disk device="lun" sgio="unfiltered" snapshot="no" type="block">
<source dev="/dev/mapper/lun1"/>
<target bus="scsi" dev="sda"/>
<driver cache="none" error_policy="stop"
io="native" name="qemu" type="raw"/>
</disk>
Line 856: self.assertXML(drive.getXML(), xmlForCompare)
Line 857:
Line 858: def testIoTuneException(self):
Line 859: SERIAL = '54-a672-23e5b495a9ea'
--
To view, visit https://gerrit.ovirt.org/52463
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I41abb2b7d7f5950e65710379a0655399014afd83
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list