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

User specified size is not used to verify actual data written at backend side

XMLWordPrintable

    • Moderate

      Scope

      Implement all the code changes to fix this bug and make it ready for review in upstream.

      Acceptance criteria

      1. Patch code should for review in upstream
      2. It should have all unit and/or tempest tests if required

       

      All Glance store backends—including file, Cinder, RBD, Swift, and S3—are capable of accepting an image size parameter when adding data to their respective backends. However, this parameter is not used to validate or verify the actual data written to the backend.

      In cases other than the RBD backend, the following issue can occur: if an image is 1 GB in size but the user specifies a size of 900 MB, the system sets the image size to 900 MB but still writes the full 1 GB of data to the backend. This results in an inaccurate representation of the image's size.

      For the RBD backend, the behavior differs because it pre-creates the image volume based on the user-specified size (e.g., 900 MB). If more data than this size is written, RBD raises an IncompleteWriteError. Since this error isn't handled properly on the RBD side, it causes Glance to respond with an HTTP 500 error, aborting the upload and leaving stale image data in the RBD backend.

      The appropriate behavior for all backends should be: if the actual data written exceeds the user-specified size, an error should be raised, and the uploaded data should be deleted from the backend to maintain consistency and prevent stale or inaccurate data.

              akekane@redhat.com Abhishek Kekane
              akekane@redhat.com Abhishek Kekane
              rhos-storage-glance
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 3 days
                  1w 3d