提交 06f81c63 编写于 作者: L Laine Stump

Selectively ignore domainSetSecurityAllLabel failure in domain restore

When the saved domain image is on an NFS share, at least some part of
domainSetSecurityAllLabel will fail (for example, selinux labels can't
be modified). To allow domain restore to still work in this case, just
ignore the errors.
上级 f35a9fc1
...@@ -3428,8 +3428,10 @@ static int qemudStartVMDaemon(virConnectPtr conn, ...@@ -3428,8 +3428,10 @@ static int qemudStartVMDaemon(virConnectPtr conn,
DEBUG0("Generating setting domain security labels (if required)"); DEBUG0("Generating setting domain security labels (if required)");
if (driver->securityDriver && if (driver->securityDriver &&
driver->securityDriver->domainSetSecurityAllLabel && driver->securityDriver->domainSetSecurityAllLabel &&
driver->securityDriver->domainSetSecurityAllLabel(vm, stdin_path) < 0) driver->securityDriver->domainSetSecurityAllLabel(vm, stdin_path) < 0) {
goto cleanup; if (virStorageFileIsSharedFS(stdin_path) != 1)
goto cleanup;
}
/* Ensure no historical cgroup for this VM is lying around bogus /* Ensure no historical cgroup for this VM is lying around bogus
* settings */ * settings */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册