fog / fog-libvirt

libvirt provider for fog
MIT License
16 stars 42 forks source link

image_upload: Always return the number of bytes read #23

Closed agx closed 8 years ago

agx commented 8 years ago

Currently volume uploads end up empty since ruby-libvirt returns the value passed in from the block

https://www.redhat.com/archives/libvir-list/2016-June/msg00678.html

Since this is zero libvirtd assumes the upload is finished before it even started.

We can work around this by returning the string length. This will continue to work with fixed ruby-libvirt since errors are indicated with negative values.

plribeiro3000 commented 8 years ago

I'm not aware of this code so i can't confirm it is working.

Can you confirm this fixes the problem and that no other issues arise?

Thanks

agx commented 8 years ago

In fact it should unbreak uploading volumes and I'm not aware of any issues it can cause (we can revert should that happen), it's quiet isolated.

plribeiro3000 commented 8 years ago

Ok. 👍