Re: [PATCH 2/4] libxl: remove domain when migration prepare fails

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

 



On 07/08/2014 03:52 PM, Jim Fehlig wrote:
> In libxlDomainMigrationPrepare(), a new virDomainObj is created
> from the incoming domain def and added to the driver's domain
> list, but never removed if there are subsequent failures during
> the prepare phase.
> 
> targethost# virsh list --all
> 
> sourcehost# virsh migrate --live dom xen+ssh://targethost/system
>    error: operation failed: Fail to create socket for incoming migration.
> 
> targethost# virsh list --all
> error: Failed to list domains
> error: name in virGetDomain must not be NULL
> 
> After adding code to remove the domain on prepare failure, noticed
> that libvirtd crashed due to double free of the virDomainDef.  Similar
> to the qemu driver, pass a pointer to virDomainDefPtr so it can be set
> to NULL once a virDomainObj is created from it.
> 
> Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
> ---
>  src/libxl/libxl_driver.c    |  2 +-
>  src/libxl/libxl_migration.c | 10 ++++++++--
>  src/libxl/libxl_migration.h |  2 +-
>  3 files changed, 10 insertions(+), 4 deletions(-)
> 

ACK

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]