]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: suppress unimportant ovs-vsctl errors when getting interface stats
authorLaine Stump <laine@laine.org>
Wed, 27 Mar 2019 18:58:45 +0000 (14:58 -0400)
committerLaine Stump <laine@laine.org>
Thu, 28 Mar 2019 15:19:03 +0000 (11:19 -0400)
commit3f7cba3f5ea1731b9028b89b671cbd7e7d5e0421
treec0970e1db2c021052597a08991d02c3849d23509
parent54eb3e096b60e2231ed4e935c33772cf4da6acf8
util: suppress unimportant ovs-vsctl errors when getting interface stats

commit edaf13565 modified the stats retrieval for OVS interfaces to
not fail when one of the fields was unrecognized by the ovs-vsctl
command, but ovs-vsctl was still returning an error, and libvirt was
cluttering the logs with these inconsequential error messages.

This patch modifies the GET_STAT macro to add "--if-exists" to the
ovs-vsctl command, which causes it to return an empty string (and exit
with success) if the requested statistic isn't in its database, thus
eliminating the ugly error messages from the log.

Resolves: https://bugzilla.redhat.com/1683175

Signed-off-by: Laine Stump <laine@laine.org>
src/util/virnetdevopenvswitch.c