ArchipelProject / Archipel

XMPP Based Orchestrator
http://archipelproject.org
GNU Affero General Public License v3.0
803 stars 126 forks source link

internal error: client socket is closed - after virsh migrate is performed #1020

Open Nowaker opened 10 years ago

Nowaker commented 10 years ago
2014-01-13 04:29:45.806 Cappuccino [error]: ERROR STANZA IS :<iq xmlns="jabber:client" from="yyy@xmpp.pacmanvps.com/zzz" to="xxx@xmpp.pacmanvps.com/ArchipelController" id="1009" type="error"><query xmlns="archipel:hypervisor:control"><archipel action="rostervm"/></query><error code="-9003" type="cancel"><archipel-error-generic xmlns="archipel:error:generic"/><text>internal error: client socket is closed

archipel:hypervisor:control
rostervm</text></error></iq> 

I had to restart Archipel to get rid of it.

Unfortunately my logs got truncated but maybe you can tell the reason and fix.

EDIT: this happens after manual virsh migrate is done. I have to do that because #192 is not yet implemented. Anyway, Archipel VM thread should be ready for anything to happen on libvirt side, and this should not break hypervisors functionality.

Nowaker commented 10 years ago
INFO    ::2014-01-14 23:42:26::utils.py:71::TNArchipelHypervisor.check_acp (hypervisor@xmpp.example.com/hypervisor.cumulushost.eu)::acp received: from: nowaker@xmpp.example.com/ArchipelController, type: get, namespace: archipel:hypervisor:network, action: get
INFO    ::2014-01-14 23:42:26::utils.py:71::TNArchipelHypervisor.check_perm (hypervisor@xmpp.example.com/hypervisor.cumulushost.eu)::Checking permission for action network_get asked by nowaker@xmpp.example.com/ArchipelController
ERROR   ::2014-01-14 23:42:27::utils.py:163::<archipelagenthypervisornetwork.network.TNHypervisorNetworks instance at 0x24ceab8>.iq_get: exception raised is: 'internal error: client socket is closed' triggered by stanza :
<iq xmlns="jabber:client" to="hypervisor@xmpp.example.com/hypervisor.cumulushost.eu" from="nowaker@xmpp.example.com/ArchipelController" id="16462" type="get"><query xmlns="archipel:hypervisor:network"><archipel action="get" /></query></iq>
DEBUG   ::2014-01-14 23:42:27::utils.py:165::Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/archipelagenthypervisornetwork/network.py", line 475, in iq_get
    networks                = self.get()

  File "/usr/lib/python2.7/site-packages/archipelagenthypervisornetwork/network.py", line 182, in get
    ret["active"] = libvirt_connection.listNetworks()

  File "/usr/lib/python2.7/site-packages/libvirt.py", line 3578, in listNetworks
    if ret is None: raise libvirtError ('virConnectListNetworks() failed', conn=self)

libvirtError: internal error: client socket is closed

INFO    ::2014-01-14 23:42:27::utils.py:71::TNArchipelHypervisor.check_acp (hypervisor@xmpp.example.com/hypervisor.cumulushost.eu)::acp received: from: nowaker@xmpp.example.com/ArchipelController, type: get, namespace: archipel:hypervisor:network, action: getnics
INFO    ::2014-01-14 23:42:27::utils.py:71::TNArchipelHypervisor.check_perm (hypervisor@xmpp.example.com/hypervisor.cumulushost.eu)::Checking permission for action network_getnics asked by nowaker@xmpp.example.com/ArchipelController
CyrilPeponnet commented 10 years ago

I guess you should "unmanaged" the vm before manually migrating. It should make it smoother.

Nowaker commented 10 years ago

As a work-around - yes. Ideally Archipel should deal with external changes being made.