mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
qemu: Try harder to remove pr-helper object and kill pr-helper process
If libvirt receives DISCONNECTED event and prDaemonRunning is set to false, and qemuDomainRemoveDiskDevice() is performing in the meantime, then qemuDomainRemoveDiskDevice() will fail to remove pr-helper object because prDaemonRunning is false. But removing that check from qemuHotplugRemoveManagedPR() is not enough, because after removing the object through monitor the qemuProcessKillManagedPRDaemon() is called which contains the same check. Thus the pr-helper process might be left behind. Signed-off-by: Jie Wang <wangjie88@huawei.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
d5c5d61514
commit
7a232286b9
@ -397,8 +397,7 @@ qemuHotplugRemoveManagedPR(virQEMUDriverPtr driver,
|
||||
virErrorPtr orig_err;
|
||||
int ret = -1;
|
||||
|
||||
if (!priv->prDaemonRunning ||
|
||||
virDomainDefHasManagedPR(vm->def))
|
||||
if (virDomainDefHasManagedPR(vm->def))
|
||||
return 0;
|
||||
|
||||
virErrorPreserveLast(&orig_err);
|
||||
|
@ -2749,9 +2749,6 @@ qemuProcessKillManagedPRDaemon(virDomainObjPtr vm)
|
||||
virErrorPtr orig_err;
|
||||
char *pidfile;
|
||||
|
||||
if (!priv->prDaemonRunning)
|
||||
return;
|
||||
|
||||
if (!(pidfile = qemuProcessBuildPRHelperPidfilePath(vm))) {
|
||||
VIR_WARN("Unable to construct pr-helper pidfile path");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user