<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:SimSun}
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
a:link, span.MsoHyperlink
        {color:#0563C1;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:#954F72;
        text-decoration:underline}
p
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif}
span.emailstyle17
        {font-family:"Calibri",sans-serif;
        color:windowtext}
span.EmailStyle21
        {font-family:"Calibri",sans-serif;
        color:#1F497D}
.MsoChpDefault
        {font-size:10.0pt;
        font-family:"Calibri",sans-serif}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
ol
        {margin-bottom:0in}
ul
        {margin-bottom:0in}
-->
</style><style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0" vlink="#954F72" link="#0563C1" lang="EN-US">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>Hey Liang,</div>
<div><br>
</div>
<div>When we saw the IO error, we had created 20 boot from volume instances at once with the following flavor: 8gb rootfs, 8gb ephemeral and 512 meg swap, using a qcow2 Centos7 image (quite large, not sure what you've been using in your tests).</div>
<div><br>
</div>
<div>Irina<br>
</div>
<div><br>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF832001" style="direction: ltr;"><font size="2" face="Tahoma" color="#000000"><b>From:</b> Fang, Liang A [liang.a.fang@intel.com]<br>
<b>Sent:</b> Tuesday, November 27, 2018 5:36 AM<br>
<b>To:</b> Mihai, Irina<br>
<b>Cc:</b> 'starlingx-discuss@lists.starlingx.io'<br>
<b>Subject:</b> RE: [Starlingx-discuss] [cinder] Analysis of patch c45bb0e for StartlingX upstreaming<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi Irina</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks for the info. Some status:</span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="color:#1F497D"><span style="">-<span style="font:7.0pt "Times New Roman"">         
</span></span></span><span style="color:#1F497D">I can reproduce the issue that solved in _convert_image(). The issue I reproduced may be not the same one as the original issue this patch to fix. Reproduced by: uploading a volume to image, but with insufficient
 space in image_conversion_dir. </span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="color:#1F497D"><span style="">-<span style="font:7.0pt "Times New Roman"">         
</span></span></span><span style="color:#1F497D">But I still cannot reproduce the issue solved in _create_from_image_cache_or_download() even with multiple volume creating requests. Take two requests as example, the second request will be rejected by image_utils.check_available_space()
 at the beginning of _create_from_image_cache_or_download(). If I add debug code - sleep(60) after the line of image_utils.check_available_space, so that both two requests can pass the check, but the second request will raise exception(ImageTooBig) and be caught
 in the line 777, 810: “image_utils.TemporaryImages.fetch”. And I take a look of other code following, don’t find any chance of raising “IOError”.</span></p>
<p class="MsoListParagraph" style="margin-left:1.0in; text-indent:-.25in"><span style="font-family:"Courier New"; color:#1F497D"><span style="">o<span style="font:7.0pt "Times New Roman"">  
</span></span></span><span style="color:#1F497D">verify_glance_image_signature</span></p>
<p class="MsoListParagraph" style="margin-left:1.0in; text-indent:-.25in"><span style="font-family:"Courier New"; color:#1F497D"><span style="">o<span style="font:7.0pt "Times New Roman"">  
</span></span></span><span style="color:#1F497D">volume_glance_metadata_bulk_create</span></p>
<p class="MsoListParagraph" style="margin-left:1.0in; text-indent:-.25in"><span style="font-family:"Courier New"; color:#1F497D"><span style="">o<span style="font:7.0pt "Times New Roman"">  
</span></span></span><span style="color:#1F497D">qemu_img_info</span></p>
<p class="MsoListParagraph" style="margin-left:1.0in; text-indent:-.25in"><span style="font-family:"Courier New"; color:#1F497D"><span style="">o<span style="font:7.0pt "Times New Roman"">  
</span></span></span><span style="color:#1F497D">check_virtual_size</span></p>
<p class="MsoListParagraph" style="margin-left:1.0in; text-indent:-.25in"><span style="font-family:"Courier New"; color:#1F497D"><span style="">o<span style="font:7.0pt "Times New Roman"">  
</span></span></span><span style="color:#1F497D">_create_from_image_download: This will re-use image file. Even insufficient space happen, the exception be re-raised is exception.InsufficientConversionSpace, not “IOError”.</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">If you can get the original reproduce steps, that would be great!</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Some info related:</span></p>
<p class="MsoNormal"><span style="color:#1F497D">Change-Id: Ie5eba32f92eb1740554bfc44baf612e326d6fde5, submitted in this year, with 4 commits, shows dest will be a volume. So unlikely be the same as image_conversion_dir.</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks,</span></p>
<p class="MsoNormal"><span style="color:#1F497D">Liang<a name="_MailEndCompose"></a></span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><a name="_____replyseparator"></a><b>From:</b> Mihai, Irina [mailto:Irina.Mihai@windriver.com]
<br>
<b>Sent:</b> Tuesday, November 27, 2018 1:25 AM<br>
<b>To:</b> Fang, Liang A <liang.a.fang@intel.com><br>
<b>Cc:</b> 'starlingx-discuss@lists.starlingx.io' <starlingx-discuss@lists.starlingx.io><br>
<b>Subject:</b> RE: [Starlingx-discuss] [cinder] Analysis of patch c45bb0e for StartlingX upstreaming</p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black">Hi Liang,</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black">This patch was covering the scenario when we're trying to create multiple volumes from image at the same time.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black">In this situation, multiple downloads/convertions would be allowed to start since there would still be conversion space left, but eventually the operation would
 fail because of the disk being full. This is not caught by any of the "ImageTooBig" or "ImageUnacceptable" exceptions.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Courier New"; color:black">Could you please help to address one doubt: why image is converted in the same location with image itself? This patch is to create a volume from image, right?
</span><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black">Right, but I'm not aware of the reasoning behind this. However, if the used image is qcow2 then it needs to be converted to raw before being saved to the volume.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black">Please let me know if I can help in any other way.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black">Thanks,</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black">Irina</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black"> </span></p>
</div>
<div>
<div class="MsoNormal" style="text-align:center" align="center"><span style="font-size:12.0pt; font-family:"Times New Roman",serif; color:black">
<hr width="100%" size="2" align="center">
</span></div>
<div id="divRpF77892">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:black"> Fang, Liang A [liang.a.fang@intel.com]<br>
<b>Sent:</b> Sunday, November 25, 2018 11:44 AM<br>
<b>To:</b> Mihai, Irina<br>
<b>Cc:</b> 'starlingx-discuss@lists.starlingx.io'<br>
<b>Subject:</b> [Starlingx-discuss] [cinder] Analysis of patch c45bb0e for StartlingX upstreaming</span><span style="font-size:12.0pt; font-family:"Times New Roman",serif; color:black"></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:black">Hi Irina</span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">Code review: <a href="https://review.openstack.org/#/c/618976/" target="_blank" rel="noopener noreferrer">
https://review.openstack.org/#/c/618976/</a></span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">I’m working of upstreaming this patch. Could you please help to address one doubt: why image is converted in the same location with image itself? This patch is to create a volume from image, right?
</span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">I take a look of related code, the destination location would be the newly created volume and the source location is configured in cinder.conf, something like:</span></p>
<p class="MsoNormal"><span style="color:black">image_conversion_dir = /mnt/d100m/image_conversion_dir</span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">I did an experiment, in the latest master branch of cinder upstream repo:</span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="color:black">-</span><span style="font-size:7.0pt; font-family:"Times New Roman",serif; color:black">         
</span><span style="color:black">If image_conversion_dir has no space to store the downloading image, the exception ImageTooBig will be caught in the beginning of _create_from_image_cache_or_download().
</span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="color:black">-</span><span style="font-size:7.0pt; font-family:"Times New Roman",serif; color:black">         
</span><span style="color:black">If has space to store the image, but dest volume size is smaller than image’s virtual size, an exception “ImageUnacceptable” will raised by check_virtual_size.
</span></p>
<p class="MsoNormal"><span style="color:black">So it seems no chance to go to the situation this patch aimed to solve.</span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">Could you please help to give more background of this patch? Or if you think this patch is invalid now, please just tell me, I will mark this patch as abandoned.</span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">Thanks</span></p>
<p class="MsoNormal"><span style="color:black">Liang</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>