Displaying 5 results from an estimated 5 matches for "lifecyclecallback".
2017 May 17
2
Callback re-registration after libvirtd restart
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
*libvirt.DomainEventLifecycle) {
event_message(c, d, "lifecycle", event)
}
_, err = hv.DomainEventLifecycleRegister(nil, lifecycleCallback)
if err != nil {
log.Printf("unable to register event callback&...
2017 May 17
0
Re: Callback re-registration after libvirtd restart
...l 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)
>
> lifecycleCallback := func(c *libvirt.Connect, d *libvirt.Domain, event
> *libvirt.DomainEventLifecycle) {
> event_message(c, d, "lifecycle", event)
> }
>
> _, err = hv.DomainEventLifecycleRegister(nil, lifecycleCallback)
> if err != nil {
> log.Printf("...
2017 May 17
1
Re: Callback re-registration after libvirtd restart
...ww.flickr.com/photos/
> dberrange :|
> |: https://libvirt.org -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org -o- https://www.instagram.com/
> dberrange :|
>
Okay, with qemu:///session I'm getting CloseCallback but now I'm not
getting LifecycleCallback :(
S pozdravom / Best regards
Daniel Kucera.
2017 May 17
2
Re: Callback re-registration after libvirtd restart
...;
> > 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
> > *libvirt.DomainEventLifecycle) {
> > event_message(c, d, "lifecycle", event)
> > }
> >
> > _, err = hv.DomainEventLifecycleRegister(nil, lifecycleCallback)
> > if err != n...
2017 May 17
2
Re: Callback re-registration after libvirtd restart
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 <berrange@redhat.com>:
> On Wed, May 17, 2017 at 03:41:09PM +0200, Daniel Kučera wrote:
> > Hi Daniel,
> >
> > I tried that but it doesn't