-
Bug
-
Resolution: Done
-
Normal
-
2025.2 (Flamingo)
-
7
-
False
-
-
False
-
?
-
None
-
-
New Test Coverage
-
-
-
Moderate
Scope
Implement all the code changes to fix this bug and make it ready for review in upstream.
Acceptance criteria
- Patch code should for review in upstream
- 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.
1.
|
Review upstream patches |
|
Closed | |
Unassigned |
2.
|
Review upstream patches |
|
Closed | |
Cyril Roelandt |