Dan Kenigsberg has posted comments on this change.
Change subject: introducing capabillity to stream data to image ......................................................................
Patch Set 9:
(3 comments)
http://gerrit.ovirt.org/#/c/23281/9/vdsm/BindingXMLRPC.py File vdsm/BindingXMLRPC.py:
Line 189: 'fileObj': self.rfile, Line 190: 'callback': upload_finished, Line 191: 'contentLength': contentLength} Line 192: image = API.Image(imgUUID, spUUID, sdUUID) Line 193: response = image.download(methodArgs, volUUID)
download is scheduling a task in hsm and return immediately with a task id.
Thanks, I got tangled between stroage.image and API.image. Line 194: Line 195: while not uploadFinishedEvent.is_set(): Line 196: uploadFinishedEvent.wait() Line 197:
http://gerrit.ovirt.org/#/c/23281/9/vdsm/storage/imageSharing.py File vdsm/storage/imageSharing.py:
Line 18: # Line 19: Line 20: import logging Line 21: import curlImgWrap Line 22: import signal
This is unrelated to this patch, can be cleanup later to keep this patch mi
I'm referring only to newly added imports. Line 23: import socket Line 24: Line 25: import storage_exception as se Line 26: from vdsm import constants
Line 100: p.stdin.write(data) Line 101: # Process stdin is not a real file object but a wrapper using Line 102: # StringIO buffer. To ensure that we don't use more memory if we Line 103: # get data faster then dd read it from the pipe, we flush on every Line 104: # write. We can remove if we can limit the buffer size used by
Did you check the underlying file object wrapper?
my comment was only about the comment english. Sorry about the ambiguity. Line 105: # this stdin wrapper. Line 106: p.stdin.flush() Line 107: bytes_left = bytes_left - len(data) Line 108: