Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 694026

Summary: [vdsm][libvirt] as part of Libvirtd's upstart job- vdsm should initctl Libvirtd.
Product: Red Hat Enterprise Linux 6 Reporter: David Naori <dnaori>
Component: vdsmAssignee: Sanjay Mehrotra <smehrotr>
Status: CLOSED ERRATA QA Contact: David Naori <dnaori>
Severity: medium Docs Contact:
Priority: high    
Version: 6.2CC: abaron, bazulay, danken, dnaori, ewarszaw, hateya, iheim, jlibosva, mgoldboi, smehrotr, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
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.
Story Points: ---
Clone Of:
: 726010 (view as bug list) Environment:
Last Closed: 2011-12-06 07:13:56 UTC Type: ---
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: 678084    
Bug Blocks: 726010    

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