Yaniv Bronhaim has posted comments on this change.

Change subject: Add vdsm upstart jobs
......................................................................


Patch Set 6: Code-Review+1

(1 comment)

....................................................
File init/upstart/vdsmd.upstart.in
Line 10: nice -20
Line 11: respawn
Line 12: 
Line 13: pre-start script
Line 14:     for srv in networking ntp open-iscsi multipath-tools wdmd sanlock 
portmap libvirt-bin supervdsmd; do
Why not sharing the required services list between services' scripts, instead 
of declaring it in each service script file? we can make conf file that 
translates between the actual service's name to the required service in the 
system. This can assist not to miss updating all the service scripts in each 
new dependency. 

For example, the list will contain: network, iscsi, multipatch, sanlock, 
libvirt ... 

and the conf file will be:

system="upstat"

if ${system} = 'upstat'; then

libvirt=libvirt-bin

sanlock=sanlock
..

elif ${system} = 'systemd'; then

libvirt=libvirtd.service

..

elif ${system} = 'initctl'; then

libvirt=libvirtd

..


required_services=${libvirt} ${sanlock} ..

and in vdsmd.upstat.in, vdsmd.init.in and vdsmd.service  we'll declare only

system='upstat'
...
  for srv in ${required_services}; do ..
...
Line 15:         if status "${srv}" >/dev/null 2>&1; then
Line 16:             # When srv is Upstart service, status srv always returns 0
Line 17:             start "${srv}" || true
Line 18:             status "${srv}" | grep -q start/running


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id68ec0197bd1e09100f5da96ac4db24f2b90753a
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshz...@linux.vnet.ibm.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshz...@linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to