edaf135 virNetDevOpenvswitchInterfaceStats: Be more forgiving when fetching stats

Authored and Committed by mprivozn 6 years ago
    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>
    
        
file modified
+34 -62