Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-73342

[4.20] [T2] quarantine and investigate test_print_response_body_on_error_upload_virtctl

XMLWordPrintable

    • Quality / Stability / Reliability
    • 0.42
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • None

      {{the issue can be reproduce on bare metal clustercnv-4.20 with }}{{hostpath-csi-pvc-block}}
      I run it 5 times and manage to reproduce it twice

      tests/storage/cdi_upload/test_upload_virtctl.py::test_print_response_body_on_error_upload_virtctl on
      hostpath-csi-pvc-block

      fails due to CDI returning an unexpected 401 Unauthorized error during the virtctl image-upload operation.
      Instead of reaching the expected validation message (“A larger PVC is required”)

       

      error uploading image after 5 retries: unexpected return value 401

       

      8.31 MiB / 1010.94 MiB [-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->] 99.74% 4.92 MiB p/s ETA 0s1009.78 MiB / 1010.94 MiB [-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->] 99.89% 5.16 MiB p/s ETA 0s1010.94 MiB / 1010.94 MiB [------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->] 100.00% 5.16 MiB p/s ETA 0s1010.94 MiB / 1010.94 MiB [------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->] 100.00% 5.16 MiB p/s ETA 0s1010.94 MiB / 1010.94 MiB [------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->] 100.00% 4.95 MiB p/s ETA 0s1010.94 MiB / 1010.94 MiB [------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->] 100.00% 4.95 MiB p/s ETA 0s3.91 MiB / 1010.94 MiB [>_______________________________________________________________________________________________________________________________________________________________________________________] 0.39% 4.95 MiB p/s ETA 3m23s0 B / 1010.94 MiB [______________________________________________________________________________________________________________________________________________________________________________________________] 0.00% 113.26 MiB p/s ETA 8s0 B / 1010.94 MiB [______________________________________________________________________________________________________________________________________________________________________________________________] 0.00% 113.26 MiB p/s ETA 8s0 B / 1010.94 MiB [______________________________________________________________________________________________________________________________________________________________________________________________] 0.00% 113.26 MiB p/s ETA 8s64.00 KiB / 1010.94 MiB [>_______________________________________________________________________________________________________________________________________________________________________________________] 0.01% 105.96 MiB p/s ETA 9s96.00 KiB / 1010.94 MiB [>_____________________________________________________________________________________________________________________________________________________________________________________________] 0.01% 171 B p/s 9m34s
      , error: error uploading image after 5 retries: unexpected return value 401, 
      2025-11-24T13:39:06.864323 utilities.storage INFO Check status and output of virtctl
      F
      ____________________________________________________________________ test_print_response_body_on_error_upload_virtctl[#hostpath-csi-pvc-block#-download_specified_image0] ____________________________________________________________________
      
      TEST: test_print_response_body_on_error_upload_virtctl[#hostpath-csi-pvc-block#-download_specified_image0] STATUS: FAILED
      namespace = <ocp_resources.namespace.Namespace object at 0x7f7406978230>, download_specified_image = local('/tmp/pytest-K4YAiqMb8yv4RYNgq5zhRB/cdi_upload0/rhel-96.qcow2'), storage_class_name_scope_module = 'hostpath-csi-pvc-block'
          @pytest.mark.parametrize(
              "download_specified_image",
              [
                  pytest.param(
                      {
                          "image_path": py_config["latest_rhel_os_dict"]["image_path"],
                          "image_file": py_config["latest_rhel_os_dict"]["image_name"],
                      },
                      marks=(pytest.mark.polarion("CNV-4512")),
                  ),
              ],
              indirect=True,
          )
          @pytest.mark.s390x
          def test_print_response_body_on_error_upload_virtctl(
              namespace, download_specified_image, storage_class_name_scope_module
          ):
              """
              Check that CDI now reports validation failures as part of the body response
              in case for instance the disk image virtual size > PVC size > disk size
              """
              dv_name = f"cnv-4512-{storage_class_name_scope_module}"
              with virtctl_upload_dv(
                  namespace=namespace.name,
                  name=dv_name,
                  size="3G",
                  image_path=download_specified_image,
                  storage_class=storage_class_name_scope_module,
                  insecure=True,
              ) as res:
      >           check_upload_virtctl_result(
                      result=res,
                      expected_success=False,
                      expected_output=ErrorMsg.LARGER_PVC_REQUIRED,
                  )
      tests/storage/cdi_upload/test_upload_virtctl.py:511: 
      

      The test expects a controlled CDI validation error (“A larger PVC is required”), but instead receives an unexpected 401 Unauthorized response during image upload, causing the assertion to fail.

      Acceptance Criteria:
      assertion should be:

      , error: error uploading image after 5 retries: unexpected return value 400, Saving stream failed: effective image size is larger than the reported available storage: virtual image size 10737418240 is larger than the reported available storage 3181085983. A larger PVC is required

      reportportal:
      https://reportportal-cnv.apps.dno.ocp-hub.prod.psi.redhat.com/ui/#cnv/launches/all/146915/59547767/log?item0Params=filter.in.status%3DFAILED%26page.page%3D1

      jenkiens run:
      https://jenkins-csb-cnvqe-main.dno.corp.redhat.com/job/test-pytest-cnv-4.20-storage-hppcsiblock/37/testReport/tests.storage.cdi_upload/test_upload_virtctl/test_print_response_body_on_error_upload_virtctl__hostpath_csi_pvc_block__download_specified_image0_/ 

              rh-ee-ahafe Ahmad Hafi
              rh-ee-ahafe Ahmad Hafi
              Natalie Gavrielov Natalie Gavrielov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: