Bug 694026 - [vdsm][libvirt] as part of Libvirtd's upstart job- vdsm should initctl Libvirtd.
Summary: [vdsm][libvirt] as part of Libvirtd's upstart job- vdsm should initctl Libvirtd.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: vdsm
Version: 6.2
Hardware: Unspecified
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Sanjay Mehrotra
QA Contact: David Naori
URL:
Whiteboard:
Depends On: 678084
Blocks: 726010
TreeView+ depends on / blocked
 
Reported: 2011-04-06 09:32 UTC by David Naori
Modified: 2011-12-06 07:13 UTC (History)
11 users (show)

Fixed In Version: vdsm-4.9-85
Doc Type: Bug Fix
Doc Text:
Vdsm needs to make sure libvirtd is kept alive, even after a libvirtd crash. Therefore, Vdsm configures libvirtd to run as an Upstart job, instead of a SysV service.
Clone Of:
: 726010 (view as bug list)
Environment:
Last Closed: 2011-12-06 07:13:56 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:1782 0 normal SHIPPED_LIVE new packages: vdsm 2011-12-06 11:55:51 UTC

Description David Naori 2011-04-06 09:32:16 UTC
Description of problem:
vdsm use to control libvirtd using System V init script,
as part of libvirtd upstart job, vdsm should move to control libvirtd using init upstart initctl.

Comment 1 Dan Kenigsberg 2011-04-06 13:16:18 UTC
we should follow https://www.redhat.com/archives/libvir-list/2011-February/msg00789.html to disabled sysv init script and enable the upstart one.

Comment 2 Sanjay Mehrotra 2011-05-17 04:11:27 UTC
Changing the status to assigned.  Investigated the changes required. 
Following are the changes required for implementation. 
1. Spec file - Finalise the Location of the vdsmd upstart script ?  Some information is required from the vdsm developers -  This is my understanding that the upstart script should be part of vdsm-reg but not sure at the moment. 
2.  Following are the expected contents of the upstart script.  
a) Run level -  Based upon the existing chkconfig output, the run level of the upstart script should be [2345] 

[root@rhevh-4 ~]# chkconfig --list vdsmd
vdsmd          	0:off	1:off	2:on	3:on	4:on	5:on	6:off
[root@rhevh-4 ~]# 
[root@rhevh-4 ~]# chkconfig --list vdsm-reg
vdsm-reg       	0:off	1:off	2:on	3:on	4:on	5:on	6:off

b) Clean up the pid files and cache ( if applicable ) 
c) start the vdsmd daemon process with args - vdsmd start job
d) Apply the same concept a), b) and stop the vdsmd process  - vdsmd stop job

Some more investigation required for vdsm-reg package and process.

Comment 3 Sanjay Mehrotra 2011-06-09 04:25:45 UTC
The vdsmd file is currently been updated with the changes for 678039.  

Following are the code snippet that needs a change. 
a) 

start_needed_srv() {
    local srv
    local ret_val

    for srv in $NEEDED_SERVICES
    do
        if ! /sbin/service $srv status > /dev/null 2>&1;
        then
            echo "Starting $srv..."
            /sbin/service $srv start
            $ret_val=$?
            if [ $ret_val -ne 0 ]
            then
                 # What if any of the dependent service fails to start. 
                 # Send the return value based on that. 
                log_failure_msg "$prog: Dependent $srv failed to start "
                return $ret_val
            fi
        fi
    done

where $srv is libvirtd 

b) 
    /usr/sbin/setsebool virt_use_nfs on

    # no return status check is required, libvirtd is started again by start_needed_srv

    service libvirtd condrestart

Comment 4 Sanjay Mehrotra 2011-06-30 20:52:15 UTC
comment from Dan,  the solution should also have the following. 

$Subject - as part of Libvirtd's upstart job- vdsm should initctl Libvirtd

When vdsmd decides that it should configure libvirt, it should also
handle $Subject. Special handling should be done on vdsm removal, to
undo that.

Comment 5 Dan Kenigsberg 2011-07-07 13:12:52 UTC
http://gerrit.usersys.redhat.com/675

Comment 7 Jakub Libosvar 2011-07-29 08:22:51 UTC
Verified in vdsm-86

Comment 8 Dan Kenigsberg 2011-08-04 08:24:42 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Vdsm needs to make sure libvirtd is kept alive, even after a libvirtd crash. Therefore, Vdsm configures libvirtd to run as an Upstart job, instead of a SysV service.

Comment 9 errata-xmlrpc 2011-12-06 07:13:56 UTC
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.

http://rhn.redhat.com/errata/RHEA-2011-1782.html


Note You need to log in before you can comment on or make changes to this bug.