[Libvir] Double call to domainSuspend callback

Bruce.Evans at Sun.COM Bruce.Evans at Sun.COM
Tue Jul 10 20:04:49 UTC 2007


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




More information about the libvir-list mailing list