Closed oblazek closed 2 years ago
Does it still behave this way if you populate the third argument slice with Domains to subscribe to?
events, err := l.SubscribeEvents(ctx, libvirt.DomainEventIDDeviceAdded, []libvirt.Domain{aDomain, anotherDomain})
if err != nil {
log.Fatal(err)
}
no, that doesn't help either :/ .. but I got a bit further when I used
events, err := p.libvirtClient.SubscribeQEMUEvents(ctx, d.Name)
if err != nil {
log.Fatal(err)
}
but then I could only get DEVICE_DELETED
but nothing like DEVICE_ADDED
or METADATA_CHANGE
fyi with a different library github.com/libvirt/libvirt-go-module
it works just fine :/
with that I am subscribing to the events like this:
_, err := conn.DomainEventMetadataChangeRegister(nil, p.cbMetadadaChanged)
Thanks, that's good information.
Would you be willing to share a stack trace of your reproducer program?
Just let it run, find its PID, and do a kill -s SIGABRT <PID>
and paste it here or link to a pastebin somewhere?
sounds good, will do that
I am trying to subscribe to these events (in the title) like following:
and then reading from that channel, but there no event comes no matter what I do..
I can see all these in
virsh event --all --loop
:but only lifecycle events work fine and can be subscribe/read from:
any chance I am just missing something? Btw trying to use this on a openstack host with libvirt 5: