Zhou Zheng Sheng has posted comments on this change.
Change subject: Modification in lockfile usage mechanism as part of sysv sysv
init script
......................................................................
Patch Set 3:
(1 comment)
....................................................
File init/sysvinit/vdsmd.init.in
Line 75: acquire_lock() {
Line 76: # todo: add additional flock on free fd
Line 77: if [ -f "$LOCK_FILE" ]; then
Line 78: return 1
Line 79: fi
SysV init scripts do not rely on the lockfile in /var/lock/subsys for keeping
the daemon singleton. The fact is that /var/lock/subsys/XXX is just for having
the system call "service XXX stop" automatically when system is shutting down.
So in previous discussion I suggest using a different file for flock.
To keep the daemon process singleton, the process should use some kind of file
locking on its pid file. This is documented in "man 7 daemon" on my Fedora.
That's why I suggest VDSM main entry to use flock. Another choice is using
flock in init/sysvinit/respawn to keep respawn singleton, then we do not have
to change VDSM daemon code. I think this is good because in SystemD and Upstart
we do not use init/sysvinit/respawn but native respawn. So the pid file locking
is better placed in SysV related scripts like init/sysvinit/respawn, not in
VDSM code.
Line 80: touch "$LOCK_FILE"
Line 81: trap cleanup SIGINT SIGHUP SIGTERM
Line 82: }
Line 83:
--
To view, visit http://gerrit.ovirt.org/18875
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic74c9cf9c2c520e94a98b99fdb970b544b780ba3
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches