Change in vdsm[ovirt-3.6]: restore-net: _get_persisted_numvfs

danken at redhat.com danken at redhat.com
Sun Jan 24 16:03:27 UTC 2016


Dan Kenigsberg has uploaded a new change for review.

Change subject: restore-net: _get_persisted_numvfs
......................................................................

restore-net: _get_persisted_numvfs

Former code attempted to match a pci device path (e.g. 0000:05:00.0)
with libvirt pci device name (e.g. pci_0000_05_00_0), and failed.

This patch adds the required conversion between the two.

Bug-Url: https://bugzilla.redhat.com/1301349
Change-Id: I4a0597cdec9117529ff3fea1f0eaed164a4a7783
Signed-off-by: Dan Kenigsberg <danken at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/52655
Reviewed-by: Edward Haas <edwardh at redhat.com>
Continuous-Integration: Jenkins CI
---
M vdsm/vdsm-restore-net-config
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/65/52665/1

diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config
index 1dab8bf..7ede6f0 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/vdsm-restore-net-config
@@ -62,9 +62,13 @@
         return {}
 
     numvfs_by_device = {}
+    sriov_devices_file_names = frozenset(
+        hostdev.name_to_pci_path(device_name)
+        for device_name in existing_sriov_devices)
+
     for file_name in os.listdir(_VIRTUAL_FUNCTIONS_PATH):
-        if file_name not in existing_sriov_devices:
-            logging.error('Phisycal device in %s no longer exists. Skipping '
+        if file_name not in sriov_devices_file_names:
+            logging.error('Physical device in %s no longer exists. Skipping '
                           'numvfs restoration.', file_name)
         else:
             with open(os.path.join(


-- 
To view, visit https://gerrit.ovirt.org/52665
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a0597cdec9117529ff3fea1f0eaed164a4a7783
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>


More information about the vdsm-patches mailing list