[virt-tools-list] virt-install should copy libvirt storage pool auth element and all source hosts to domain xml

Cole Robinson crobinso at redhat.com
Tue Jan 30 16:34:04 UTC 2018


On 01/29/2018 01:37 AM, Rauno Väli wrote:
> libvirt pool dumpxml:
> <pool type='rbd'>
>   <name>rbd.test</name>
>   <uuid>57e55e10-63c9-4166-861c-f330d868260c</uuid>
>   <capacity unit='bytes'>36792725520384</capacity>
>   <allocation unit='bytes'>760411510361</allocation>
>   <available unit='bytes'>34510461812736</available>
>   <source>
>     <host name='10.10.40.1' port='6789'/>
>     <host name='10.10.40.2' port='6789'/>
>     <host name='10.10.40.3' port='6789'/>
>     <name>rbd.test</name>
>     <auth type='ceph' username='admin'>
>       <secret uuid='f65cc5a8-b77b-4254-9030-d50a528fb456'/>
>     </auth>
>   </source>
> </pool>
> 
> with this patch i get correct disk definition using virt-install:
> ...
>     <disk type='network' device='disk'>
>       <driver name='qemu' type='raw' cache='writeback'/>
>       <auth username='admin'>
>         <secret type='ceph' uuid='f65cc5a8-b77b-4254-9030-d50a528fb456'/>
>       </auth>
>       <source protocol='rbd'
> name='rbd.test/50845b54-0ed6-48e9-8d84-07b2cd2c0c4d.img'>
>         <host name='10.10.40.1' port='6789'/>
>         <host name='10.10.40.2' port='6789'/>
>         <host name='10.10.40.3' port='6789'/>
>       </source>
>       <target dev='vda' bus='virtio'/>
>       <alias name='virtio-disk0'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
> function='0x0'/>
>     </disk>
> ...
> 
> Without the patch it took only one host entry and no auth element. so
> the domain would fail.
> 

Thanks! I stuffed in some test coverage, fixed some pylint warnings,
tweaked the commit message, and pushed your patch now.

Thanks,
Cole




More information about the virt-tools-list mailing list