提交 22e7997d 编写于 作者: C Cole Robinson

lxc: Refresh capabilities if they have never been initalized

Adjust virLXCDriverGetCapabilities to fill in driver->caps if it is
empty, regardless of the passed 'refresh' value. This matches the
pattern used in virQEMUDriverGetCapabilities

This fixes LXC XML startup parsing for me
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
Signed-off-by: NCole Robinson <crobinso@redhat.com>
上级 cd9492a9
......@@ -196,6 +196,13 @@ virCapsPtr virLXCDriverGetCapabilities(virLXCDriverPtr driver,
driver->caps = caps;
} else {
lxcDriverLock(driver);
if (driver->caps == NULL) {
VIR_DEBUG("Capabilities didn't detect any guests. Forcing a "
"refresh.");
lxcDriverUnlock(driver);
return virLXCDriverGetCapabilities(driver, true);
}
}
ret = virObjectRef(driver->caps);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册