Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Cause:
Reversed condition in check when registering a callback was preventing multiple callbacks to be registered.
Consequence:
Same callbacks for different domains couldn't be registered.
Fix:
The condition was fixed.
Result:
Callbacks can be registered now successfully.
Description of problem:
virConnectDomainEventRegisterAny() will return "libvir: Remote error : adding cb to list
" when you attempt to register the same callback for already registered event but for a different domain.
Version-Release number of selected component (if applicable):
0.9.12
How reproducible:
always
Steps to Reproduce:
...
virDomainPtr dom1 = virDomainLookupByName(conn, "domain1");
virDomainPtr dom1 = virDomainLookupByName(conn, "domain2");
virConnectDomainEventRegisterAny(conn, dom1, VIR_DOMAIN_EVENT_ID_LIFECYCLE,
VIR_DOMAIN_EVENT_CALLBACK (myCallback), someDataPtr, NULL);
virConnectDomainEventRegisterAny(conn, dom2, VIR_DOMAIN_EVENT_ID_LIFECYCLE,
VIR_DOMAIN_EVENT_CALLBACK (myCallback), someOtherDataPtr, NULL);
Actual results:
First call works as expected, second throws error "libvir: Remote error : adding cb to list" and the callback is not registered for domain2.
Expected results:
Both calls should work and register the callback correctly.
Additional info:
Problem seems to be in virDomainEventCallbackListAddID() where the first for() cycle does not take domain into account. Therefor it works perfectly for domain being NULL, but not for specific domains.
Okay, moving to POST:
commit cd15303fd123146b0ba53e387d08ef22b707223c
Author: Michal Privoznik <mprivozn>
AuthorDate: Wed Jun 27 12:06:45 2012 +0200
Commit: Michal Privoznik <mprivozn>
CommitDate: Wed Jun 27 16:20:41 2012 +0200
events: Don't fail on registering events for two different domains
virConnectDomainEventRegisterAny() takes a domain as an argument.
So it should be possible to register the same event (be it
VIR_DOMAIN_EVENT_ID_LIFECYCLE for example) for two different domains.
That is, we need to take domain into account when searching for
duplicate event being already registered.
v0.9.13-rc1-18-gcd15303
With libvirt-0.9.13-3.el6.x86_64, run the reproducer in comment 1, and this bug can be verified.
I try to start/suspend/resume/destroy/save/restore for both tow guest, and no such error throw out like the bug described.
The outputs:
myDomainEventCallback2 EVENT: Domain rhel6(2) Started Booted
myDomainEventCallback2 EVENT: Domain rhel6-2(1) Suspended Paused
myDomainEventCallback2 EVENT: Domain rhel6(2) Suspended Paused
myDomainEventCallback2 EVENT: Domain rhel6(2) Resumed Unpaused
myDomainEventCallback2 EVENT: Domain rhel6-2(1) Resumed Unpaused
myDomainEventCallback2 EVENT: Domain rhel6(-1) Stopped Destroyed
myDomainEventCallback2 EVENT: Domain rhel6-2(-1) Stopped Destroyed
myDomainEventCallback2 EVENT: Domain rhel6(3) Started Booted
myDomainEventCallback2 EVENT: Domain rhel6-2(4) Started Booted
myDomainEventCallback2 EVENT: Domain rhel6-2(-1) Stopped Failed
myDomainEventCallback2 EVENT: Domain rhel6(-1) Stopped Failed
myDomainEventCallback2 EVENT: Domain rhel6(5) Started Restored
myDomainEventCallback2 EVENT: Domain rhel6-2(6) Started Restored
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHSA-2013-0276.html
Description of problem: virConnectDomainEventRegisterAny() will return "libvir: Remote error : adding cb to list " when you attempt to register the same callback for already registered event but for a different domain. Version-Release number of selected component (if applicable): 0.9.12 How reproducible: always Steps to Reproduce: ... virDomainPtr dom1 = virDomainLookupByName(conn, "domain1"); virDomainPtr dom1 = virDomainLookupByName(conn, "domain2"); virConnectDomainEventRegisterAny(conn, dom1, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK (myCallback), someDataPtr, NULL); virConnectDomainEventRegisterAny(conn, dom2, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK (myCallback), someOtherDataPtr, NULL); Actual results: First call works as expected, second throws error "libvir: Remote error : adding cb to list" and the callback is not registered for domain2. Expected results: Both calls should work and register the callback correctly. Additional info: Problem seems to be in virDomainEventCallbackListAddID() where the first for() cycle does not take domain into account. Therefor it works perfectly for domain being NULL, but not for specific domains.