<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<STYLE type=text/css> <!--@import url(scrollbar.css); --></STYLE>

<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<STYLE>                   body{FONT-SIZE:12pt; FONT-FAMILY:宋体,serif;}         </STYLE>

<META name=GENERATOR content="MSHTML 8.00.7601.17824"><BASE 
target=_blank></HEAD>
<BODY 
style="LINE-HEIGHT: 1.3; BORDER-RIGHT-WIDTH: 0px; MARGIN: 12px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" 
marginheight="0" marginwidth="0">
<DIV><FONT color=#000000 size=3 face=宋体>Thanks for your 
reminders, I found the reason now, it's my own fault!</FONT></DIV>
<DIV>I tried to optimize the snapshot_instance process like this 
blueprint:</DIV>
<DIV><A 
href="https://blueprints.launchpad.net/glance/+spec/hierarchical-images">https://blueprints.launchpad.net/glance/+spec/hierarchical-images</A></DIV>
<DIV>and I copied the call_if_no_exists & copy_and_extend methods, and I 
forgot the locks @utils.synchronized!</DIV>
<DIV>I think it's really OK now.</DIV>
<DIV> </DIV>
<DIV>What a stupid mistake!</DIV>
<DIV> </DIV>
<DIV align=left><FONT color=#c0c0c0 size=2 face=Verdana>2012-09-26</FONT></DIV>
<DIV align=left><FONT size=2 face=Verdana>
<HR style="WIDTH: 122px; HEIGHT: 2px" id=SignNameHR align=left SIZE=2>
</FONT></DIV>
<DIV align=left><FONT color=#c0c0c0 size=2 face=Verdana><SPAN 
id=_FlashSignName>Wangpan</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Verdana>
<HR>
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>发件人:</STRONG>Boris Filippov</FONT></DIV>
<DIV><FONT size=2 
face=Verdana><STRONG>发送时间:</STRONG>2012-09-26 03:25</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>主题:</STRONG>Re: Re: [Openstack] [Nova] 
Got 'qemu-img: error while writing sector 634880: Input/output error' in 
_create_image</FONT></DIV>
<DIV><FONT size=2 
face=Verdana><STRONG>收件人:</STRONG>"Wangpan"<hzwangpan@corp.netease.com></FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>抄送:</STRONG>"Razique 
Mahroua"<razique.mahroua@gmail.com>,"Scott 
Moser"<smoser@ubuntu.com>,"openstack"<openstack@lists.launchpad.net></FONT></DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV><FONT size=2 face=Verdana>Actually, this is unlikely because there was 
locking for image fetching already. This patch only adds it for case when 
several compute processes share same $instances_dir. <BR><SPAN 
style="BACKGROUND-COLOR: rgb(255,255,255); FONT-FAMILY: arial,sans-serif; COLOR: rgb(34,34,34); FONT-SIZE: 13px">- 
disk full really might be the case. Simple check is to extend available space 
and try to reproduce it again.</SPAN><BR><BR>
<DIV class=gmail_quote>2012/9/25 Wangpan <SPAN dir=ltr><<A 
href="mailto:hzwangpan@corp.netease.com" 
target=_blank>hzwangpan@corp.netease.com</A>></SPAN><BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
class=gmail_quote><U></U>
  <DIV 
  style="LINE-HEIGHT: 1.3; BORDER-RIGHT-WIDTH: 0px; MARGIN: 12px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" 
  marginheight="0" marginwidth="0">
  <DIV><FONT face=Verdana>Thanks for your clue.</FONT></DIV>
  <DIV><FONT face=Verdana>yes, the occured condition of my issue is 
  the same as BUG <U>1014227</U>, but the difference is that my instance 
  directory is NOT shared between compute nodes,</FONT></DIV>
  <DIV><FONT face=Verdana>the instances' images are saved in local disk on 
  compute nodes.</FONT></DIV>
  <DIV><FONT face=Verdana>I believe the bug Boris found may occur in NOT shared 
  storage circumstance as mine, and my issue may be resloved by this patch which 
  adds a lock to cache image method.</FONT></DIV>
  <DIV><FONT face=Verdana>Thanks again.<BR></FONT></DIV>
  <DIV> </DIV>
  <DIV align=left><FONT color=#c0c0c0 face=Verdana>2012-09-25</FONT></DIV>
  <DIV align=left><FONT face=Verdana>
  <HR style="MIN-HEIGHT: 2px; WIDTH: 122px" align=left SIZE=2>
  <SPAN class=HOEnZb><FONT color=#888888></FONT></SPAN></FONT></DIV><SPAN 
  class=HOEnZb><FONT color=#888888>
  <DIV align=left><FONT color=#c0c0c0 
  face=Verdana><SPAN>Wangpan</SPAN></FONT></DIV>
  <DIV><FONT face=Verdana>
  <HR>
  </FONT></DIV>
  <DIV><FONT face=Verdana><STRONG>发件人:</STRONG>Boris Filippov</FONT></DIV>
  <DIV><FONT 
  face=Verdana><STRONG>发送时间:</STRONG>2012-09-24 19:59</FONT></DIV>
  <DIV><FONT face=Verdana><STRONG>主题:</STRONG>Re: [Openstack] [Nova] Got 
  'qemu-img: error while writing sector 634880: Input/output error' in 
  _create_image</FONT></DIV>
  <DIV><FONT face=Verdana><STRONG>收件人:</STRONG>"Razique Mahroua"<<A 
  href="mailto:razique.mahroua@gmail.com" 
  target=_blank>razique.mahroua@gmail.com</A>></FONT></DIV>
  <DIV><FONT face=Verdana><STRONG>抄送:</STRONG>"Wangpan"<<A 
  href="mailto:hzwangpan@corp.netease.com" 
  target=_blank>hzwangpan@corp.netease.com</A>>,"openstack"<<A 
  href="mailto:openstack@lists.launchpad.net" 
  target=_blank>openstack@lists.launchpad.net</A>></FONT></DIV></FONT></SPAN>
  <DIV>
  <DIV class=h5>
  <DIV><FONT face=Verdana></FONT> </DIV>
  <DIV><FONT face=Verdana>Your instance directory is shared between compute 
  nodes?<BR>Similar issue was fixed for folsom-rc1 <BR><A 
  href="https://review.openstack.org/#/c/12024/" 
  target=_blank>https://review.openstack.org/#/c/12024/</A><BR>
  <DIV class=gmail_quote><A href="https://bugs.launchpad.net/nova/+bug/1014227" 
  target=_blank>https://bugs.launchpad.net/nova/+bug/1014227</A><BR><BR><BR>2012/9/24 
  Razique Mahroua <SPAN dir=ltr><<A href="mailto:razique.mahroua@gmail.com" 
  target=_blank>razique.mahroua@gmail.com</A>></SPAN><BR>
  <BLOCKQUOTE 
  style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
  class=gmail_quote>
    <DIV style="WORD-WRAP: break-word">Here is what I found 
    <DIV><A href="http://comments.gmane.org/gmane.comp.emulators.qemu/153254" 
    target=_blank>http://comments.gmane.org/gmane.comp.emulators.qemu/153254</A></DIV>
    <DIV><A href="http://osdir.com/ml/qemu-devel/2012-05/msg04234.html" 
    target=_blank>http://osdir.com/ml/qemu-devel/2012-05/msg04234.html</A></DIV>
    <DIV><BR></DIV>
    <DIV>What do you think ?</DIV>
    <DIV><BR></DIV>
    <DIV>
    <DIV>
    <DIV><SPAN 
    style="BORDER-SPACING: 0px; BORDER-COLLAPSE: separate; FONT-FAMILY: 'Lucida Grande'"><SPAN 
    style="FONT-FAMILY: Helvetica"><SPAN style="FONT-FAMILY: Helvetica"><B 
    style="COLOR: rgb(19,112,138)">Nuage & Co - Razique 
    Mahroua</B></SPAN><SPAN 
    style="FONT-FAMILY: Helvetica; COLOR: rgb(19,112,138)"><B> </B></SPAN><SPAN 
    style="LINE-HEIGHT: normal; TEXT-TRANSFORM: none; FONT-VARIANT: normal; FONT-STYLE: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT-FAMILY: Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; FONT-SIZE: medium; WORD-SPACING: 0px"><SPAN 
    style="LINE-HEIGHT: normal; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; LETTER-SPACING: normal; WORD-SPACING: 0px"><SPAN 
    style="LINE-HEIGHT: normal; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; LETTER-SPACING: normal; WORD-SPACING: 0px"> 

    <DIV 
    style="FONT-STYLE: normal; FONT-FAMILY: Helvetica; FONT-SIZE: medium; FONT-WEIGHT: normal"><FONT 
    color=#13708a><A href="mailto:razique.mahroua@gmail.com" 
    target=_blank>razique.mahroua@gmail.com</A></FONT></DIV></SPAN><BR><SPAN></SPAN><SPAN 
    style="FONT-STYLE: normal; FONT-FAMILY: Helvetica; FONT-SIZE: medium; FONT-WEIGHT: normal"></SPAN><SPAN 
    style="FONT-WEIGHT: normal"></SPAN></SPAN><SPAN><IMG width=125 
    height=125></SPAN> </SPAN></SPAN></SPAN></DIV><BR></DIV>
    <DIV>
    <DIV>Le 24 sept. 2012 à 10:43, Wangpan <<A 
    href="mailto:hzwangpan@corp.netease.com" 
    target=_blank>hzwangpan@corp.netease.com</A>> a écrit :</DIV><BR>
    <BLOCKQUOTE type="cite">
      <DIV 
      style="BORDER-RIGHT-WIDTH: 0px; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; MARGIN: 12px; FONT: 12pt/1.3 宋体,serif; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; LETTER-SPACING: normal; BORDER-LEFT-WIDTH: 0px; WORD-SPACING: 0px" 
      marginheight="0" marginwidth="0">
      <DIV>
      <DIV><FONT size=3 face=宋体>qemu-img check -f qcow2 test.qcow2<BR>No errors 
      were found on the image.</FONT></DIV>
      <DIV> </DIV>
      <DIV align=left><FONT color=#c0c0c0 face=Verdana>2012-09-24</FONT></DIV>
      <DIV align=left><FONT face=Verdana>
      <HR style="MIN-HEIGHT: 2px; WIDTH: 122px" align=left SIZE=2>
      </FONT></DIV>
      <DIV align=left><FONT color=#c0c0c0 face=Verdana>Wangpan</FONT></DIV>
      <DIV><FONT face=Verdana>
      <HR>
      </FONT></DIV>
      <DIV><FONT face=Verdana><STRONG>发件人:</STRONG>Razique Mahroua</FONT></DIV>
      <DIV><FONT 
      face=Verdana><STRONG>发送时间:</STRONG>2012-09-24 16:30</FONT></DIV>
      <DIV><FONT face=Verdana><STRONG>主题:</STRONG>Re: Re: [Openstack] [Nova] Got 
      'qemu-img: error while writing sector 634880: Input/output error' in 
      _create_image</FONT></DIV>
      <DIV><FONT face=Verdana><STRONG>收件人:</STRONG>"Wangpan"<<A 
      href="mailto:hzwangpan@corp.netease.com" 
      target=_blank>hzwangpan@corp.netease.com</A>></FONT></DIV>
      <DIV><FONT face=Verdana><STRONG>抄送:</STRONG>"openstack"<<A 
      href="mailto:openstack@lists.launchpad.net" 
      target=_blank>openstack@lists.launchpad.net</A>></FONT></DIV>
      <DIV><FONT face=Verdana></FONT> </DIV></DIV>
      <DIV><FONT face=Verdana>
      <DIV>hi,  
      <DIV>what about a </DIV>
      <DIV>qemu-img check -f qcow2 test.qcow2</DIV>
      <DIV><BR></DIV></DIV>
      <DIV><BR>
      <DIV><SPAN 
      style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-SPACING: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Lucida Grande'; WHITE-SPACE: normal; LETTER-SPACING: normal; WORD-SPACING: 0px"><SPAN 
      style="FONT-FAMILY: Helvetica">
      <DIV><SPAN style="FONT-FAMILY: Helvetica"><B 
      style="COLOR: rgb(19,112,138)">Nuage & Co - Razique 
      Mahroua</B></SPAN><SPAN 
      style="FONT-FAMILY: Helvetica; COLOR: rgb(19,112,138)"><B> </B></SPAN></DIV><SPAN 
      style="LINE-HEIGHT: normal; TEXT-TRANSFORM: none; FONT-VARIANT: normal; FONT-STYLE: normal; TEXT-INDENT: 0px; BORDER-SPACING: 0px; BORDER-COLLAPSE: separate; FONT-FAMILY: Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; FONT-SIZE: medium; WORD-SPACING: 0px"><SPAN 
      style="LINE-HEIGHT: normal; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-SPACING: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; LETTER-SPACING: normal; WORD-SPACING: 0px"><SPAN 
      style="LINE-HEIGHT: normal; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-SPACING: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; LETTER-SPACING: normal; WORD-SPACING: 0px">
      <DIV 
      style="FONT-STYLE: normal; FONT-FAMILY: Helvetica; FONT-SIZE: medium; FONT-WEIGHT: normal"><FONT 
      color=#13708a><A href="mailto:razique.mahroua@gmail.com" 
      target=_blank>razique.mahroua@gmail.com</A></FONT></DIV></SPAN><BR><SPAN></SPAN><SPAN 
      style="FONT-STYLE: normal; FONT-FAMILY: Helvetica; FONT-SIZE: medium; FONT-WEIGHT: normal"></SPAN><SPAN 
      style="FONT-WEIGHT: normal"></SPAN></SPAN><SPAN><SPAN><NUAGECO-LOGO-Fblan_petit(1).jpg></SPAN></SPAN></SPAN></SPAN></SPAN></DIV>
      <DIV><BR>
      <DIV>
      <DIV>Le 24 sept. 2012 à 10:19, "Wangpan"<<A 
      href="mailto:hzwangpan@corp.netease.com" 
      target=_blank>hzwangpan@corp.netease.com</A>> a écrit :</DIV><BR>
      <BLOCKQUOTE type="cite">Thanks for your attention!<BR><BR>- disk full 
         ----# I believe there is enough space, because I have tried to 
        boot serveral instances after this error with the same image, they are 
        all booted successfully.<BR>- permission issues    ----# 
        Not this reason, too. explain as above.<BR><BR>I still believe this is a 
        race problem, if we convert to image from qcow2 to raw at a short 
        interval, one of the convertion may fail,<SPAN> </SPAN><BR>I have 
        verified this by running two same commands continuously such 
        as:<BR>qemu-img convert -f qcow2 -O raw  test.qcow2 test.part 
        &<BR>and one of them give me the same error:<BR>qemu-img: error 
        while writing sector 1052672: Input/output 
      error</BLOCKQUOTE></DIV></DIV></DIV></FONT></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></DIV><BR>_______________________________________________<BR>Mailing 
    list: <A href="https://launchpad.net/~openstack" 
    target=_blank>https://launchpad.net/~openstack</A><BR>Post to     
    : <A href="mailto:openstack@lists.launchpad.net" 
    target=_blank>openstack@lists.launchpad.net</A><BR>Unsubscribe : <A 
    href="https://launchpad.net/~openstack" 
    target=_blank>https://launchpad.net/~openstack</A><BR>More help   : <A 
    href="https://help.launchpad.net/ListHelp" 
    target=_blank>https://help.launchpad.net/ListHelp</A><BR><BR></BLOCKQUOTE></DIV><BR></FONT></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR></FONT></DIV></BODY></HTML>