Bug 979535

Summary: RFE: virt-manager should automatically re-connect to libvirt when it's restarted
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: berrange, crobinso, hbrock, jforbes, virt-maint
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-31 17:09:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Williamson 2013-06-28 18:27:11 UTC
Due to #979533, I have to do 'systemctl restart libvirtd.service' rather often. If virt-manager is running when I do this, it throws an error dialog and makes me click through it and then manually re-connect to libvirt. It'd be kinda shiny if it was a bit smarter about handling this, and when libvirt goes away briefly then comes back, just reconnected automatically?

Comment 1 Cole Robinson 2013-08-31 17:09:43 UTC
We've had a couple requests for this in the past. While on the surface it seems simple, it would actually be a total pain in the ass.

In the simple case of the local libvirtd service being restarted, we could probably hook into systemd and get an event for more info. So if the user did a service restartd, just immediately reopen the connection and we could try to go on our way... kind of. The problem is that reconnecting to libvirt means that we need to repoll everything and update the backing state behind the scenes, which virt-manager just isn't wired to handle

So the best we could do without a large effort would be to close everything associated with the connection, drop you back to the manager window, but initiate the reconnection from there. Which only saves a couple clicks. And we couldn't handle it gracefully in the face of a libvirtd crash, or libvirtd being restarted on a remote host.

If someone showed up with a patch to implement this in a sustainable way I'd be happy to apply it, but as is I don't see it being worth the effort given the limited resources we have.