mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
Add missing cleanup for transient guests in UML driver
The UML inotify handler would kill off guests when certain conditions arise, but it forgot to remove transient guests from the list of domains * src/uml/uml_driver.c: Cleanup transient guests
This commit is contained in:
parent
f0c7103db5
commit
65d68f62f1
@ -311,6 +311,11 @@ reread:
|
||||
|
||||
umlShutdownVMDaemon(NULL, driver, dom, VIR_DOMAIN_SHUTOFF_SHUTDOWN);
|
||||
virDomainAuditStop(dom, "shutdown");
|
||||
if (!dom->persistent) {
|
||||
virDomainRemoveInactive(&driver->domains,
|
||||
dom);
|
||||
dom = NULL;
|
||||
}
|
||||
} else if (e->mask & (IN_CREATE | IN_MODIFY)) {
|
||||
VIR_DEBUG("Got inotify domain startup '%s'", name);
|
||||
if (virDomainObjIsActive(dom)) {
|
||||
@ -332,14 +337,25 @@ reread:
|
||||
umlShutdownVMDaemon(NULL, driver, dom,
|
||||
VIR_DOMAIN_SHUTOFF_FAILED);
|
||||
virDomainAuditStop(dom, "failed");
|
||||
if (!dom->persistent) {
|
||||
virDomainRemoveInactive(&driver->domains,
|
||||
dom);
|
||||
dom = NULL;
|
||||
}
|
||||
} else if (umlIdentifyChrPTY(driver, dom) < 0) {
|
||||
VIR_WARN("Could not identify charater devices for new domain");
|
||||
VIR_WARN("Could not identify character devices for new domain");
|
||||
umlShutdownVMDaemon(NULL, driver, dom,
|
||||
VIR_DOMAIN_SHUTOFF_FAILED);
|
||||
virDomainAuditStop(dom, "failed");
|
||||
if (!dom->persistent) {
|
||||
virDomainRemoveInactive(&driver->domains,
|
||||
dom);
|
||||
dom = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
virDomainObjUnlock(dom);
|
||||
if (dom)
|
||||
virDomainObjUnlock(dom);
|
||||
}
|
||||
|
||||
cleanup:
|
||||
|
Loading…
x
Reference in New Issue
Block a user