This issue is only in evidence when glance is behind a proxy where the
client buffer size can be lower (for haproxy: bufsize = 16384) which
can cause unaligned reads
The response length can be bigger than the store_chunk_size for the
first time, so at the end the RBD write will fail because it wants
to write more data than the actual RBD image size after the first
resize.
Thanks to Robert Varjasi for investigating this issue!
Fixes-Bug: 1916482
Change-Id: Ie03693c2cb8b096978fb156231c3b1cab695470f
(cherry picked from commit 62044431bd55e3dbbb6c97b0ec0bf591b3c9ef6f)
Reviewed: https:/ /review. opendev. org/c/openstack /glance_ store/+ /914020 /opendev. org/openstack/ glance_ store/commit/ 5cd9bae89e4efe3 01a8a835fea55f1 eaf85ad6d1
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/2023.2
commit 5cd9bae89e4efe3 01a8a835fea55f1 eaf85ad6d1
Author: Andrew Bogott <email address hidden>
Date: Thu Jun 8 07:54:16 2023 -0500
rbd: compute appropriate resize amount before resizing image
Resolves a bug introduced in
https:/ /opendev. org/openstack/ glance_ store/commit/ c43f19e8456b9e2 0f03709773fb2ff db94807a0a
This issue is only in evidence when glance is behind a proxy where the
client buffer size can be lower (for haproxy: bufsize = 16384) which
can cause unaligned reads
(https:/ /github. com/openstack/ glance/ blob/master/ glance/ common/ wsgi.py# L1028).
The response length can be bigger than the store_chunk_size for the
first time, so at the end the RBD write will fail because it wants
to write more data than the actual RBD image size after the first
resize.
Thanks to Robert Varjasi for investigating this issue!
Fixes-Bug: 1916482 6978fb156231c3b 1cab695470f bbb6c97b0ec0bf5 91b3c9ef6f)
Change-Id: Ie03693c2cb8b09
(cherry picked from commit 62044431bd55e3d