Change in vdsm[master]: vdsmd and supervdsmd: extract common init tasks and add init...

zhshzhou at linux.vnet.ibm.com zhshzhou at linux.vnet.ibm.com
Mon Aug 19 10:58:31 UTC 2013


Zhou Zheng Sheng has posted comments on this change.

Change subject: vdsmd and supervdsmd: extract common init tasks and add init adapter
......................................................................


Patch Set 18:

(1 comment)

....................................................
File vdsm/vdsmd.init.in
Line 83:     fi
Line 84: 
Line 85:     "${VDSMD_INIT_COMMON}" --shutdown-conflicting-srv "${CONFLICTING_SERVICES}"
Line 86: 
Line 87:     "${VDSMD_INIT_COMMON}" --start-needed-srv "${NEEDED_SERVICES}"
There are too many small differences between the distros, even using the same init system, and some checks are not possible. For example, "libvirtd" is named "libvirt-bin" in Ubuntu and Debian, and "network" is "networking".

Take libvirt-bin as an example again, in Ubuntu, we write

  start on started libvirt-bin or started portmap ...

But if the Upstart file is used in RHEL6, we should write

  start on started libvirtd or  ...

Suppose we have a "vdsmd.upstart" and it wants to start libvirtd as dependency. To detect this condition, we can write the following logic in the pre-start script.

If Debian or Ubuntu then
    initctl start libvirt-bin
else
    initctl start libvirtd

And some services are managed by SysV in RHEL6, but the same service can be managed by Upstart in Ubuntu. Taking the check of /etc/init/xxx and the service names into consideration, this is re-implementing vdsm-tool service management. And the SystemD service file would have the same problems as Upstart file.

So my opinion is continue to use vdsm-tool service management unless we use different scripts for each distro. Otherwise I can use "service" and "initctl" in this vdsmd.init.in if we are sure this file is for RHEL6. So that a Debian maintainer can refer to init/rhel6/vdsmd.init.in and write init/debian/vdsmd.init.in without knowing vdsm-tool, and make any Debian specific changes.
Line 88: 
Line 89:     "${VDSMD_INIT_COMMON}" --pre-start
Line 90: 
Line 91:     echo $"Starting up vdsm daemon: "


-- 
To view, visit http://gerrit.ovirt.org/15578
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id8e514df1ca88500f746242134ddb24c31588046
Gerrit-PatchSet: 18
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Mei Liu <liumbj at linux.vnet.ibm.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbonazzo at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list