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

Eric Blake eblake at redhat.com
Tue Jul 8 22:02:14 UTC 2014


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 at suse.com>
> ---
>  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140708/a87a4d2c/attachment-0001.sig>


More information about the libvir-list mailing list