Change in vdsm[master]: infra: adding debug log to vdsm daemon init script

emesika at redhat.com emesika at redhat.com
Tue Aug 21 14:18:40 UTC 2012


Eli Mesika has posted comments on this change.

Change subject: infra: adding debug log to vdsm daemon init script
......................................................................


Patch Set 2: (4 inline comments)

....................................................
File vdsm/vdsmd.init.in
Line 47: SYSTEMCTL_SKIP_REDIRECT=true
Line 48: 
Line 49: . /etc/init.d/functions
Line 50: 
Line 51: debug_log() { [[ -n "$DEBUG" ]] && (echo "$*" >> $DEBUG_LOG) }
why $* if you are using only $1 in all calls ?
Line 52: log_failure_msg() { echo -n "$@"; failure "$@"; echo; }
Line 53: log_success_msg() { echo -n "$@"; success "$@"; echo; }
Line 54: 
Line 55: check_port_taken() {


Line 160: 
Line 161:     for srv in $NEEDED_SERVICES
Line 162:     do
Line 163:         if ! /sbin/service $srv status > /dev/null 2>&1; # Verify that status is inactive
Line 164:         then            
please remove TLS
Line 165: 	        echo "Starting $srv..."
Line 166:             /sbin/service $srv start
Line 167:             ret_val=$?
Line 168:             if [ $ret_val -ne 0 ]


Line 179: test_lo() {
Line 180:     if ! LC_ALL=C /sbin/ifconfig lo | /bin/grep -q UP;
Line 181:     then
Line 182:         log_failure_msg "VDSMD: lo interface is down, can't run !"
Line 183:         echo "VDSMD: lo interface is down, can't run !" > /dev/kmsg        
same
Line 184:         return 1
Line 185:     fi
Line 186:     return 0
Line 187: }


Line 471:     ret_val=$?
Line 472:     if [ $ret_val -ne 0 ]
Line 473:     then
Line 474:        log_failure_msg "$prog: one of the dependent services did not start, error code $ret_val"
Line 475:        debug_log "error starting ext srvs"
why use short-cuts for a log message ? it should be detailed
Line 476:        return $ret_val
Line 477:     fi
Line 478: 
Line 479:     @VDSMDIR@/vdsm-restore-net-config


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I39ef7e19ede6eaed5c3f27b8c46f6f2b14dd08bd
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list