You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def get_nvme_drive_pcie_address(self, host: "Host", device: str) -> str:
"""
This function will return the pcie address mapping for a given nvme drive.
Parameters
---------
host: Host
The host object
device: String
Name of the drive
Returns
pci_addr: String
The pci address of the drive
"""
cmd = "ls -l /sys/block/%s" % device
output = host.run(cmd)
pattern = r"([\d\w]+:\d+.\d)\/nvme\/(nvme\d+)\/(nvme\d+[a-z]\d+)"
output = re.search(pattern, output, re.M)
log:
File "/home/tcn/env/lib64/python3.9/site-packages/autoval/lib/test_base.py", line 217, in _setup_execute_teardown
self._setup_execute()
File "/home/tcn/env/lib64/python3.9/site-packages/autoval/lib/test_base.py", line 45, in wrapper
self._handle_exception(e)
File "/home/tcn/env/lib64/python3.9/site-packages/autoval/lib/test_base.py", line 43, in wrapper
func(self, *args, **kwargs)
File "/home/tcn/env/lib64/python3.9/site-packages/autoval/lib/test_base.py", line 381, in _setup_execute
self._setup()
File "/home/tcn/env/lib64/python3.9/site-packages/autoval/lib/test_base.py", line 387, in _setup
self.setup()
File "/home/tcn/bin/ocp-diag-autoval-ssd/autoval_ssd/lib/utils/storage/storage_test_base.py", line 128, in setup
self.storage_test_setup()
File "/home/tcn/bin/ocp-diag-autoval-ssd/autoval_ssd/lib/utils/storage/storage_test_base.py", line 202, in storage_test_setup
self.validate_drive_health_check()
File "/home/tcn/bin/ocp-diag-autoval-ssd/autoval_ssd/lib/utils/storage/storage_test_base.py", line 409, in validate_drive_health_check
drive.drive_health_check()
File "/home/tcn/bin/ocp-diag-autoval-ssd/autoval_ssd/lib/utils/storage/nvme/nvme_drive.py", line 1110, in drive_health_check
pci_addr = PciUtils().get_nvme_drive_pcie_address(self.host, self.block_name)
File "/home/tcn/bin/ocp-diag-autoval-ssd/autoval_ssd/lib/utils/pci_utils.py", line 353, in get_nvme_drive_pcie_address
raise TestError("Failed to get pcie address for %s device" % device)
autoval.lib.utils.autoval_exceptions.TestError: [AUTOVAL TEST ERROR] Failed to get pcie address for nvme0n1 device
The text was updated successfully, but these errors were encountered:
1.(env) [tcn@localhost ocp-diag-autoval-ssd]$ cat /sys/module/nvme_core/parameters/multipath
Y
(env) [tcn@localhost ocp-diag-autoval-ssd]$ ls -l /sys/block/
total 0
lrwxrwxrwx. 1 root root 0 Jul 23 11:27 dm-0 -> ../devices/virtual/block/dm-0
lrwxrwxrwx. 1 root root 0 Jul 23 11:27 dm-1 -> ../devices/virtual/block/dm-1
lrwxrwxrwx. 1 root root 0 Jul 23 11:27 dm-2 -> ../devices/virtual/block/dm-2
lrwxrwxrwx. 1 root root 0 Jul 23 11:27 nvme0c0n1 -> ../devices/pci0000:00/0000:00:01.0/0000:01:00.0/nvme/nvme0/nvme0c0n1
lrwxrwxrwx. 1 root root 0 Jul 23 11:27 nvme0n1 -> ../devices/virtual/nvme-subsystem/nvme-subsys0/nvme0n1
lrwxrwxrwx. 1 root root 0 Jul 23 11:27 sda -> ../devices/pci0000:00/0000:00:17.0/ata3/host2/target2:0:0/2:0:0:0/block/sda
def get_nvme_drive_pcie_address(self, host: "Host", device: str) -> str:
"""
This function will return the pcie address mapping for a given nvme drive.
log:
File "/home/tcn/env/lib64/python3.9/site-packages/autoval/lib/test_base.py", line 217, in _setup_execute_teardown
self._setup_execute()
File "/home/tcn/env/lib64/python3.9/site-packages/autoval/lib/test_base.py", line 45, in wrapper
self._handle_exception(e)
File "/home/tcn/env/lib64/python3.9/site-packages/autoval/lib/test_base.py", line 43, in wrapper
func(self, *args, **kwargs)
File "/home/tcn/env/lib64/python3.9/site-packages/autoval/lib/test_base.py", line 381, in _setup_execute
self._setup()
File "/home/tcn/env/lib64/python3.9/site-packages/autoval/lib/test_base.py", line 387, in _setup
self.setup()
File "/home/tcn/bin/ocp-diag-autoval-ssd/autoval_ssd/lib/utils/storage/storage_test_base.py", line 128, in setup
self.storage_test_setup()
File "/home/tcn/bin/ocp-diag-autoval-ssd/autoval_ssd/lib/utils/storage/storage_test_base.py", line 202, in storage_test_setup
self.validate_drive_health_check()
File "/home/tcn/bin/ocp-diag-autoval-ssd/autoval_ssd/lib/utils/storage/storage_test_base.py", line 409, in validate_drive_health_check
drive.drive_health_check()
File "/home/tcn/bin/ocp-diag-autoval-ssd/autoval_ssd/lib/utils/storage/nvme/nvme_drive.py", line 1110, in drive_health_check
pci_addr = PciUtils().get_nvme_drive_pcie_address(self.host, self.block_name)
File "/home/tcn/bin/ocp-diag-autoval-ssd/autoval_ssd/lib/utils/pci_utils.py", line 353, in get_nvme_drive_pcie_address
raise TestError("Failed to get pcie address for %s device" % device)
autoval.lib.utils.autoval_exceptions.TestError: [AUTOVAL TEST ERROR] Failed to get pcie address for nvme0n1 device
The text was updated successfully, but these errors were encountered: