mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
remote: use virtproxyd if no URI is given
When the default driver mode requests the modular daemons, we still defaulted to spawning libvirtd if the URI was NULL, because we don't know which driver specific daemon to spawn. virtproxyd has logic that can handle this as it is used for compatibility when accepting incoming TCP connections with a NULL URI. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
48f66cfe3e
commit
002f0ff4f3
@ -171,14 +171,15 @@ remoteGetUNIXSocket(remoteDriverTransport transport,
|
||||
remoteDriverModeTypeToString(mode),
|
||||
driver, flags);
|
||||
|
||||
if (driver)
|
||||
if (driver) {
|
||||
direct_daemon = g_strdup_printf("virt%sd", driver);
|
||||
direct_sock_name = remoteGetUNIXSocketHelper(transport, direct_daemon, flags);
|
||||
} else {
|
||||
direct_daemon = g_strdup("virtproxyd");
|
||||
direct_sock_name = remoteGetUNIXSocketHelper(transport, "libvirt", flags);
|
||||
}
|
||||
|
||||
legacy_daemon = g_strdup("libvirtd");
|
||||
|
||||
if (driver)
|
||||
direct_sock_name = remoteGetUNIXSocketHelper(transport, direct_daemon, flags);
|
||||
|
||||
legacy_sock_name = remoteGetUNIXSocketHelper(transport, "libvirt", flags);
|
||||
|
||||
if (mode == REMOTE_DRIVER_MODE_AUTO) {
|
||||
@ -187,14 +188,12 @@ remoteGetUNIXSocket(remoteDriverTransport transport,
|
||||
mode = REMOTE_DRIVER_MODE_DIRECT;
|
||||
} else if (virFileExists(legacy_sock_name)) {
|
||||
mode = REMOTE_DRIVER_MODE_LEGACY;
|
||||
} else if (driver) {
|
||||
} else {
|
||||
/*
|
||||
* This constant comes from the configure script and
|
||||
* maps to either the direct or legacy mode constant
|
||||
*/
|
||||
mode = REMOTE_DRIVER_MODE_DEFAULT;
|
||||
} else {
|
||||
mode = REMOTE_DRIVER_MODE_LEGACY;
|
||||
}
|
||||
} else {
|
||||
mode = REMOTE_DRIVER_MODE_LEGACY;
|
||||
|
Loading…
Reference in New Issue
Block a user