Change in vdsm[master]: Lock init script when vdsmd starts up until the service is s...

danken at redhat.com danken at redhat.com
Wed Aug 7 12:26:11 UTC 2013


Dan Kenigsberg has posted comments on this change.

Change subject: Lock init script when vdsmd starts up until the service is stopped
......................................................................


Patch Set 8: Code-Review-1

(4 comments)

....................................................
File vdsm/vdsmd.init.in
Line 104:     fi
Line 105:     return 0
Line 106: }
Line 107: 
Line 108: acquire_lock() {
please add a

# TODO: us flock
Line 109:     if [ -f "$LOCK_FILE" ]; then
Line 110:         log_failure_msg "Cannot start VDS daemon when another instance is " \
Line 111:                         "running"
Line 112: 	return 1


Line 108: acquire_lock() {
Line 109:     if [ -f "$LOCK_FILE" ]; then
Line 110:         log_failure_msg "Cannot start VDS daemon when another instance is " \
Line 111:                         "running"
Line 112: 	return 1
evil tab
Line 113:     fi
Line 114:     touch "$LOCK_FILE"
Line 115: }
Line 116: 


Line 304:     "@PYTHON@" "@VDSMDIR@/hooks.pyc" after_vdsm_stop
Line 305: }
Line 306: 
Line 307: locked_start() {
Line 308:     if ! acquire_lock; then
why did you remove the explanatory text?
Line 309:         return 1
Line 310:     else
Line 311:         start || release_lock
Line 312:     fi


Line 307: locked_start() {
Line 308:     if ! acquire_lock; then
Line 309:         return 1
Line 310:     else
Line 311:         start || release_lock
darn, I have mislead you. Now, locked_start always return 0.

  start || release_lock && return 1

is what you need.
Line 312:     fi
Line 313: }
Line 314: 
Line 315: case "$1" in


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7bf346946179e5bb2a91ab33d6b917f280a90a57
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list