Change in vdsm[master]: pre-start: touch/configure vdsm logs
knesenko at redhat.com
knesenko at redhat.com
Thu Mar 20 09:25:34 UTC 2014
Kiril Nesenko has posted comments on this change.
Change subject: pre-start: touch/configure vdsm logs
......................................................................
Patch Set 2:
(6 comments)
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
local vdsm_logs="@VDSMLOGDIR@/metadata.log @VDSMLOGDIR@/mom.log @VDSMLOGDIR@/vdsm.log"
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
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
if [ ! -e "${logfile}" ]
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
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
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
Line 48: fi
Line 49: done
Line 50:
Line 51: if [ ! -f @VDSMLOGDIR@/supervdsm.log ]; then
--
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