提交 5309b6cb 编写于 作者: J John Ferlan

storage: Save error during refresh failure processing

https://bugzilla.redhat.com/show_bug.cgi?id=1614283

Save the error from the refresh failure because the stopPool
processing may overwrite the error or even worse clear it
due to calling an external libvirt API that resets the last
error such as is the case with the SCSI pool which may call
virGetConnectNodeDev (see commit decaeb28) in order to
process deleting an NPIV vport.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 5745f08c
......@@ -81,10 +81,16 @@ storagePoolRefreshFailCleanup(virStorageBackendPtr backend,
virStoragePoolObjPtr obj,
const char *stateFile)
{
virErrorPtr orig_err = virSaveLastError();
if (stateFile)
ignore_value(unlink(stateFile));
if (backend->stopPool)
backend->stopPool(obj);
if (orig_err) {
virSetError(orig_err);
virFreeError(orig_err);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册