mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-20 13:09:22 +00:00
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: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
cd9492a98a
commit
22e7997d0c
@ -196,6 +196,13 @@ virCapsPtr virLXCDriverGetCapabilities(virLXCDriverPtr driver,
|
|||||||
driver->caps = caps;
|
driver->caps = caps;
|
||||||
} else {
|
} else {
|
||||||
lxcDriverLock(driver);
|
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);
|
ret = virObjectRef(driver->caps);
|
||||||
|
Loading…
Reference in New Issue
Block a user