Change in vdsm[master]: Split vdsm init script into pieces

Alon Bar-Lev alonbl at redhat.com
Thu May 23 09:19:22 UTC 2013


Alon Bar-Lev has posted comments on this change.

Change subject: Split vdsm init script into pieces
......................................................................


Patch Set 3:

1. Great.

2. I have a proposal. Can we consider using a --with-initd-functions=/etc/init.d/functions option in configure?

I don't think this is correct.

downstream specific code should be the root wrapper, not any of the leaf.

centos/rhev requires initd script.

 http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=blob;f=packaging/services/ovirt-engine.sysv.in;hb=HEAD

systemd requires simple unit, such as:

 [Unit]
 Description=oVirt Engine
 After=network.service postgresql.service

 [Service]
 Type=simple
 User=@ENGINE_USER@
 Group=@ENGINE_GROUP@
 LimitNOFILE=65535
 ExecStart=@ENGINE_USR@/services/ovirt-engine.py $EXTRA_ARGS start
 EnvironmentFile=-/etc/sysconfig/ovirt-engine

 [Install]
 WantedBy=multi-user.target

upstart requires simple job

 description "Ovirt Enigne"
 setuid @ENGINE_USER@
 setguid @ENGINE_GROUP@
 limit nofile unlimited unlimited
 exec @ENGINE_USR@/services/ovirt-engine.py $EXTRA_ARGS start

openrc requires simple script

 https://github.com/alonbl/ovirt-overlay/blob/master/app-emulation/ovirt-engine/files/ovirt-engine.init.d

The functions are needed only for cents/rhel... and can be explicitly embed into the script. Even in the legacy debian we have differences in the init script in term of dependencies and locations, so better to split these as well if to be supported.

3. Which specific functionalities you mean to enable and to disable?

I do not follow, why not use upstart to respawn? and remove this logic from the script? why use lsb?

4. I didn't quite catch up with your thoughts for this problem. I read the code of the patches from oVirt Engine from the links you gave me. Do you mean in different init systems, we can invoke init-common with different options? For example Upstart provides respawn and daemonize abilities already, so we can invoke init-common without --respawn and --background.

Correct.

5. I believe libvirt configuration refactoring can be in future patches, not in this patch.

Well, it will only make it more complex... as you need to pass this somehow to hooks... I suggest Yaniv will provide a solution first... then you can rebase.

source all vdsm init tasks and calculate the dependencies

This is kind of simple...

 ---
 #!/bin/sh
 FUNCTIONS=
 for f in ./*.sh; do
         . "${f}"
 done
 for x in ${FUNCTIONS}; do
         ${x}
 done
 ---
 go1() {
         echo 01
 }

 FUNCTIONS="${FUNCTIONS} go1"
 ---

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c652704000c764c6e6f248605c6a3f4f3af5ace
Gerrit-PatchSet: 3
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: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list