For the first resize the "resize_amount" will be using the configured store_chunk_size (in my case its rbd_store_chunk_size from glance-api.conf), and only start doubling it after the first resize.
This BUG remains in hide until you start using some load-balancer/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) and 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.
This BUG introduced here in glance_store RBD driver: https:/ /opendev. org/openstack/ glance_ store/commit/ c43f19e8456b9e2 0f03709773fb2ff db94807a0a
For the first resize the "resize_amount" will be using the configured store_chunk_size (in my case its rbd_store_ chunk_size from glance-api.conf), and only start doubling it after the first resize.
This BUG remains in hide until you start using some load-balancer/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) and 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.