search for: virstreamrecv

Displaying 12 results from an estimated 12 matches for "virstreamrecv".

2017 Apr 28
2
No way to stop virStream error after guest stop
...a virChannel(unix) to a domain and receiving data with a non-blocking virStream using events, when the connected domain gets stopped(which deletes the channel unix socket) by calling destroy, shutdown, pause or migrate on that domain, with the stream open the read event is triggered repeatedly, and virStreamRecv returns 0 bytes indicating EOF but neither virStreamFinish nor virStreamFinish is working to stop the stream to trigger the event . Each time the event is called I got this errors. libvirt: I/O Stream Utils error : this function is not supported by the connection driver: virStreamRecv libvirt:...
2017 May 17
2
Re: No way to stop virStream error after guest stop
...eceiving data with a > >non-blocking virStream using events, when the connected domain gets > >stopped(which deletes the channel unix socket) by calling destroy, > >shutdown, pause or migrate on that domain, with the stream open the read > >event is triggered repeatedly, and virStreamRecv returns 0 bytes > indicating > > EOF but neither virStreamFinish nor virStreamFinish is working to stop > >the stream to trigger the event . Each time the event is called I got this > >errors. > > > >libvirt: I/O Stream Utils error : this function is not supported...
2017 May 17
2
Re: No way to stop virStream error after guest stop
...; So I played around with this for a while now and I can partially reproduce what you are seeing, but with the correct usage it goes away. So my guess is there is a stray call in your program somewhere or I didn't reproduce exactly what you meant. After receiving the _READABLE event and doing virStreamRecv() that returns 0 bytes read, did you try immediatelly removing the callback and calling virStreamFinish() on the stream? What you see happening is something that is possible by not removing the callback and then aborting the stream, for example. >>Jose V. >>Em ter, 16 de mai de 2017 à...
2017 May 17
0
Re: No way to stop virStream error after guest stop
...th this for a while now and I can partially > reproduce what you are seeing, but with the correct usage it goes away. > So my guess is there is a stray call in your program somewhere or I > didn't reproduce exactly what you meant. > > After receiving the _READABLE event and doing virStreamRecv() that > returns 0 bytes read, did you try immediatelly removing the callback and > calling virStreamFinish() on the stream? > > What you see happening is something that is possible by not removing the > callback and then aborting the stream, for example. > > >>Jose V. &g...
2017 May 16
0
Re: No way to stop virStream error after guest stop
...x) to a domain and receiving data with a >non-blocking virStream using events, when the connected domain gets >stopped(which deletes the channel unix socket) by calling destroy, >shutdown, pause or migrate on that domain, with the stream open the read >event is triggered repeatedly, and virStreamRecv returns 0 bytes indicating > EOF but neither virStreamFinish nor virStreamFinish is working to stop >the stream to trigger the event . Each time the event is called I got this >errors. > >libvirt: I/O Stream Utils error : this function is not supported by >the connection driver:...
2017 May 17
0
Re: No way to stop virStream error after guest stop
...th a >> >non-blocking virStream using events, when the connected domain gets >> >stopped(which deletes the channel unix socket) by calling destroy, >> >shutdown, pause or migrate on that domain, with the stream open the read >> >event is triggered repeatedly, and virStreamRecv returns 0 bytes >> indicating >> > EOF but neither virStreamFinish nor virStreamFinish is working to stop >> >the stream to trigger the event . Each time the event is called I got this >> >errors. >> > >> >libvirt: I/O Stream Utils error : this fu...
2016 Apr 25
2
Re: stream finish throws exception via python API
...uested data wasn't read. /** * virStreamFinish: * @stream: pointer to the stream object * * Indicate that there is no further data to be transmitted * on the stream. For output streams this should be called once * all data has been written. For input streams this should be * called once virStreamRecv returns end-of-file. * * This method is a synchronization point for all asynchronous * errors, so if this returns a success code the application can * be sure that all data has been successfully processed. * * Returns 0 on success, -1 upon error */ So maybe in your case you want virStreamAb...
2016 Apr 26
2
Re: stream finish throws exception via python API
...gt; * @stream: pointer to the stream object > > * > > * Indicate that there is no further data to be transmitted > > * on the stream. For output streams this should be called once > > * all data has been written. For input streams this should be > > * called once virStreamRecv returns end-of-file. > > * > > * This method is a synchronization point for all asynchronous > > * errors, so if this returns a success code the application can > > * be sure that all data has been successfully processed. > > * > > * Returns 0 on success, -...
2016 Apr 26
0
Re: stream finish throws exception via python API
...gt; * virStreamFinish: > * @stream: pointer to the stream object > * > * Indicate that there is no further data to be transmitted > * on the stream. For output streams this should be called once > * all data has been written. For input streams this should be > * called once virStreamRecv returns end-of-file. > * > * This method is a synchronization point for all asynchronous > * errors, so if this returns a success code the application can > * be sure that all data has been successfully processed. > * > * Returns 0 on success, -1 upon error > */ > &g...
2016 Apr 26
0
Re: stream finish throws exception via python API
...o the stream object > > > * > > > * Indicate that there is no further data to be transmitted > > > * on the stream. For output streams this should be called once > > > * all data has been written. For input streams this should be > > > * called once virStreamRecv returns end-of-file. > > > * > > > * This method is a synchronization point for all asynchronous > > > * errors, so if this returns a success code the application can > > > * be sure that all data has been successfully processed. > > > * > > &...
2016 Apr 17
2
stream finish throws exception via python API
Hi, The following snippet works fine e.g. receiving the data but when calling stream.finish() we get the following error: stream = con.newStream() vol.download(stream, 0, 0, 0) buf = stream.recv(1024) stream.finish() libvirt: I/O Stream Utils error : internal error: I/O helper exited abnormally Traceback (most recent call last): File "./helpers/kvm2ovirt", line 149, in <module>
2013 Sep 18
2
Trouble using virStream with callbacks
...bytes_read); } if (events & (VIR_EVENT_HANDLE_ERROR|VIR_EVENT_HANDLE_HANGUP)) { stream_active = 0; } return; } void stream_to_stdout(virStreamPtr stream, int events, void *opaque) { if (events & VIR_EVENT_HANDLE_READABLE) { char buf[1024]; int bytes_read = virStreamRecv(stream, buf, sizeof(buf)); if (bytes_read > 0) { fwrite(buf, bytes_read, 1, stdout); fflush(stdout); } } if (events & (VIR_EVENT_HANDLE_ERROR|VIR_EVENT_HANDLE_HANGUP)) { stream_active = 0; } return; } int main(int argc, char *argv[]) { virC...