mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
qemu: Ignore shutdown event from destroyed domain
During virDomainDestroy, QEMU may emit SHUTDOWN event as a response to SIGTERM and since domain object is still locked, the event is processed after the domain is destroyed. We need to ignore this event in such case to avoid changing domain state from shutoff to shutdown.
This commit is contained in:
parent
cc17f09246
commit
97652044af
@ -471,6 +471,10 @@ qemuProcessHandleShutdown(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
VIR_DEBUG("Ignoring repeated SHUTDOWN event from domain %s",
|
||||
vm->def->name);
|
||||
goto unlock;
|
||||
} else if (!virDomainObjIsActive(vm)) {
|
||||
VIR_DEBUG("Ignoring SHUTDOWN event from inactive domain %s",
|
||||
vm->def->name);
|
||||
goto unlock;
|
||||
}
|
||||
priv->gotShutdown = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user