vmware: Force chunked transfer for upload-to-image
The upload-to-image operation downloads (using stream-optimized HTTP NFC
transfer) the virtual disk corresponding to the volume to a pipe from
where the glance image client reads the data for upload. Due to a recent
change in the glance image client, success in seeking the input file
object results in forgoing the chunked transfer in favor of regular
transfer. The glance image client expects an IOError if the input file
object is a pipe. Currently the pipe seek() is a NOP and this results in
upload-to-image failure. This changes fixes such failures by throwing
an IOError indicating an illegal seek.
Reviewed: https:/ /review. openstack. org/85031 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=cf18199571b 7965a8fe77db3d9 10b0e798f12946
Committed: https:/
Submitter: Jenkins
Branch: master
commit cf18199571b7965 a8fe77db3d910b0 e798f12946
Author: Vipin Balachandran <email address hidden>
Date: Thu Apr 3 11:42:55 2014 +0530
vmware: Force chunked transfer for upload-to-image
The upload-to-image operation downloads (using stream-optimized HTTP NFC
transfer) the virtual disk corresponding to the volume to a pipe from
where the glance image client reads the data for upload. Due to a recent
change in the glance image client, success in seeking the input file
object results in forgoing the chunked transfer in favor of regular
transfer. The glance image client expects an IOError if the input file
object is a pipe. Currently the pipe seek() is a NOP and this results in
upload-to-image failure. This changes fixes such failures by throwing
an IOError indicating an illegal seek.
Change-Id: I2e69fc4103559d 49d2cee16ea0478 7a252dbf879
Closes-Bug: #1295239