[virt-tools-list] [PATCH] Fix selection of network volumes

Jim Fehlig jfehlig at suse.com
Fri Oct 12 17:15:12 UTC 2018


On 10/12/18 9:57 AM, Cole Robinson wrote:
> On 10/09/2018 04:30 PM, Jim Fehlig wrote:
>> When creating a new VM and selecting a volume from a network-based
>> storage pool such as rbd, the volume is not recognized as network-based
>> and is treated as a volume from a directory storage pool.
>>
>> This patch adds a method to check if the volume's path points to a
>> network-based volume, then uses the method to avoid actions like
>> setting unix file permissions on the volume, which doesn't make
>> sense for a network-based volume.
>>
>> Signed-off-by: Jim Fehlig <jfehlig at suse.com>
>> ---
>>   virtinst/devices/disk.py |  4 ++++
>>   virtinst/diskbackend.py  | 18 +++++++++++++++++-
>>   2 files changed, 21 insertions(+), 1 deletion(-)
>>
> 
> In the process of testing this I moved some code around so I needed to rebase. I 
> also changed the is_network_vol check to use the volume XML cache for 
> fetch_all_vols rather than do a libvirt API lookup+vol.info() check... the 
> libvirt test driver doesn't fill in accurate voltype data in vol.info so I 
> couldn't test that method, plus the cache should be faster in general

Cool, thanks for the improvement.

> Updated patch is attached but not pushed, can you verify it still works for you?

Works fine!

Regards,
Jim




More information about the virt-tools-list mailing list