<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><base href="x-msg://2/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Glad you figured out, stupidity is only untamed experience :)<div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Helvetica; "><span class="Apple-style-span" style="font-family: Helvetica; "><b style="color: rgb(19, 112, 138); ">Nuage & Co - Razique Mahroua</b></span><span class="Apple-style-span" style="color: rgb(19, 112, 138); font-family: Helvetica; "><b> </b></span><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-weight: normal; font-style: normal; "><font class="Apple-style-span" color="#13708a"><a href="mailto:razique.mahroua@gmail.com">razique.mahroua@gmail.com</a></font></div></span><br class="Apple-interchange-newline"><span></span><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-weight: normal; font-style: normal; "></span><span style="color: rgb(0, 0, 0); font-weight: normal; "></span></span><span><img height="125" width="125" id="5b5dd63e-7e2d-4e85-a7e8-14d715d1014e" apple-width="yes" apple-height="yes" src="cid:00E07450-433E-43E6-9005-48B8FD5C669F@la.fabrique"></span>
</span></span></span></div>
<br><div><div>Le 26 sept. 2012 à 12:14, "Wangpan"<<a href="mailto:hzwangpan@corp.netease.com">hzwangpan@corp.netease.com</a>> a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div marginheight="0" marginwidth="0" style="font-size: 12pt; font-family: 宋体, serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; line-height: 1.3; border-width: 0px; margin: 12px; "><div><font 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 id="SignNameHR" align="left" size="2" style="width: 122px; height: 2px; "></font></div><div align="left"><font color="#c0c0c0" size="2" face="Verdana">Wangpan</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"<<a href="mailto:hzwangpan@corp.netease.com">hzwangpan@corp.netease.com</a>></font></div><div><font size="2" face="Verdana"><strong>抄送:</strong>"Razique Mahroua"<<a href="mailto:razique.mahroua@gmail.com">razique.mahroua@gmail.com</a>>,"Scott Moser"<<a href="mailto:smoser@ubuntu.com">smoser@ubuntu.com</a>>,"openstack"<<a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a>></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 class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:hzwangpan@corp.netease.com" target="_blank">hzwangpan@corp.netease.com</a>></span><br><blockquote class="gmail_quote" style="border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; margin: 0px 0px 0px 0.8ex; padding-left: 1ex; "><u></u><div marginheight="0" marginwidth="0" style="line-height: 1.3; border-width: 0px; margin: 12px; "><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<span class="Apple-converted-space"> </span><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 align="left" size="2" style="min-height: 2px; width: 122px; "><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 class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:razique.mahroua@gmail.com" target="_blank">razique.mahroua@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; margin: 0px 0px 0px 0.8ex; padding-left: 1ex; "><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 marginheight="0" marginwidth="0" style="border-width: 0px; text-transform: none; text-indent: 0px; margin: 12px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12pt; line-height: 1.3; font-family: 宋体, serif; white-space: normal; letter-spacing: normal; word-spacing: 0px; "><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 align="left" size="2" style="min-height: 2px; width: 122px; "></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-style: normal; font-variant: normal; font-weight: normal; font-size: medium; line-height: normal; font-family: '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:<span class="Apple-converted-space"> </span><a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>Post to     :<span class="Apple-converted-space"> </span><a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>Unsubscribe :<span class="Apple-converted-space"> </span><a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>More help   :<span class="Apple-converted-space"> </span><a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a></blockquote></div></font></div></div></div></div></blockquote></div></font></div></div></blockquote></div><br></div></body></html>