Re: [PATCH v2] util: don't fail if no PortData is found while getting migrateData

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04.03.2015 03:59, zhang bo wrote:
> 

I've tried to review this patch. However it is corrupt.

> ---
> V1 here:
>      https://www.redhat.com/archives/libvir-list/2015-February/msg00388.html
> V2:
>    Add "--if-exists" option to ovs-vsctl cmd,  making ovs-vsctl not raise error if there's no portData
>    available. Suggested by Martin.
>    We Tested the patch, it works.
> ---

I guess this ^^ is the problem.  We put notes ...

> 
> Introduced by f6a2f97e
> 
> Problem description:
> After multiple times of migrating a domain, which has an ovs interface with no portData set,
> with non-shared disk, nbd ports got overflowed.
> 
> The steps to reproduce the problem:
> 1 define and start a domain with its network configured as:
>     <interface type='bridge'>
>           <source bridge='br0'/>
>           <virtualport type='openvswitch'>
>           </virtualport>
>           <model type='virtio'/>
>           <driver name='vhost' queues='4'/>
>     </interface>
> 2 do not set the network's portData.
> 3 migrate(ToURI2) it with flag 91(1011011), which means:
>   VIR_MIGRATE_LIVE
>   VIR_MIGRATE_PEER2PEER
>   VIR_MIGRATE_PERSIST_DEST
>   VIR_MIGRATE_UNDEFINE_SOURCE
>   VIR_MIGRATE_NON_SHARED_DISK
> 4 migrate success, but we got an error log in libvirtd.log:
>   error : virCommandWait:2423 : internal error: Child process (ovs-vsctl --timeout=5 get Interface
>   vnet1 external_ids:PortData) unexpected exit status 1: ovs-vsctl: no key "PortData" in Interface
>   record "vnet1" column external_ids
> 5 migrate it back, migrate it , migrate it back, .......
> 6 nbd port got overflowed.
> 
> The reasons for the problem is :
> 1 virNetDevOpenvswitchGetMigrateData() takes it as wrong if no portData is available for  the ovs
>  interface of a domain. (We think it's not appropriate, as portData is just OPTIONAL)
> 2 in func qemuMigrationBakeCookie(), it fails in qemuMigrationCookieAddNetwork(), and returns with -1.
>  qemuMigrationCookieAddNBD() is not called thereafter, and mig->nbd is still NULL.
> 3 However, qemuMigrationRun() just *WARN* if qemuMigrationBakeCookie() fails, migration still successes.
>  cookie is NULL, it's not baked on the src side.
> 4 On the destination side, it would alloc a port first and then free the nbd port in COOKIE.
>  But the cookie is NULL due to qemuMigrationCookieAddNetwork() failure at src side. thus the nbd port
>  is not freed.
> 
> In this patch, we add "--if-exists" option to make ovs-vsctl not raise error if there's no portData available.
> Further more, because portData may be NULL in the cookie at the dest side, check it before setting portData.
> 
> 
> Signed-off-by: Zhou Yimin <zhouyimin@xxxxxxxxxx>
> Signed-off-by: Zhang Bo <oscar.zhangbo@xxxxxxxxxx>
> ---

... here. Afte this line. However, removing the block did not help. But
editing a patch directly has very low success rate anyway. Can you
please resend?

>  src/util/virnetdevopenvswitch.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]