提交 d7a3700e 编写于 作者: D Daniel P. Berrange

Move QEMU capabilities initialization later in QEMU startup

Currently QEMU capabilities are initialized before the QEMU driver
sets ownership on its various directories. The upshot is that if
you change the user/group in the qemu.conf file, libvirtd will fail
to probe QEMU the first time it is run after the config change.
Moving QEMU capabilities initialization to after the chown() calls
fixes this
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 1b253a10
...@@ -825,13 +825,6 @@ qemuStartup(bool privileged, ...@@ -825,13 +825,6 @@ qemuStartup(bool privileged,
if (qemuSecurityInit(qemu_driver) < 0) if (qemuSecurityInit(qemu_driver) < 0)
goto error; goto error;
qemu_driver->capsCache = qemuCapsCacheNew(qemu_driver->libDir,
qemu_driver->stateDir,
qemu_driver->user,
qemu_driver->group);
if (!qemu_driver->capsCache)
goto error;
if ((qemu_driver->activePciHostdevs = pciDeviceListNew()) == NULL) if ((qemu_driver->activePciHostdevs = pciDeviceListNew()) == NULL)
goto error; goto error;
...@@ -871,6 +864,12 @@ qemuStartup(bool privileged, ...@@ -871,6 +864,12 @@ qemuStartup(bool privileged,
} }
} }
qemu_driver->capsCache = qemuCapsCacheNew(qemu_driver->libDir,
qemu_driver->user,
qemu_driver->group);
if (!qemu_driver->capsCache)
goto error;
if ((qemu_driver->caps = qemuCreateCapabilities(qemu_driver)) == NULL) if ((qemu_driver->caps = qemuCreateCapabilities(qemu_driver)) == NULL)
goto error; goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册