When using the copy_from option, readers and writers can have different
speeds to respectively read and write.
A reader timeout will happen if the writer is slow and the writer is
being asked to write a lot. This is currently happening when using
the VMware store and copying from an HTTP server. The reader is reading
16MB which takes too long to upload to vCenter which is causing a
timeout from the HTTP server. The writer should be able to control the
size of the chunks being read when using copy_from: this way the writer
will write fast enough to not make the reader timeout.
This can be reproduced with the filesystem store and copying from http by adding sleep of 30/40 seconds in
https://github.com/openstack/glance/blob/master/glance/store/filesystem.py#L433 between each chunk read.
The chunk will become smaller and then zero.
This is simulating the effect of a slow writer.
Fix proposed to branch: master /review. openstack. org/103753
Review: https:/