Bug 981974

Summary: Libvirt daemon no longer respawns after crash
Product: [Community] Virtualization Tools Reporter: Mooli Tayer <mtayer>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, berrange, eblake
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-31 22:58:55 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:
Bug Depends On:    
Bug Blocks: 958367    

Description Mooli Tayer 2013-07-07 12:17:14 UTC
Description of problem:
Libvirt daemon does not respawn after crash as it used to.

Currently it does not respawn on fedora 18 and does respawn on rhel 6.4.

It should respawn after crashes as it always had,
it is important, we have seen it crash due to bugs before.

Version-Release number of selected component (if applicable):
1.0.2

How reproducible:
Always.

Steps to Reproduce:
1.pkill libvirt
2.pgrep libvirt

Actual results:
Libvirt re spawns on rhel, but not on fedora   

Expected results:
Libvirt should re spawns on both   

Additional info:

Comment 1 Daniel Berrangé 2013-07-29 09:36:15 UTC
Libvirt has never been set to respawn on crash, by default, in either RHEL or Fedora. The behaviour you describe in RHEL must be the custom handling that VDSM sets up with upstart.

That said, I've no objection to configuring the systemd unit to make it restart in Fedora.

Comment 2 Eric Blake 2013-07-29 15:15:13 UTC
Patch proposed upstream, although it will have to wait until after the 1.1.1 release as we are in freeze and it represents a new feature.
https://www.redhat.com/archives/libvir-list/2013-July/msg01829.html

Comment 3 Mooli Tayer 2013-07-30 12:42:51 UTC
Second patch submitted upstream:
https://www.redhat.com/archives/libvir-list/2013-July/msg01875.html

Comment 4 Eric Blake 2013-07-31 22:58:55 UTC
Now applied. will be in 1.1.2.

commit 6f4a0ebe8c83d9952c30b657e42a08760549eda7
Author: Mooli Tayer <mtayer>
Date:   Tue Jul 30 15:32:59 2013 +0300

    Configuring systemd to restart libvirt on failure
    
    This will create a respawn behaviour in case libvirt
    process exits due to nonzero exit code, is terminated
    by a signal, an operation times out or the configured
    watchdog timeout is triggered.
    see http://www.freedesktop.org/software/systemd/man/systemd.service.html
    and https://bugzilla.redhat.com/show_bug.cgi?id=981974
    
    Signed-off-by: Eric Blake <eblake>

This bug was originally filed against upstream; if this is needed in Fedora 19, we can reopen and move the bug there to get this patch backported.