Sorry to insist but I don't see how it can work. I probably miss something but in the function _fetch_vhd_image(), first we download the vhd image in the repository that corresponds to the SR. So after
vdis contains the name of the file. Not the UUID of the vdi that will be created when we will invoke the sr-scan. So at this point we send a request to glance to download the image and it is stored in the directory:
# ls /usr/share/xapi/images
951e5aa6-7ef6-43ad-8edd-79edb4ad428e.vhd
the value of vdis is: vdis = 'root': {'uuid': '951e5aa6-7ef...-79edb4ad428e'}}
and the VHD is not seen yet by the SR in Xen.
The next step is to scan the SR so we will be able to see the VHD file. The result is that the UUID is attributed to the disk and we can see it now:
but the content of vdis is always the same. So I don't understand how we can retrieve information of a disk wih UUID=951e5aa6-7ef6-43ad-8edd-79edb4ad428e from Xen. The UUID seems invalid.
I tried to go deeper but I'm lost when _call_glance_plugin() is called. Don't hesitate to ask for more information. I can get some trace from pdb or things like that.
Sorry to insist but I don't see how it can work. I probably miss something but in the function _fetch_vhd_image(), first we download the vhd image in the repository that corresponds to the SR. So after
vdis = handler. download_ image(context, session, instance, image_id)
vdis contains the name of the file. Not the UUID of the vdi that will be created when we will invoke the sr-scan. So at this point we send a request to glance to download the image and it is stored in the directory:
# ls /usr/share/ xapi/images 7ef6-43ad- 8edd-79edb4ad42 8e.vhd
951e5aa6-
the value of vdis is: vdis = 'root': {'uuid': '951e5aa6- 7ef...- 79edb4ad428e' }}
and the VHD is not seen yet by the SR in Xen.
The next step is to scan the SR so we will be able to see the VHD file. The result is that the UUID is attributed to the disk and we can see it now:
# xe vdi-list dacf-7b8d- 4f95-c5d8356913 83
name- label ( RW): 951e5aa6- 7ef6-43ad- 8edd-79edb4ad42 8e.vhd description ( RW):
sr- uuid ( RO): 106ab117- 5431-0931- 889b-6c534cd061 c6
virtual- size ( RO): 2299062272
sharable ( RO): false
read- only ( RO): false
uuid ( RO) : acd06ed8-
name-
but the content of vdis is always the same. So I don't understand how we can retrieve information of a disk wih UUID=951e5aa6- 7ef6-43ad- 8edd-79edb4ad42 8e from Xen. The UUID seems invalid.
I tried to go deeper but I'm lost when _call_glance_ plugin( ) is called. Don't hesitate to ask for more information. I can get some trace from pdb or things like that.