Re: [PATCH v3 1/3] libvirtd: add openvitch timeout value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/07/2017 04:16 PM, Boris Fiuczynski wrote:
> 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@xxxxxxxxxxxxxxxxxx>
> Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
> ---
>  daemon/libvirtd-config.c        | 6 ++++++
>  daemon/libvirtd-config.h        | 2 ++
>  daemon/libvirtd.aug             | 1 +
>  daemon/libvirtd.conf            | 9 +++++++++
>  daemon/test_libvirtd.aug.in     | 1 +
>  src/util/virnetdevopenvswitch.h | 1 +
>  6 files changed, 20 insertions(+)
> 
> diff --git a/daemon/libvirtd-config.c b/daemon/libvirtd-config.c
> index b469189..6c0f00e 100644
> --- a/daemon/libvirtd-config.c
> +++ b/daemon/libvirtd-config.c
> @@ -32,6 +32,7 @@
>  #include "configmake.h"
>  #include "remote/remote_protocol.h"
>  #include "remote/remote_driver.h"
> +#include "util/virnetdevopenvswitch.h"
>  #include "virstring.h"
>  #include "virutil.h"
>  
> @@ -170,6 +171,8 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
>      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
> @@ -388,6 +391,9 @@ daemonConfigLoadOptions(struct daemonConfig *data,
>      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:
> diff --git a/daemon/libvirtd-config.h b/daemon/libvirtd-config.h
> index ad3e80a..1edf5fa 100644
> --- a/daemon/libvirtd-config.h
> +++ b/daemon/libvirtd-config.h
> @@ -92,6 +92,8 @@ struct daemonConfig {
>  
>      int admin_keepalive_interval;
>      unsigned int admin_keepalive_count;
> +
> +    unsigned int ovs_timeout;
>  };
>  
>  
> diff --git a/daemon/libvirtd.aug b/daemon/libvirtd.aug
> index 2b8df66..24fdf44 100644
> --- a/daemon/libvirtd.aug
> +++ b/daemon/libvirtd.aug
> @@ -88,6 +88,7 @@ module Libvirtd =
>  
>     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
> diff --git a/daemon/libvirtd.conf b/daemon/libvirtd.conf
> index 8466616..ac77811 100644
> --- a/daemon/libvirtd.conf
> +++ b/daemon/libvirtd.conf
> @@ -467,3 +467,12 @@
>  # 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 libvirts processing.

s/blocking .../blocking libvirt./

ACK

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux