Change in vdsm[master]: pre-start: touch/configure vdsm logs

dougsland at redhat.com dougsland at redhat.com
Thu Mar 20 15:03:19 UTC 2014


Douglas Schilling Landgraf has posted comments on this change.

Change subject: pre-start: touch/configure vdsm logs
......................................................................


Patch Set 2:

(8 comments)

http://gerrit.ovirt.org/#/c/25912/2//COMMIT_MSG
Commit Message:

Line 6: 
Line 7: pre-start: touch/configure vdsm logs
Line 8: 
Line 9: During pre-start of vdsm we must create vdsm logs files
Line 10: with proper perms/user/group/ if they doesn't exist.
> please explain why its not enough to create those during installation and m
Done
Line 11: 
Line 12: Change-Id: I6ca927cb447eeb24195cff6a1174e0f9a7295214
Line 13: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1055153


http://gerrit.ovirt.org/#/c/25912/2/init/vdsmd_init_common.sh.in
File init/vdsmd_init_common.sh.in:

Line 33: }
Line 34: 
Line 35: task_configure_vdsm_logs() {
Line 36:     local vdsm_logs=(
Line 37:         "@VDSMLOGDIR@/metadata.log" \
> Better to use POSIX shell
Done
Line 38:         "@VDSMLOGDIR@/mom.log" \
Line 39:         "@VDSMLOGDIR@/vdsm.log"
Line 40:     )
Line 41: 


Line 38:         "@VDSMLOGDIR@/mom.log" \
Line 39:         "@VDSMLOGDIR@/vdsm.log"
Line 40:     )
Line 41: 
Line 42:     for logfile in "${vdsm_logs[@]}"
> for log in ${vdsm_logs}; do
Done
Line 43:     do
Line 44:         if [ ! -f "${logfile}" ]; then
Line 45:             touch ${logfile}
Line 46:             chmod 0644 ${logfile}


Line 40:     )
Line 41: 
Line 42:     for logfile in "${vdsm_logs[@]}"
Line 43:     do
Line 44:         if [ ! -f "${logfile}" ]; then
> Somehow ${logfile} can be a directory, so better to use -e
Done
Line 45:             touch ${logfile}
Line 46:             chmod 0644 ${logfile}
Line 47:             chown @VDSMUSER@:@VDSMGROUP@ ${logfile}
Line 48:         fi


Line 41: 
Line 42:     for logfile in "${vdsm_logs[@]}"
Line 43:     do
Line 44:         if [ ! -f "${logfile}" ]; then
Line 45:             touch ${logfile}
> quotes
Done
Line 46:             chmod 0644 ${logfile}
Line 47:             chown @VDSMUSER@:@VDSMGROUP@ ${logfile}
Line 48:         fi
Line 49:     done


Line 42:     for logfile in "${vdsm_logs[@]}"
Line 43:     do
Line 44:         if [ ! -f "${logfile}" ]; then
Line 45:             touch ${logfile}
Line 46:             chmod 0644 ${logfile}
> quotes
Done
Line 47:             chown @VDSMUSER@:@VDSMGROUP@ ${logfile}
Line 48:         fi
Line 49:     done
Line 50: 


Line 43:     do
Line 44:         if [ ! -f "${logfile}" ]; then
Line 45:             touch ${logfile}
Line 46:             chmod 0644 ${logfile}
Line 47:             chown @VDSMUSER@:@VDSMGROUP@ ${logfile}
> quotes
Done
Line 48:         fi
Line 49:     done
Line 50: 
Line 51:     if [ ! -f @VDSMLOGDIR@/supervdsm.log ]; then


Line 50: 
Line 51:     if [ ! -f @VDSMLOGDIR@/supervdsm.log ]; then
Line 52:         touch @VDSMLOGDIR@/supervdsm.log
Line 53:         chmod 0644 @VDSMLOGDIR@/supervdsm.log
Line 54:         chown root:root @VDSMLOGDIR@/supervdsm.log
> you have constants also for chown chmod and touch
Touch was not there, created now.
Line 55:     fi
Line 56: }
Line 57: 
Line 58: task_run_init_hooks(){


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6ca927cb447eeb24195cff6a1174e0f9a7295214
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: Kiril Nesenko <knesenko at redhat.com>
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list