Change in vdsm[master]: Add vdsm upstart jobs

zhshzhou at linux.vnet.ibm.com zhshzhou at linux.vnet.ibm.com
Thu Aug 15 05:28:25 UTC 2013


Zhou Zheng Sheng has posted comments on this change.

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


Patch Set 2:

(1 comment)

....................................................
File vdsm/vdsmd.upstart.in
Line 10: nice -20
Line 11: respawn
Line 12: 
Line 13: pre-start script
Line 14:     "@LIBEXECDIR@/vdsmd_init_common.sh" --start-needed-srv "ntp open-iscsi multipath-tools wdmd sanlock portmap libvirt-bin supervdsmd"
Yes, it supports starting other Upstart services in the job configuration file, and there is a small problem with that.

"start" is "/sbin/start -> initctl", and initctl can only control Upstart native services, to start sysv dependencies, it should call "service ntp start".

So if we use Upstart native service management, the pre-start section is like following.

pre-start script
    service ntp status >/dev/null 2>&1 || service ntp start
    service open-iscsi status >/dev/null 2>&1 || service open-iscsi start
    service multipath-tools status >/dev/null 2>&1 || service multipath-tools start
    service wdmd status >/dev/null 2>&1 || service wdmd start
    service sanlock status >/dev/null 2>&1 || service sanlock start
    start portmap || true
    status portmap | grep -q start/running
    start libvirt-bin || true
    status libvirt-bin | grep -q start/running
    start supervdsmd || true
    status supervdsmd | grep -q start/running
    "@LIBEXECDIR@/vdsmd_init_common.sh" --pre-start
end

In Upstart if the service is already running, "start XXX" fails, and whatever the service is running or not, "status XXX" always succeeds. So it needs "start XXX || true" and "status XXX | grep -q start/running".

It looks like a half re-implemented (start_needed_srv + vdsm-tool service management). I think it a bit verbose, but not a big problem for me. I'm fine with both my solution and the native solution.
Line 15:     "@LIBEXECDIR@/vdsmd_init_common.sh" --pre-start
Line 16: end script
Line 17: 
Line 18: # All commands called inside this script section except the daemon itself


-- 
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: 2
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: 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