Bug 726010 - disable libvirtd sysv, use libvirtd upstart job
Summary: disable libvirtd sysv, use libvirtd upstart job
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node
Version: 6.2
Hardware: Unspecified
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Alan Pevec
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 726323 (view as bug list)
Depends On: 678084 694026
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-27 10:20 UTC by Alan Pevec
Modified: 2011-12-06 19:21 UTC (History)
16 users (show)

Fixed In Version: ovirt-node-2.0.2-0.5.git83340dd.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 694026
Environment:
Last Closed: 2011-12-06 19:21:16 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1783 0 normal SHIPPED_LIVE rhev-hypervisor6 bug fix and enhancement update 2011-12-06 15:10:54 UTC

Description Alan Pevec 2011-07-27 10:20:47 UTC
VDSM is now configuring libvirtd upstart job, in RHEV-H we can configure it in the image, to avoid stopping libvirtd as sysv and restarting as upstart job on boot.

+++ This bug was initially created as a clone of Bug #694026 +++

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.

--- Additional comment from danken on 2011-04-06 09:16:18 EDT ---

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 1 Dan Kenigsberg 2011-07-27 10:41:48 UTC
I thought that you would not allow vdsm-specific configuration such as this before registration to rhev-m. If I knew that you would, we could have done this configuration on vdsm post script...

Comment 2 Alan Pevec 2011-07-27 10:48:41 UTC
libvirtd upstart job is useful in general, nothing vdsm specific about it, but since vdsmd was using sysv initscript, we couldn't use it before.
How would your post script look like?

Comment 3 Dan Kenigsberg 2011-07-27 11:04:53 UTC
libvirt refused to make upstart their default in RHEL-6; I guess their reasoning could apply to rhevm-less rhevh.

Anyway, I guess the post script could be not very different from what we currently do on vdsmd startup. Hmmm, but we cannot use it in RHEL where libvirt version (and the location of the upstart script) may change in time.

start_libvirtd() {
    local packaged installed target
    local startout

    packaged=`/bin/rpm -ql libvirt | /bin/grep libvirtd.upstart | \
                 /usr/bin/tail -1`
    target=/etc/init/libvirtd.conf
    installed=`/bin/readlink -f "$target"`

    if [[ "$packaged" != "$installed" ]];
    then
        /bin/ln -sf "$packaged" "$target" || return 1
        /sbin/initctl reload-configuration
    fi

    startout=`/sbin/initctl start libvirtd 2>&1`
    if [[ "$?" -eq 0 || "$startout" =~ .*already\ running.* ]];
    then
        return 0
    else
        echo "$startout" >&2
        return 1
    fi
}

Comment 4 Alan Pevec 2011-07-27 11:36:34 UTC
(In reply to comment #3)
> libvirt refused to make upstart their default in RHEL-6; I guess their
> reasoning could apply to rhevm-less rhevh.

Their reasoning is fine for RHEL-6 in general (it would be unexpected change for the users mid-release) but rhevh is a blackbox (also 6.x wasn't public yet) and I'm confident in using libvirtd upstart job there.

Comment 5 Alan Pevec 2011-07-27 20:02:57 UTC
Actually in RHEV-H we must configure upstart job during image creation, vdsmd code in comment 3 will create dangling symlink on the running RHEV-H:
/etc/init/libvirtd.conf -> /usr/share/doc/libvirt-0.9.2/libvirtd.upstart

Files marked %doc are not installed in the RHEV-H image (%packages --excludedocs)

Comment 10 Alan Pevec 2011-07-28 09:49:41 UTC
*** Bug 726323 has been marked as a duplicate of this bug. ***

Comment 11 Alan Pevec 2011-07-28 10:08:43 UTC
>     start_needed_srv && start_libvirtd

Reopening, the above line should've been patched in rhevh kickstart.

Comment 17 Ying Cui 2011-09-01 07:48:29 UTC
According to comment 16, verified this bug on rhev-hypervisor 6.2-0.14, have removed /etc/rc.d/init.d/libvirtd, and updated /etc/rc.d/init.d/vdsmd with libvirt things.

# grep -i start_libvirt /etc/init.d/vdsmd
start_libvirtd() {

Comment 20 errata-xmlrpc 2011-12-06 19:21:16 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/RHBA-2011-1783.html


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