Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-69545

[RHEL10] gi.repository.GLib.GError: g-bd-nvme-error-quark: Failed to open device '/dev/nvme0n1': No such file or directory

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • rhel-10.2
    • rhel-10.0
    • libblockdev
    • None
    • libblockdev-3.4.0-1.el10
    • No
    • Low
    • rhel-storage-management
    • ssg_platform_storage
    • 0
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Requested
    • None
    • None

      What were you trying to do that didn't work?

      What is the impact of this issue to you?

      Please provide the package NVR for which the bug is seen:

      How reproducible is this bug?:

      two times

      Steps to reproduce

      1.  
      2.  
      3.  

      Expected results

      Actual results

      Verify that checking utility availability works as expected ... ok
      test_version_cmp (utils_test.UtilsExecLoggingTest.test_version_cmp)
      Verify that version comparison works as expected ... ok
      test_initialization (utils_test.UtilsExecProgressTest.test_initialization)
      Verify that progress report can (de)initialized ... ok
      test_have_kernel_module (utils_test.UtilsKernelModuleTest.test_have_kernel_module)
      Test checking for kernel modules ... ok
      test_initialization (utils_test.UtilsLinuxKernelVersionTest.test_initialization)
      Test Linux kernel version detection ... ok
      
      ======================================================================
      ERROR: test_ns_info (nvme_test.NVMeTestCase.test_ns_info)
      Test namespace info
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/root/rpmbuild/BUILD/libblockdev-3.2.0/tests/nvme_test.py", line 92, in test_ns_info
          info = BlockDev.nvme_get_namespace_info(self.nvme_ns_dev)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      gi.repository.GLib.GError: g-bd-nvme-error-quark: Failed to open device '/dev/nvme0n1': No such file or directory (1)
      
      ======================================================================
      FAIL: test_format (nvme_test.NVMeTestCase.test_format)
      Test issuing the format command
      ----------------------------------------------------------------------
      gi.repository.GLib.GError: g-bd-nvme-error-quark: Failed to open device '/dev/nvme0n1': No such file or directory (1)
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/root/rpmbuild/BUILD/libblockdev-3.2.0/tests/nvme_test.py", line 264, in test_format
          with self.assertRaisesRegex(GLib.GError, message):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AssertionError: "Couldn't match desired LBA data block size in a device supported LBA format data sizes" does not match "g-bd-nvme-error-quark: Failed to open device '/dev/nvme0n1': No such file or directory (1)"
      
      ======================================================================
      FAIL: test_sanitize_log (nvme_test.NVMeTestCase.test_sanitize_log)
      Test sanitize log retrieval
      ----------------------------------------------------------------------
      gi.repository.GLib.GError: g-bd-nvme-error-quark: Failed to open device '/dev/nvme0n1': No such file or directory (1)
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/root/rpmbuild/BUILD/libblockdev-3.2.0/tests/nvme_test.py", line 288, in test_sanitize_log
          with self.assertRaisesRegex(GLib.GError, message):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AssertionError: "NVMe Get Log Page - Sanitize Status Log command error: Invalid Field in Command: A reserved coded value or an unsupported value in a defined field|NVMe Get Log Page - Sanitize Status Log command error: unrecognized" does not match "g-bd-nvme-error-quark: Failed to open device '/dev/nvme0n1': No such file or directory (1)"
      
      ======================================================================
      FAIL: test_self_test (nvme_test.NVMeTestCase.test_self_test)
      Test issuing the self-test command
      ----------------------------------------------------------------------
      gi.repository.GLib.GError: g-bd-nvme-error-quark: Failed to open device '/dev/nvme0n1': No such file or directory (1)
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/root/rpmbuild/BUILD/libblockdev-3.2.0/tests/nvme_test.py", line 237, in test_self_test
          with self.assertRaisesRegex(GLib.GError, message):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AssertionError: "NVMe Device Self-test command error: Invalid Command Opcode: A reserved coded value or an unsupported value in the command opcode field|NVMe Device Self-test command error: Invalid Queue Identifier: The creation of the I/O Completion Queue failed due to an invalid queue identifier specified as part of the command" does not match "g-bd-nvme-error-quark: Failed to open device '/dev/nvme0n1': No such file or directory (1)"
      
      ----------------------------------------------------------------------
      Ran 431 tests in 1097.267s
      
      FAILED (failures=3, errors=1, skipped=107) 

      https://beaker.engineering.redhat.com/recipes/17596551#task187674909,task187674912

      libblockdev-3.2.0-2.el10.x86_64

       

      [guazhang@dhcp-60-96 libblockdev]$ git diff tests/utils.py 
      diff --git a/tests/utils.py b/tests/utils.py
      index a9b8e187..9fe93605 100644
      --- a/tests/utils.py
      +++ b/tests/utils.py
      @@ -251,7 +251,7 @@ def find_nvme_ctrl_devs_for_subnqn(subnqn):
                               dev_paths += [path]
                       except:
                           pass
      -
      +    time.sleep(1)
           ret, out, err = run_command("nvme list --output-format=json --verbose")
           if ret != 0:
               raise RuntimeError("Error getting NVMe list: '%s %s'" % (out, err))
      [guazhang@dhcp-60-96 libblockdev]$ 
       

      we need wait a sec here before get nvme ns .

      after apply the patch, can not hit the error with 30 times testing.

       

              vtrefny@redhat.com Vojtěch Trefný
              guazhang@redhat.com Guangwu Zhang
              Vojtěch Trefný Vojtěch Trefný
              Guangwu Zhang Guangwu Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: