X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FInterfaceUtil.py;h=e5597b90655573f3d3ce23a858fb1882457a68ae;hb=refs%2Fchanges%2F17%2F6717%2F3;hp=ff9ecdede56affeaee38bc454adad827f209f83f;hpb=2900b5ab54b4c10e400369ef80f115f42baaa3da;p=csit.git diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index ff9ecdede5..e5597b9065 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -348,8 +348,14 @@ class InterfaceUtil(object): ssh = SSH() ssh.connect(node) - cmd = 'lspci -vmmks {0}'.format(pci_addr) + # First rescan PCI devices in the system + cmd = 'sh -c "echo 1 > /sys/bus/pci/rescan"' + (ret_code, _, _) = ssh.exec_command_sudo(cmd) + if int(ret_code) != 0: + raise RuntimeError("'{0}' failed on '{1}'" + .format(cmd, node['host'])) + cmd = 'lspci -vmmks {0}'.format(pci_addr) (ret_code, stdout, _) = ssh.exec_command(cmd) if int(ret_code) != 0: raise RuntimeError("'{0}' failed on '{1}'"