]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
libxl: destroy domain in migration finish phase on failure
authorJim Fehlig <jfehlig@suse.com>
Thu, 13 Nov 2014 00:52:02 +0000 (17:52 -0700)
committerJim Fehlig <jfehlig@suse.com>
Fri, 21 Nov 2014 20:11:47 +0000 (13:11 -0700)
commit42874fa45f9fab99212d0ba3f66cf4671ddb0a30
treebdaa721e485e8dd19e4f66f5224d9576a4017a0f
parent60386825646c24fbcb9160306e298ed6f52f3f02
libxl: destroy domain in migration finish phase on failure

This patch contains three domain cleanup improvements in the migration
finish phase, ensuring a domain is properly disposed when a failure is
detected or the migration is cancelled.

The check for virDomainObjIsActive is moved to libxlDomainMigrationFinish,
where cleanup can occur if migration failed and the domain is inactive.

The 'cleanup' label was missplaced in libxlDomainMigrationFinish, causing
a migrated domain to remain in the event of an error or cancelled migration.

In cleanup, the domain was not removed from the driver's list of domains.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
src/libxl/libxl_driver.c
src/libxl/libxl_migration.c