mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
libvirtd: add openvitch timeout value
Provide the ability to specify a default timeout value for successful completion of openvswitch calls in the libvirtd configuration file. Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
0857a3bf5c
commit
66583c0cf7
@ -32,6 +32,7 @@
|
|||||||
#include "configmake.h"
|
#include "configmake.h"
|
||||||
#include "remote/remote_protocol.h"
|
#include "remote/remote_protocol.h"
|
||||||
#include "remote/remote_driver.h"
|
#include "remote/remote_driver.h"
|
||||||
|
#include "util/virnetdevopenvswitch.h"
|
||||||
#include "virstring.h"
|
#include "virstring.h"
|
||||||
#include "virutil.h"
|
#include "virutil.h"
|
||||||
|
|
||||||
@ -170,6 +171,8 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
|
|||||||
data->admin_keepalive_interval = 5;
|
data->admin_keepalive_interval = 5;
|
||||||
data->admin_keepalive_count = 5;
|
data->admin_keepalive_count = 5;
|
||||||
|
|
||||||
|
data->ovs_timeout = VIR_NETDEV_OVS_DEFAULT_TIMEOUT;
|
||||||
|
|
||||||
localhost = virGetHostname();
|
localhost = virGetHostname();
|
||||||
if (localhost == NULL) {
|
if (localhost == NULL) {
|
||||||
/* we couldn't resolve the hostname; assume that we are
|
/* we couldn't resolve the hostname; assume that we are
|
||||||
@ -388,6 +391,9 @@ daemonConfigLoadOptions(struct daemonConfig *data,
|
|||||||
if (virConfGetValueUInt(conf, "admin_keepalive_count", &data->admin_keepalive_count) < 0)
|
if (virConfGetValueUInt(conf, "admin_keepalive_count", &data->admin_keepalive_count) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
if (virConfGetValueUInt(conf, "ovs_timeout", &data->ovs_timeout) < 0)
|
||||||
|
goto error;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
@ -92,6 +92,8 @@ struct daemonConfig {
|
|||||||
|
|
||||||
int admin_keepalive_interval;
|
int admin_keepalive_interval;
|
||||||
unsigned int admin_keepalive_count;
|
unsigned int admin_keepalive_count;
|
||||||
|
|
||||||
|
unsigned int ovs_timeout;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ module Libvirtd =
|
|||||||
|
|
||||||
let misc_entry = str_entry "host_uuid"
|
let misc_entry = str_entry "host_uuid"
|
||||||
| str_entry "host_uuid_source"
|
| str_entry "host_uuid_source"
|
||||||
|
| int_entry "ovs_timeout"
|
||||||
|
|
||||||
(* Each enty in the config is one of the following three ... *)
|
(* Each enty in the config is one of the following three ... *)
|
||||||
let entry = network_entry
|
let entry = network_entry
|
||||||
|
@ -467,3 +467,12 @@
|
|||||||
# Keepalive settings for the admin interface
|
# Keepalive settings for the admin interface
|
||||||
#admin_keepalive_interval = 5
|
#admin_keepalive_interval = 5
|
||||||
#admin_keepalive_count = 5
|
#admin_keepalive_count = 5
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# Open vSwitch:
|
||||||
|
# This allows to specify a timeout for openvswitch calls made by
|
||||||
|
# libvirt. The ovs-vsctl utility is used for the configuration and
|
||||||
|
# its timeout option is set by default to 5 seconds to avoid
|
||||||
|
# potential infinite waits blocking libvirt.
|
||||||
|
#
|
||||||
|
#ovs_timeout = 5
|
||||||
|
@ -63,3 +63,4 @@ module Test_libvirtd =
|
|||||||
{ "admin_keepalive_required" = "1" }
|
{ "admin_keepalive_required" = "1" }
|
||||||
{ "admin_keepalive_interval" = "5" }
|
{ "admin_keepalive_interval" = "5" }
|
||||||
{ "admin_keepalive_count" = "5" }
|
{ "admin_keepalive_count" = "5" }
|
||||||
|
{ "ovs_timeout" = "5" }
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
# include "virnetdevvportprofile.h"
|
# include "virnetdevvportprofile.h"
|
||||||
# include "virnetdevvlan.h"
|
# include "virnetdevvlan.h"
|
||||||
|
|
||||||
|
# define VIR_NETDEV_OVS_DEFAULT_TIMEOUT 5
|
||||||
|
|
||||||
int virNetDevOpenvswitchAddPort(const char *brname,
|
int virNetDevOpenvswitchAddPort(const char *brname,
|
||||||
const char *ifname,
|
const char *ifname,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user