From 8f1af2a6427ba08beb7b614a1467639119effaa1 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 17 Jun 2021 01:33:11 -0400 Subject: [PATCH] Ignore hostdev interfaces in VM net stat gathering Prevents errors if a SR-IOV hostdev interface is configured until this is more defined. --- node-daemon/pvcnoded/Daemon.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/node-daemon/pvcnoded/Daemon.py b/node-daemon/pvcnoded/Daemon.py index fa8562b8..247ea38c 100644 --- a/node-daemon/pvcnoded/Daemon.py +++ b/node-daemon/pvcnoded/Daemon.py @@ -1655,6 +1655,9 @@ def collect_vm_stats(queue): logger.out("Getting network statistics for VM {}".format(domain_name), state='d', prefix='vm-thread') domain_network_stats = [] for interface in tree.findall('devices/interface'): + interface_type = interface.get('type') + if interface_type in ['hostdev']: + continue interface_name = interface.find('target').get('dev') interface_bridge = interface.find('source').get('bridge') interface_stats = domain.interfaceStats(interface_name)