<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 28, 2022 at 6:16 PM Tony Liu <<a href="mailto:tonyliu0592@hotmail.com">tonyliu0592@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thank you Erno for pointing it out!<br>
I wonder if I can get a bit more clarifications.<br>
<br>
```<br>
[image_import_opts]<br>
image_import_plugins = ['image_decompression', 'image_conversion']<br>
<br>
[image_conversion]<br>
output_format = raw<br>
```<br>
For example, with the above configuration and web-download method,<br>
to download image.qcow2.gz2 (2GB) and create a raw image (40GB).<br>
The uncompressed image.qcow2 is 10GB.<br>
My understanding is that, image.qcow2.gz2 is downloaded and takes 2GB space.<br>
Then it's decompressed to image.qcow2, and 12GB space is used now.<br>
Then it's converted to raw image to Ceph directly. So the max space required for<br>
this process is 12GB. Is that correct?<br>
<br></blockquote><div>Not exactly.</div><div><br></div><div>The decompression plugin will clean the original compressed image after itself, so it will need 12GB in your example as peak and once its work is finished there will be left that 10GB image, the conversion plugin will do the same. The convert to raw will utilize 50GB of disk space during it's operation and once it's done the 40GB RAW will be in the staging. That will then be uploaded to the destination store(s) before it's cleaned up at the end of the Import taskflow. The reason for this is that there might be other plugins in the chain that still need to have access to that image data before it's sent to the store.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Regarding to recommended local staging directory, doc says "you must configure<br>
each worker with the URL by which the other workers can reach it directly".<br></blockquote><div><br></div><div>Would you mind giving a link to that part of the doc. Sounds like it needs little clarification. That shared access was required for the 'glance-direct' import method as the stage and import calls are different and might land to different nodes. There was work done a couple of cycles ago to mitigate this need and it was never a requirement for the 'web-download' method as that is processed fully on the import request.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Is that because the image processing (download, convert, upload) may be split to<br>
different workers? I would expect the whole process/task is tied to one worker,<br>
because the process is triggered by single request from client. It would be good<br>
to get some clarifications on how this works and why workers need to connect<br>
to each other during image processing.<br></blockquote><div><br></div><div>Initially there was discussion of executing these flows in separate workers, but it has been never tested as no-one has expressed real need for that. I doubt it would work as is considering how coupled some of the import code is currently with the g-api code. <br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
For worker_self_reference_url, would "http://<worker IP>:<glance-api port>" work?<br></blockquote><div><br></div><div>Yes, that should work. <br></div><div><br></div><div>- Erno<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
Thanks!<br>
Tony<br>
________________________________________<br>
From: Erno Kuvaja <<a href="mailto:ekuvaja@redhat.com" target="_blank">ekuvaja@redhat.com</a>><br>
Sent: March 28, 2022 04:13 AM<br>
To: Tony Liu<br>
Cc: openstack-discuss<br>
Subject: Re: [glance] import RBD image<br>
<br>
On Sun, Mar 27, 2022 at 2:10 AM Tony Liu <<a href="mailto:tonyliu0592@hotmail.com" target="_blank">tonyliu0592@hotmail.com</a><mailto:<a href="mailto:tonyliu0592@hotmail.com" target="_blank">tonyliu0592@hotmail.com</a>>> wrote:<br>
Hi,<br>
<br>
There used to be a way to import RBD image with API v1, but not any more with v2.<br>
Is there any other way to do that?<br>
In case given QCOW2 image, It would be much faster and easier to convert it directly<br>
to RBD image with RAW format, than convert it to RAW format on local file system and<br>
upload the RAW image to Glance.<br>
<br>
<br>
Thanks!<br>
Tony<br>
<br>
<br>
Hi Tony,<br>
<br>
There is an image-conversion plugin for Interoperable Image Import for that. Please see <a href="https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html" rel="noreferrer" target="_blank">https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html</a> for the documentation.<br>
<br>
jokke<br>
<br>
<br>
</blockquote></div></div>