[Libvir] Double call to domainSuspend callback

Hi, I have implemented the 'domainSuspend' callback in libvirt for my hypervisor (see test.c or qemu_internal.c for reference) When using the Red Hat Virtual Manager (after connecting to my hypervisor), clicking on a domain row, then clicking the 'open' button at the botton right of the window, I get a new window where I can click the 'Pause' button for instance. When I do this, the 'domainSuspend' callback is entered twice as shown in my debug code below. Why is this happening? Is it a bug? So somewhere in the RHVM python code, this call is getting activated twice. Thanks, -Bruce --> 1st time: DBG: ldomsDomainSuspend(ENTER) name=ldom1 **send_ldom_lifecycle_action..(ENTER) ldom_name=ldom1, action=2 ****create_xml_file_4_ldom_action(ENTER), ldom=ldom1, action=stop-domain **send_xml_file_to_ldm(ENTER).. **open_ldm_connection(ENTER) **open_ldm_connection..LDM_INIT_ACK from zeus, Minor sent=0, Minor rcvd=0 **create_pkt_buf(ENTER) **get_response(ENTER) **get_response..received 341 bytes for rsp body **handle_resp(ENTER) **close_ldm_connection..trying to close LDM socket=18 ****parse_xml_get_response_status(ENTER) ****parse_xml_get_response_status.. <response><status> is success DBG: ldomsDomainGetInfo(ENTER) dom=ldom1 DBG: getDomainIndex(ENTER) domID=1, ldom_cnt=4 DBG: getDomainIndex(EXIT) domidx=1 DBG: ldomsDomainGetInfo() domidx=1 DBG: ldomsDomainGetInfo() ldomName=ldom1 DBG: ldomsDomainGetInfo() ldomState=1 --> 2nd time: DBG: ldomsDomainSuspend(ENTER) name=ldom1 **send_ldom_lifecycle_action..(ENTER) ldom_name=ldom1, action=2 ****create_xml_file_4_ldom_action(ENTER), ldom=ldom1, action=stop-domain **send_xml_file_to_ldm(ENTER).. **open_ldm_connection(ENTER) **open_ldm_connection..LDM_INIT_ACK from zeus, Minor sent=0, Minor rcvd=0 **create_pkt_buf(ENTER) **get_response(ENTER) **get_response..received 391 bytes for rsp body **handle_resp(ENTER) **close_ldm_connection..trying to close LDM socket=18 ****parse_xml_get_response_status(ENTER) ****parse_xml_get_response_status.. <response><status>=failure ****parse_xml_get_response_status.. No <resp_msg> tag **send_ldom_active_mgmt.. failure response from received xml Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/console.py", line 390, in control_vm_pause self.vm.suspend() File "/usr/share/virt-manager/virtManager/domain.py", line 365, in suspend self.vm.suspend() File "/usr/lib/python2.4/vendor-packages/libvirt.py", line 350, in suspend if ret == -1: raise libvirtError ('virDomainSuspend() failed', dom=self) libvirt.libvirtError: virDomainSuspend() failed

On Tue, Jul 10, 2007 at 02:04:49PM -0600, Bruce.Evans@Sun.COM wrote:
Hi,
I have implemented the 'domainSuspend' callback in libvirt for my hypervisor (see test.c or qemu_internal.c for reference)
When using the Red Hat Virtual Manager (after connecting to my hypervisor), clicking on a domain row, then clicking the 'open' button at the botton right of the window, I get a new window where I can click the 'Pause' button for instance.
When I do this, the 'domainSuspend' callback is entered twice as shown in my debug code below.
That's very interesting you noticed this - it could very likely explain why I've been getting reports of domainSuspend failing for QEMU driver too.
Why is this happening? Is it a bug?
Sounds like its probably a bug in virt-manager. I'll see if there's anything obvious wrong with it. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

Bruce.Evans@Sun.COM wrote:
Hi,
I have implemented the 'domainSuspend' callback in libvirt for my hypervisor (see test.c or qemu_internal.c for reference)
When using the Red Hat Virtual Manager (after connecting to my hypervisor), clicking on a domain row, then clicking the 'open' button at the botton right of the window, I get a new window where I can click the 'Pause' button for instance.
When I do this, the 'domainSuspend' callback is entered twice as shown in my debug code below.
Why is this happening? Is it a bug?
So somewhere in the RHVM python code, this call is getting activated twice.
Bruce, there's a bug tracking this, and a fix for it. If you could try it out and let us know if that fixes it for you. http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=247755 Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
participants (3)
-
Bruce.Evans@Sun.COM
-
Daniel P. Berrange
-
Richard W.M. Jones