mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
qemudDomainMigrateFinish2: handle a case of virDomainSaveStatus failure
* src/qemu/qemu_driver.c (qemudDomainMigrateFinish2): Don't ignore virDomainSaveStatus failure. * src/conf/domain_conf.h (virDomainSaveStatus): Use ATTRIBUTE_RETURN_CHECK, so this doesn't happen again.
This commit is contained in:
parent
33c721d323
commit
6aacf84a3b
@ -1011,7 +1011,7 @@ int virDomainSaveConfig(const char *configDir,
|
||||
virDomainDefPtr def);
|
||||
int virDomainSaveStatus(virCapsPtr caps,
|
||||
const char *statusDir,
|
||||
virDomainObjPtr obj);
|
||||
virDomainObjPtr obj) ATTRIBUTE_RETURN_CHECK;
|
||||
|
||||
typedef void (*virDomainLoadConfigNotify)(virDomainObjPtr dom,
|
||||
int newDomain,
|
||||
|
@ -10816,7 +10816,10 @@ qemudDomainMigrateFinish2 (virConnectPtr dconn,
|
||||
VIR_DOMAIN_EVENT_SUSPENDED,
|
||||
VIR_DOMAIN_EVENT_SUSPENDED_PAUSED);
|
||||
}
|
||||
virDomainSaveStatus(driver->caps, driver->stateDir, vm);
|
||||
if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0) {
|
||||
VIR_WARN("Failed to save status on vm %s", vm->def->name);
|
||||
goto endjob;
|
||||
}
|
||||
} else {
|
||||
qemudShutdownVMDaemon(driver, vm, 0);
|
||||
event = virDomainEventNewFromObj(vm,
|
||||
|
Loading…
Reference in New Issue
Block a user