Re: [libvirt-users] No way to stop virStream error after guest stop

2017-05-17 Thread JosÉ Luis Valencia Gutierrez
I just tried removing the callback before calling virStreamFinish and it worked right, I thought by simply finish the stream would stop the events and close it, the example I was based on only calls virStreamFinish on EOF event. Em qua, 17 de mai de 2017 às 12:49, Martin Kletzander escreveu: >

Re: [libvirt-users] No way to stop virStream error after guest stop

2017-05-17 Thread Martin Kletzander
On Wed, May 17, 2017 at 09:08:14AM +0200, Martin Kletzander wrote: On Wed, May 17, 2017 at 01:01:39AM +, JosÉ Luis Valencia Gutierrez wrote: I get just _READABLE events repeatedly, virStreamAbort() doesn't work, it gets out of control after the target domain stops and the unix scocket is del

Re: [libvirt-users] Duplicate reboot events

2017-05-17 Thread Martin Kletzander
On Wed, May 17, 2017 at 03:14:18PM +, Innus, Martins wrote: Nevermind, as far as I can tell, this is a bug in QEMU and is closed as a WONTFIX: https://bugzilla.redhat.com/show_bug.cgi?id=951525 Thanks for the debugging help. As you found out in the other mail, yes it is. I didn't know a

Re: [libvirt-users] Duplicate reboot events

2017-05-17 Thread Innus, Martins
On May 16, 2017, at 4:28 PM, Martin Kletzander mailto:mklet...@redhat.com>> wrote: On Tue, May 16, 2017 at 08:11:54PM +, Innus, Martins wrote: On May 16, 2017, at 3:49 PM, Martin Kletzander mailto:mklet...@redhat.com>> wrote: On Tue, May 16, 2017 at 06:41:05PM +, Innus, Martins wrote:

Re: [libvirt-users] Callback re-registration after libvirtd restart

2017-05-17 Thread Daniel Kučera
> > Okay, with qemu:///session I'm getting CloseCallback but now I'm not > getting LifecycleCallback :( > > S pozdravom / Best regards > Daniel Kucera. > Okay, I take it back. It works. S pozdravom / Best regards Daniel Kucera. ___ libvirt-users mailing

Re: [libvirt-users] Duplicate reboot events

2017-05-17 Thread Innus, Martins
> On May 16, 2017, at 4:28 PM, Martin Kletzander wrote: > > On Tue, May 16, 2017 at 08:11:54PM +, Innus, Martins wrote: >> >>> On May 16, 2017, at 3:49 PM, Martin Kletzander wrote: >>> >>> On Tue, May 16, 2017 at 06:41:05PM +, Innus, Martins wrote: Hi, Running on:

Re: [libvirt-users] Callback re-registration after libvirtd restart

2017-05-17 Thread Daniel Kučera
2017-05-17 15:52 GMT+02:00 Daniel P. Berrange : > On Wed, May 17, 2017 at 03:49:45PM +0200, Daniel Kučera wrote: > > No, I'm not, I'm calling it sooner: > > > > func libvirt_start() { > > libvirt.EventRegisterDefaultImpl() > > event_listen() > > } > > Well the following example wor

Re: [libvirt-users] Callback re-registration after libvirtd restart

2017-05-17 Thread Daniel Kučera
No, I'm not, I'm calling it sooner: func libvirt_start() { libvirt.EventRegisterDefaultImpl() event_listen() } S pozdravom / Best regards Daniel Kucera. 2017-05-17 15:47 GMT+02:00 Daniel P. Berrange : > On Wed, May 17, 2017 at 03:41:09PM +0200, Daniel Kučera wrote: > > Hi Dan

Re: [libvirt-users] Callback re-registration after libvirtd restart

2017-05-17 Thread Daniel P. Berrange
On Wed, May 17, 2017 at 03:49:45PM +0200, Daniel Kučera wrote: > No, I'm not, I'm calling it sooner: > > func libvirt_start() { > libvirt.EventRegisterDefaultImpl() > event_listen() > } Well the following example works as expected for me package main import ( "github.com

Re: [libvirt-users] Callback re-registration after libvirtd restart

2017-05-17 Thread Daniel P. Berrange
On Wed, May 17, 2017 at 03:41:09PM +0200, Daniel Kučera wrote: > Hi Daniel, > > I tried that but it doesn't work: > > func libvirt_close_callback(conn *libvirt.Connect, reason > libvirt.ConnectCloseReason){ > log.Printf("close callback: %+v", reason) > } > > func event_listen() { > log.P

Re: [libvirt-users] Callback re-registration after libvirtd restart

2017-05-17 Thread Daniel Kučera
Hi Daniel, I tried that but it doesn't work: func libvirt_close_callback(conn *libvirt.Connect, reason libvirt.ConnectCloseReason){ log.Printf("close callback: %+v", reason) } func event_listen() { log.Printf("event_listen %s", conf.Libvirt.LocalUrl) hv, err := libvirt.NewConnect(con

Re: [libvirt-users] Callback re-registration after libvirtd restart

2017-05-17 Thread Daniel P. Berrange
On Wed, May 17, 2017 at 03:08:23PM +0200, Daniel Kučera wrote: > Hi all, > > I'm using libvirt-go and I following code to listen for lifecycle events: > > func event_listen() { > log.Printf("event_listen %s", conf.Libvirt.LocalUrl) > hv, err := libvirt.NewConnect(conf.Libvirt.LocalUrl) >

[libvirt-users] Callback re-registration after libvirtd restart

2017-05-17 Thread Daniel Kučera
Hi all, I'm using libvirt-go and I following code to listen for lifecycle events: func event_listen() { log.Printf("event_listen %s", conf.Libvirt.LocalUrl) hv, err := libvirt.NewConnect(conf.Libvirt.LocalUrl) lifecycleCallback := func(c *libvirt.Connect, d *libvirt.Domain, event *li

Re: [libvirt-users] No way to stop virStream error after guest stop

2017-05-17 Thread Martin Kletzander
On Wed, May 17, 2017 at 01:01:39AM +, JosÉ Luis Valencia Gutierrez wrote: I get just _READABLE events repeatedly, virStreamAbort() doesn't work, it gets out of control after the target domain stops and the unix scocket is deleted. I ended connecting directly to the unix socket. I just wanted