Comment 28 for bug 1916482

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance_store (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/glance_store/+/914020
Committed: https://opendev.org/openstack/glance_store/commit/5cd9bae89e4efe301a8a835fea55f1eaf85ad6d1
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 5cd9bae89e4efe301a8a835fea55f1eaf85ad6d1
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/c43f19e8456b9e20f03709773fb2ffdb94807a0a

    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
    Change-Id: Ie03693c2cb8b096978fb156231c3b1cab695470f
    (cherry picked from commit 62044431bd55e3dbbb6c97b0ec0bf591b3c9ef6f)