Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-22502

Image decompression is broken with glance-direct import method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • rhos-18.0.17 FR 5
    • openstack-glance
    • Moderate

      When using the `image_decompression` plugin with `glance-direct` import method, the import fails with an `UploadException` due to size mismatch between the decompressed image data and the image's recorded size. The reason for this during glance-direct method /v2/images/{image_id}/stage api is called which sets the compressed image size to the image and decompression happens during later stage while actually importing the image. Once import workflow is complete it verifies the actual data written with the size set to image and fails there with size mismatch error `glance.common.exception.UploadException: size of uploaded data is different from current value set on the image.` [1].

      [1] https://github.com/openstack/glance/blob/master/glance/location.py#L582

      Expected behaviour:
      Once image is decompressed the actual image size should be set to the image in image decompression plugin itself.

      Workaround:

      Use web-download import method of glance to directly upload compressed image from the web.

              akekane@redhat.com Abhishek Kekane
              akekane@redhat.com Abhishek Kekane
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: