]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virNetDevOpenvswitchInterfaceStats: Be more forgiving when fetching stats
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 14 Jun 2017 13:23:29 +0000 (15:23 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 23 Jun 2017 09:51:23 +0000 (11:51 +0200)
commitedaf13565712b431c6fd66a5c4a964af7759ce68
tree224db4687a213c8e5be48289e4d17924ac686891
parent10c2bb2b199378d9fb38b71d695024d48079e8d6
virNetDevOpenvswitchInterfaceStats: Be more forgiving when fetching stats

https://bugzilla.redhat.com/show_bug.cgi?id=1461270

When fetching stats for a vhost-user type of interface, we run
couple of ovs-vsctl commands and parse their output. However, not
all stats exist at all times, for instance "rx_dropped" or
"tx_errors" can be missing. Thing is, we ask for a bulk of
statistics and if one of them is missing an error is reported
instead of returning the rest. Since we ignore errors, we fail to
set statistics. Fix this by asking for each piece alone.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virnetdevopenvswitch.c