Red Hat Bugzilla – Bug 984267
superVdsm fails to connect to libvirt socket after linvirtd service restart
Last modified: 2016-02-10 14:05:00 EST
Description of problem:
When restarting libvirt service superVdsm fails to connect to libvirt socket.
Operation like add/del network fails although libvirt is up and virsh is working.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.vdsm, supervdsm and libvirt is up.
2.restart libvirt service - initctl restart libvirtd
3.try to create network - vdsClient -s 0 addNetwork bridge=sw1 nics=eth1
MainProcess|Thread-14::ERROR::2013-07-14 12:03:37,599::supervdsmServer::77::SuperVdsm.ServerCallback::(wrapper) Error in addNetwork
Traceback (most recent call last):
File "/usr/share/vdsm/supervdsmServer.py", line 75, in wrapper
return func(*args, **kwargs)
File "/usr/share/vdsm/supervdsmServer.py", line 162, in addNetwork
return configNetwork.addNetwork(bridge, **options)
File "/usr/share/vdsm/configNetwork.py", line 156, in addNetwork
_netinfo = netinfo.NetInfo()
File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 503, in __init__
_netinfo = get()
File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 422, in get
for net, netAttr in networks().iteritems():
File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 106, in networks
allNets = ((net, net.name()) for net in conn.listAllNetworks(0))
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 3743, in listAllNetworks
raise libvirtError("virConnectListAllNetworks() failed", conn=self)
libvirtError: internal error client socket is closed
Created attachment 773257 [details]
vdsm and supervdsm logs
Catching RemoteError and reconnect solves the issue, but I still investigate why this is not occurred over fedora. IMHO, It has something with multiprocessing package.
Dan, any rejects to merge that fix?
After restart of libvirt, calls with old connection will lead to sigterm, that will restart the caller's service. after establishing new connection all will work properly.
Although, if supervdsm did the call and restarted (as happens while you call to setupNetworks), the next call of vdsm to supervdsm (whatever call it is) will fail and lead to reconnect. Just keep in mind that after such scenario we raise exception to see the error. Restart of libvirt or supervdsm is something that needs to be handled, we could restart and make the same call automatically (as we did in the past) but that hides the crash. We preferred to report the error first, then reconnect and then let the caller decide if to make the call again or handle the error specifically.
This bug is currently attached to errata RHBA-2013:15291. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to
minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.
Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:
* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')
Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.
For further details on the Cause, Consequence, Fix, Result format please refer to:
Thanks in advance.
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.