message = 'Failed to create {num} VFs on {pci} device on {host}'.\
format(num=numvfs, pci=pf_pci_addr, host=node['host'])
- exec_cmd_no_error(node, command, timeout=60, sudo=True, message=message)
+ exec_cmd_no_error(node, command, timeout=120, sudo=True,
+ message=message)
@staticmethod
def pci_driver_unbind(node, pci_addr):
message = 'Failed to unbind PCI device {pci} on {host}'.\
format(pci=pci_addr, host=node['host'])
- exec_cmd_no_error(node, command, timeout=60, sudo=True, message=message)
+ exec_cmd_no_error(node, command, timeout=120, sudo=True,
+ message=message)
@staticmethod
def pci_driver_bind(node, pci_addr, driver):
"'echo {driver} | tee /sys/bus/pci/devices/{pci}/driver_override'".\
format(driver=driver, pci=pci_addr.replace(':', r'\:'))
- exec_cmd_no_error(node, command, timeout=60, sudo=True, message=message)
+ exec_cmd_no_error(node, command, timeout=120, sudo=True,
+ message=message)
command = "sh -c "\
"'echo {pci} | tee /sys/bus/pci/drivers/{driver}/bind'".\
format(pci=pci_addr, driver=driver)
- exec_cmd_no_error(node, command, timeout=60, sudo=True, message=message)
+ exec_cmd_no_error(node, command, timeout=120, sudo=True,
+ message=message)
command = "sh -c "\
"'echo | tee /sys/bus/pci/devices/{pci}/driver_override'".\
format(pci=pci_addr.replace(':', r'\:'))
- exec_cmd_no_error(node, command, timeout=60, sudo=True, message=message)
+ exec_cmd_no_error(node, command, timeout=120, sudo=True,
+ message=message)
@staticmethod
def pci_vf_driver_unbind(node, pf_pci_addr, vf_id):
message = 'Failed to unbind VF {vf_pci_addr} to on {host}'.\
format(vf_pci_addr=vf_pci_addr, host=node['host'])
- exec_cmd_no_error(node, command, timeout=60, sudo=True, message=message)
+ exec_cmd_no_error(node, command, timeout=120, sudo=True,
+ message=message)
@staticmethod
def pci_vf_driver_bind(node, pf_pci_addr, vf_id, driver):
"'echo {driver} | tee {vf_path}/driver_override'".\
format(driver=driver, vf_path=vf_path)
- exec_cmd_no_error(node, command, timeout=60, sudo=True, message=message)
+ exec_cmd_no_error(node, command, timeout=120, sudo=True,
+ message=message)
command = "sh -c "\
"'echo {vf_pci_addr} | tee /sys/bus/pci/drivers/{driver}/bind'".\
format(vf_pci_addr=vf_pci_addr, driver=driver)
- exec_cmd_no_error(node, command, timeout=60, sudo=True, message=message)
+ exec_cmd_no_error(node, command, timeout=120, sudo=True,
+ message=message)
command = "sh -c "\
"'echo | tee {vf_path}/driver_override'".\
format(vf_path=vf_path)
- exec_cmd_no_error(node, command, timeout=60, sudo=True, message=message)
+ exec_cmd_no_error(node, command, timeout=120, sudo=True,
+ message=message)
@staticmethod
def get_pci_dev_driver(node, pci_addr):
ssh = SSH()
ssh.connect(node)
+ cmd = 'ln -s /dev/null /etc/sysctl.d/80-vpp.conf || true'
+ ssh.exec_command_sudo(cmd, timeout=90)
cmd = "[[ -f /etc/redhat-release ]]"
return_code, _, _ = ssh.exec_command(cmd)
return False
return True
+ @staticmethod
+ def get_docker_mergeddir(node, uuid):
+ """Get Docker overlay for MergedDir diff.
+
+ :param node: DUT node.
+ :param uuid: Docker UUID.
+ :type node: dict
+ :type uuid: str
+ :returns: Docker container MergedDir.
+ :rtype: str
+ :raises RuntimeError: If getting output failed.
+ """
+ command = "docker inspect --format='"\
+ "{{{{.GraphDriver.Data.MergedDir}}}}' {uuid}".format(uuid=uuid)
+ message = 'Failed to get directory of {uuid} on host {host}'.\
+ format(uuid=uuid, host=node['host'])
+
+ stdout, _ = exec_cmd_no_error(node, command, sudo=True, message=message)
+ return stdout.strip()
+
@staticmethod
def get_huge_page_size(node):
"""Get default size of huge pages in system.