[Kimchi-devel] [PATCH v2][Kimchi] Fix disk creation when pool is netfs

Aline Manera alinefm at linux.vnet.ibm.com
Thu Dec 10 21:06:22 UTC 2015



On 10/12/2015 19:05, Aline Manera wrote:
>
> I also tried this patch and I got the same result while running 
> make-check:

The same result when comparing to the V1 of this patch

>
> ======================================================================
> ERROR: test_scsi_fc_storage (test_rest.HttpsRestTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "test_rest.py", line 967, in test_scsi_fc_storage
>     self.assertEquals('running', vm['state'])
> KeyError: 'state'
>
> ======================================================================
> ERROR: test_scsi_fc_storage (test_rest.RestTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "test_rest.py", line 967, in test_scsi_fc_storage
>     self.assertEquals('running', vm['state'])
> KeyError: 'state'
>
>
>
> On 10/12/2015 13:24, Ramon Medeiros wrote:
>> Instead of add io=native for all disks, add only if disk is in a netfs
>> pool.
>>
>> Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
>>
>> Changes:
>>
>> v2:
>>
>> Instead of passing the complete pool information, pass just pool type.
>> ---
>>   vmtemplate.py    | 2 +-
>>   xmlutils/disk.py | 4 +++-
>>   2 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/vmtemplate.py b/vmtemplate.py
>> index b90f221..6299a0a 100644
>> --- a/vmtemplate.py
>> +++ b/vmtemplate.py
>> @@ -213,7 +213,7 @@ class VMTemplate(object):
>>                   img = "%s-%s.img" % (vm_uuid, params['index'])
>>                   storage_path = 
>> self._get_storage_path(disk['pool']['name'])
>>                   params['path'] = os.path.join(storage_path, img)
>> -
>> +                params['pool_type'] = disk['pool']['type']
>>               disks_xml += get_disk_xml(params)[1]
>>
>>           return unicode(disks_xml, 'utf-8')
>> diff --git a/xmlutils/disk.py b/xmlutils/disk.py
>> index 2ed2ef4..a2035cb 100644
>> --- a/xmlutils/disk.py
>> +++ b/xmlutils/disk.py
>> @@ -53,7 +53,9 @@ def get_disk_xml(params):
>>       driver = E.driver(name='qemu', type=params['format'])
>>       if params['type'] != 'cdrom':
>>           driver.set('cache', 'none')
>> -        driver.set("io", "native")
>> +
>> +        if params['pool_type'] == "netfs":
>> +            driver.set("io", "native")
>>
>>       disk.append(driver)
>>
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>




More information about the Kimchi-devel mailing list