<div dir="ltr">agree,I have tested the flag and it works well, i will post another patch later. <div><br></div><div>Thanks very much!<div class="gmail_extra"><br><div class="gmail_quote">2014-11-03 20:03 GMT+08:00 Ján Tomko <span dir="ltr"><<a href="mailto:jtomko@redhat.com" target="_blank">jtomko@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 11/03/2014 05:22 AM, weiwei li wrote:<br>
> mig->nbd is initialized by qemuMigrationCookieXMLParse(called<br>
> by qemuMigrationEatCookie),with a condition that<br>
> the nbd infomation contained in Cookie string. I found in debug info<br>
> that qemuMigrationStartNBDServer had been called in<br>
> qemuMigrationPrepareAny(mig->nbd not null), but at<br>
> in qemuMigrationFinish qemuMigrationStopNBDServer can not really<br>
> stop nbd server bucause mig->nbd is not initialized(that is because cookie<br>
> string does not contain nbd information ).<br>
><br>
> so ,there are two solutions:<br>
> 1 qemuMigrationStopNBDServer  ignore mig->nbd null ptr<br>
> 2 add cookie info for nbd same stage (that is lost in which stage i am not sure~ )<br>
><br>
> I choose an easy way solution 1 with least code changing, maybe is not google<br>
> way :)<br>
><br>
> cookie log is like this:<br>
> 2014-10-30 08:38:14.106+0000: 15078: debug : qemuMigrationRun:3254 :<br>
> driver=0x7f936413cd40, vm=0x7f934400b850, cookiein=<qemu-migration><br>
>   <name>3cd4c349-e058-4a1a-8b3d-cc988efd11e2</name><br>
>   <uuid>3cd4c349-e058-4a1a-8b3d-cc988efd11e2</uuid><br>
>   <hostname>50e54929-059c-ffff-ffff-ffffffffffff_10.180.39.36</hostname><br>
>   <hostuuid>50e54929-059c-ffff-ffff-ffffffffffff</hostuuid><br>
>  <nbd port='49153'/><br>
> </qemu-migration><br>
><br>
> 2014-10-30 08:39:12.527+0000: 15076: debug : virObjectRef:296 : OBJECT_REF:<br>
> obj=0x7f9364138880<br>
> 2014-10-30 08:39:12.527+0000: 15076: debug : qemuMigrationFinish:4507 :<br>
> driver=0x7f936413cd40, dconn=0x7f9358002720, vm=0x7f935c002da0,<br>
> cookiein=<qemu-migration><br>
>   <name>3cd4c349-e058-4a1a-8b3d-cc988efd11e2</name><br>
>   <uuid>3cd4c349-e058-4a1a-8b3d-cc988efd11e2</uuid><br>
>   <hostname>50e54929-059c-ffff-ffff-ffffffffffff_10.180.39.36</hostname><br>
>   <hostuuid>50e54929-059c-ffff-ffff-ffffffffffff</hostuuid><br>
>   <feature name='persistent'/><br>
<br>
</div></div>...<br>
<span class=""><br>
>       <memballoon model='virtio'><br>
>         <address type='pci' domain='0x0000' bus='0x00' slot='0x06'<br>
> function='0x0'/><br>
>       </memballoon><br>
>     </devices><br>
>   </domain><br>
<br>
>   <nbd/><br>
<br>
</span>So the <nbd/> element is there, we just don't parse it because<br>
qemuMigrationFinish calls qemuMigrationEatCookie without the<br>
QEMU_MIGRATION_COOKIE_NBD flag.<br>
<br>
I believe the proper fix is to add this flag there.<br>
<br>
Jan<br>
<div class="HOEnZb"><div class="h5"><br>
> </qemu-migration><br>
> , cookieinlen=2567, cookieout=0x7f93722eab08, cookieoutlen=0x7f93722eab14,<br>
> flags=289, retcode=0<br>
><br>
<br>
</div></div></blockquote></div><br></div></div></div>