#include "configmake.h"
#include "remote/remote_protocol.h"
#include "remote/remote_driver.h"
+#include "util/virnetdevopenvswitch.h"
#include "virstring.h"
#include "virutil.h"
data->admin_keepalive_interval = 5;
data->admin_keepalive_count = 5;
+ data->ovs_timeout = VIR_NETDEV_OVS_DEFAULT_TIMEOUT;
+
localhost = virGetHostname();
if (localhost == NULL) {
/* we couldn't resolve the hostname; assume that we are
if (virConfGetValueUInt(conf, "admin_keepalive_count", &data->admin_keepalive_count) < 0)
goto error;
+ if (virConfGetValueUInt(conf, "ovs_timeout", &data->ovs_timeout) < 0)
+ goto error;
+
return 0;
error:
int admin_keepalive_interval;
unsigned int admin_keepalive_count;
+
+ unsigned int ovs_timeout;
};
let misc_entry = str_entry "host_uuid"
| str_entry "host_uuid_source"
+ | int_entry "ovs_timeout"
(* Each enty in the config is one of the following three ... *)
let entry = network_entry
# Keepalive settings for the admin interface
#admin_keepalive_interval = 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
{ "admin_keepalive_required" = "1" }
{ "admin_keepalive_interval" = "5" }
{ "admin_keepalive_count" = "5" }
+ { "ovs_timeout" = "5" }
# include "virnetdevvportprofile.h"
# include "virnetdevvlan.h"
+# define VIR_NETDEV_OVS_DEFAULT_TIMEOUT 5
int virNetDevOpenvswitchAddPort(const char *brname,
const char *ifname,